Hi,
I have a possible bug report:
JBoss AS 4.0.5
JBossWS 1.2.0 SP1
EJB3
Axis2 client with MTOM enabled
I exposed an EJB3 exactly as it is described in JBossWS Guide as WS (with MTOM enabled)
Endpoint:
| @Remote
| @WebService(targetNamespace = "http://org.jboss.ws/xop/doclit")
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle =
SOAPBinding.ParameterStyle.BARE)
| @BindingType(value="http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true")
| public interface ETI_Receiver {
|
| public void downloadRelationships(DataHandler attachedFile);
|
| }
|
Bean
| @Stateless
| @WebService(endpointInterface="ETI_Receiver")
| public class ETI_ReceiverBean implements ETI_Receiver{
|
|
| public void downloadRelationships(DataHandler attachedFile) {
|
| }
|
|
| }
|
Client code (with Axis2 stub generated from the WSDL published during deployment of EJB3
by JBossWS)
|
| ETI_ReceiverBeanServiceStub emstub = new ETI_ReceiverBeanServiceStub();
| Options options = new Options();
|
| options.setProperty(Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);
| //options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS,
Constants.VALUE_TRUE);
| //options.setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR, new
File("c:\\"));
| //options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD,100000);
| //options.setProperty(Constants.Configuration.ENABLE_SWA,
Constants.VALUE_TRUE);
| options.setTo(new EndpointReference(uri));
| emstub._getServiceClient().setOptions(options);
|
| ws.jboss.org.xop.doclit.DownloadRelationships drs = new
ws.jboss.org.xop.doclit.DownloadRelationships();
|
| DataSource ds;
|
| ds = new FileDataSource("d:\\x.zip");
| DataHandler dataHandler = new DataHandler(ds);
|
| drs.setDownloadRelationships(dataHandler);
|
| try {
| emstub.downloadRelationships(drs);
|
| } catch (RemoteException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
|
|
Without enabling MTOM at Axis2 side everything is perfect, the attachment is sent, but
after enabling MTOM (see the code above)
JbossWS drops an exception with message "multipart/related stream invalid, no root
part was found"
| 2007-03-27 22:45:13,281 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel)
[4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 45s:938ms
| 2007-03-27 22:47:35,796 DEBUG
[org.jboss.ws.core.server.AbstractServiceEndpointServlet] doPost:
/ETI_Framework/ETI_ReceiverBean
| 2007-03-27 22:47:35,796 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation]
pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@6076f4 (Thread
http-0.0.0.0-8080-1)
| 2007-03-27 22:47:35,812 DEBUG [org.jboss.ws.core.server.ServiceEndpoint] BEGIN
handleRequest: jboss.ws:context=ETI_Framework,endpoint=ETI_ReceiverBean
| 2007-03-27 22:47:35,843 DEBUG [org.jboss.ws.core.soap.MessageFactoryImpl]
createMessage: [contentType=multipart/related;
| boundary=MIMEBoundaryurn_uuid_38281D50CC3CDBE79011750284556091;
| type="application/xop+xml";
| start="<0.urn:uuid:38281D50CC3CDBE79011750284556092@apache.org>";
| start-info="text/xml"; charset=UTF-8]
| 2007-03-27 22:47:35,859 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure
SOAPBinding
| 2007-03-27 22:47:35,859 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP
request exception
| java.lang.IllegalArgumentException: multipart/related stream invalid, no root part was
found
| at
org.jboss.ws.core.soap.attachment.MultipartRelatedDecoder.decodeMultipartRelatedMessage(MultipartRelatedDecoder.java:156)
| at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:211)
| at
org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:171)
| at org.jboss.ws.core.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:185)
| at
org.jboss.ws.core.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:440)
| at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at
org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 2007-03-27 22:47:35,859 DEBUG [javax.xml.soap.FactoryLoader] Load from Service API
META-INF/services/javax.xml.soap.MessageFactory:
org.jboss.ws.core.soap.MessageFactoryImpl
| 2007-03-27 22:47:35,906 DEBUG [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] Cannot
obtain fault meta data for: class java.lang.IllegalArgumentException
| 2007-03-27 22:47:35,921 DEBUG [org.jboss.ws.core.server.ServiceEndpoint] END
handleRequest: jboss.ws:context=ETI_Framework,endpoint=ETI_ReceiverBean
| 2007-03-27 22:47:35,937 DEBUG [org.jboss.ws.core.soap.MessageContextAssociation]
popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@6076f4 (Thread
http-0.0.0.0-8080-1)
|
|
Note: The Axis2 client works perfectly also with MTOM enabled if you use an Axis2 endpoint
and not the JbossWS exposed EJB3.
Is it already a known issue or should I report a bug?
Bye,
Janos
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032201#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...