I have a simple WS that uses MTOM/XOP.   I'm using JBossAS 4.0.5 and JBossWS 
2.0.1 GA.

I have the following annotations on the service class

@WebService(name="E2PIService", serviceName="E2PIService")
  | @BindingType(value=javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_MTOM_BINDING)
  | @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
  | 

and this is the simple WebMethod signature

@WebMethod(operationName="transferFile", action="transferFile")
  |          @XmlMimeType("application/octet-stream")
  |     public long 
transferFile(@XmlMimeType("application/octet-stream")javax.activation.DataHandler
 data)
  | 
When I invoke this service using a client, it works OK with small files but I 
get OutOfMemory exceptions on large files.  
I do call setMTOMEnabled(true) on the client side and verified the data is 
being encoded correctly.

  | SOAPBinding binding = (SOAPBinding)((BindingProvider)service).getBinding();
  | binding.setMTOMEnabled(true);
  | 
  | FileDataSource fds = new FileDataSource(new File("/bigData.dat"));
  | long d = service.transferFile(new DataHandler(fds));
  | 

It appears that the client is not streaming the data.    If I do the reverse 
where I send a file from the server to client, it does appear to correctly 
stream the data.

How can I enable the client to perform streaming of DataHandler type parameters?



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099434#4099434

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099434
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to