/xservices/trunk/src/java/net/brutex/xservices/types/FileInfoType.java |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/plain |
\ No newline at end of property |
/xservices/trunk/src/java/net/brutex/xservices/types/FileInfoListType.java |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/plain |
\ No newline at end of property |
/xservices/trunk/src/java/net/brutex/xservices/ws/rs/FileInfo.java |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/plain |
\ No newline at end of property |
/xservices/trunk/src/java/net/brutex/xservices/ws/rs/FileInfoImpl.java |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/plain |
\ No newline at end of property |
/xservices/trunk/src/java/net/brutex/xservices/ws/rs/FileListType.java |
---|
File deleted |
Property changes: |
Deleted: svn:mime-type |
-text/plain |
\ No newline at end of property |
/xservices/trunk/src/java/net/brutex/xservices/ws/impl/FileServiceImpl.java |
---|
15,7 → 15,6 |
*/ |
package net.brutex.xservices.ws.impl; |
import java.io.ByteArrayOutputStream; |
import java.io.File; |
import java.io.FileNotFoundException; |
import java.io.FileOutputStream; |
156,27 → 155,7 |
throw new XServicesFault(e); |
} |
} |
public byte[] encodeFile(FileResource res) throws XServicesFault { |
InputStream is = null; |
try { |
is = res.getAntResource(null).getInputStream(); |
ByteArrayOutputStream buffer = new ByteArrayOutputStream(); |
int nRead; |
byte[] data = new byte[4096]; |
while ((nRead = is.read(data, 0, data.length)) != -1) { |
buffer.write(data, 0, nRead); |
} |
buffer.flush(); |
return buffer.toByteArray(); |
} catch (IOException e) { |
throw new XServicesFault(e); |
} |
} |
/* |
* (non-Javadoc) |
* |
/xservices/trunk/src/java/net/brutex/xservices/ws/FileService.java |
---|
51,7 → 51,6 |
final String OPERATION_BASENAME ="basename"; |
final String OPERATION_DOWNLOADFILE ="downloadFile"; |
final String OPERATION_ENCODEFILE= "encodeFile"; |
final String OPERATION_UPLOADFILE ="uploadFile"; |
final String OPERATION_COPY ="copy"; |
final String OPERATION_COPYFILE ="copyFile"; |
91,16 → 90,6 |
@WebParam(name = FileResource.XML_NAME) FileResource res) throws XServicesFault; |
/** |
* @param res |
* @return Encodes a file |
* @throws XServicesFault |
*/ |
@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_ENCODEFILE) |
@WebMethod(operationName = OPERATION_ENCODEFILE) |
public abstract byte[] encodeFile( |
@WebParam(name = FileResource.XML_NAME) FileResource res) throws XServicesFault; |
/** |
* @param file |
* @return The file name of the file that has been uploaded. |
* @throws XServicesFault |
/xservices/trunk/src/java/net/brutex/xservices/util/XServicesDocumentation.java |
---|
48,8 → 48,6 |
"as inline base64 encoded block. Keep in mind that unless you are using MTOM, a lot of " + |
"java heap memory is used."; |
public static final String SERVICE_OPERATION_ENCODEFILE = "Encodes a file."; |
public static final String SERVICE_OPERATION_UPLOADFILE = "Send a file from client to web service server using either " + |
"MTOM attachment or base64 inline attachment."; |
/xservices/trunk/src/java/net/brutex/xservices/agent/AgentServlet.java |
---|
0,0 → 1,39 |
package net.brutex.xservices.agent; |
import java.io.IOException; |
import javax.servlet.GenericServlet; |
import javax.servlet.ServletConfig; |
import javax.servlet.ServletException; |
import javax.servlet.ServletRequest; |
import javax.servlet.ServletResponse; |
/** |
* Servlet implementation class AgentServlet |
*/ |
public class AgentServlet extends GenericServlet { |
private static final long serialVersionUID = 1L; |
/** |
* @see GenericServlet#GenericServlet() |
*/ |
public AgentServlet() { |
super(); |
// TODO Auto-generated constructor stub |
} |
/** |
* @see Servlet#init(ServletConfig) |
*/ |
public void init(ServletConfig config) throws ServletException { |
// TODO Auto-generated method stub |
} |
/** |
* @see Servlet#service(ServletRequest request, ServletResponse response) |
*/ |
public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException { |
// TODO Auto-generated method stub |
System.out.println("Yep. I am here."); |
} |
} |
Property changes: |
Added: svn:mime-type |
+text/plain |
\ No newline at end of property |