[jboss-user] [JBoss Web Services] New message: "XML Content handler only supports a StreamSource content object"

Michael Eibeck do-not-reply at jboss.com
Thu Jan 21 09:49:39 EST 2010


User development,

A new message was posted in the thread "XML Content handler only supports a StreamSource content object":

http://community.jboss.org/message/521443#521443

Author  : Michael Eibeck
Profile : http://community.jboss.org/people/skymic

Message:
--------------------------------------------------------------
I have a JBoss-5.1.0-GA app server with a WebService running under JDK 1.6.0_17.
 
I generated the WebService client end endpoint from a wsdl using wsconsume.
 
When I run the WebService I get the following exception:
 
javax.xml.ws.WebServiceException: java.io.IOException: XML Content handler only supports a StreamSource content object
 at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:396)
 at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
 at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
 at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
 at $Proxy26.iBriefingExport(Unknown Source)
 at ch.skyguide.aim.interfaces.ws.client.WS_Test.testWSexportIBriefing(WS_Test.java:118)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at junit.framework.TestCase.runTest(TestCase.java:168)
 at junit.framework.TestCase.runBare(TestCase.java:134)
 at junit.framework.TestResult$1.protect(TestResult.java:110)
 at junit.framework.TestResult.runProtected(TestResult.java:128)
 at junit.framework.TestResult.run(TestResult.java:113)
 at junit.framework.TestCase.run(TestCase.java:124)
 at junit.framework.TestSuite.runTest(TestSuite.java:232)
 at junit.framework.TestSuite.run(TestSuite.java:227)
 at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
 at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
 at junit.framework.TestResult.runProtected(TestResult.java:128)
 at junit.extensions.TestSetup.run(TestSetup.java:27)
 at junit.textui.TestRunner.doRun(TestRunner.java:116)
 at com.intellij.rt.execution.junit.IdeaTestRunner.doRun(IdeaTestRunner.java:94)
 at junit.textui.TestRunner.doRun(TestRunner.java:109)
 at com.intellij.rt.execution.junit.IdeaTestRunner.startRunnerWithArgs(IdeaTestRunner.java:22)
 at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:118)
 at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: java.io.IOException: XML Content handler only supports a StreamSource content object
 at org.jboss.ws.core.soap.attachment.XmlDataContentHandler.writeTo(XmlDataContentHandler.java:101)
 at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:869)
 at javax.activation.DataHandler.writeTo(DataHandler.java:302)
 at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350)
 at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:845)
 at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:361)
 at org.jboss.ws.core.soap.attachment.MultipartRelatedEncoder.writeTo(MultipartRelatedEncoder.java:123)
 at org.jboss.ws.core.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:343)
 at org.jboss.ws.core.soap.SOAPMessageMarshaller.write(SOAPMessageMarshaller.java:57)
 at org.jboss.ws.core.client.NettyClient.writeRequest(NettyClient.java:297)
 at org.jboss.ws.core.client.NettyClient.invoke(NettyClient.java:191)
 at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:154)
 at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:69)
 at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:341)
 at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)
 ... 31 more
 
This exception is already thrown by the client, when it attempts to call a WebService method. Nothing gets through to the server.
The particular method called uses SOAP attachment in the request and response message.
The wsdl for the message looks like this:
 
  <operation name="IBriefingExport">
   <soap:operation/>
   <input>
    <mime:multipartRelated>
     <mime:part>
      <soap:body parts="IBriefingExportRequestGeneralPart" use="literal"/>
     </mime:part>
     <mime:part>
      <mime:content part="IBriefingExportRequestFilterPart" type="text/xml"/>
     </mime:part>
    </mime:multipartRelated>
   </input>
   <output>
    <mime:multipartRelated>
     <mime:part>
      <soap:body parts="IBriefingExportResponsePart" use="literal"/>
     </mime:part>
     <mime:part>
      <mime:content part="IBriefingExportResponseData" type="application/octet-stream"/>
     </mime:part>
    </mime:multipartRelated>
   </output>
   <fault name="ExportFault">
    <soap:fault name="ExportFault" use="literal"/>
   </fault>
  </operation>
 
I believe the cause of the problem are the mime:multipartReleated sections.
Messages which do not use these sections work fine. wsconsume also generated java classes from this wsdl without problems.
 
Does anyone know the solution?

 

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/521443#521443




More information about the jboss-user mailing list