0 Replies Latest reply: Apr 9, 2010 8:01 AM by 843830 RSS

    SOAP Attachment question

    843830
      Hello everybody,

      I have a problem with sun-http-binding and SOAP mime Attachment on GlassfishESB 2.1.1.

      When I send a SOAP Message with an xml attachment to the server it throws an exception.
      This is the stack trace.

      Exception reported in processing synchronous request-reply
      com.sun.jbi.httpsoapbc.FaultException: javax.jbi.messaging.MessagingException: HTTPBC-W00653: An exception occured while processing a request
      at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.processAsynchRequest(JAXWSGrizzlyRequestProcessor.java:410)
      at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.service(JAXWSGrizzlyRequestProcessor.java:220)
      at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
      at com.sun.jbi.httpsoapbc.embedded.JBIGrizzlyAsyncFilter.doFilter(JBIGrizzlyAsyncFilter.java:95)
      at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:189)
      at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:164)
      at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
      at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
      at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:117)
      Caused by: javax.jbi.messaging.MessagingException: HTTPBC-W00653: An exception occured while processing a request
      ... 9 more
      Caused by: java.io.IOException:
      at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:416)
      at com.sun.xml.ws.encoding.MimeCodec.decode(MimeCodec.java:181)
      at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:348)
      at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
      at com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:341)
      at com.sun.jbi.httpsoapbc.embedded.JAXWSGrizzlyRequestProcessor.processAsynchRequest(JAXWSGrizzlyRequestProcessor.java:405)
      ... 8 more

      This is the message like Glassfish receive it (printed by -Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true):

      ---[HTTP request]---
      content-type: multipart/related; type="application/soap+xml"; start="<rootpart@soapui.org>"; boundary="----=_Part_27_588819543.1270808985932"
      host: localhost:12010
      content-length: 1433
      mime-version: 1.0
      user-agent: Jakarta Commons-HttpClient/3.1
      accept-encoding: gzip,deflate
      boundary: MIME_boundary
      ------=_Part_27_588819543.1270808985932
      Content-Type: application/soap+xml; charset=UTF-8
      Content-Transfer-Encoding: 8bit
      Content-ID: <rootpart@soapui.org>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:brw="http://docs.oasis-open.org/wsn/brw-2"><soapenv:Header/><soapenv:Body><brw:RegisterPublisher><RegisterPublisherRequest/><refRegisterPublisher><id href="RegisterPublisherRequestAttachment"/></refRegisterPublisher></brw:RegisterPublisher></soapenv:Body></soapenv:Envelope>
      ------=_Part_27_588819543.1270808985932
      Content-Type: text/xml; charset=us-ascii
      Content-Transfer-Encoding: 7bit
      Content-ID: <RegisterPublisherRequestAttachment>
      <RegisterPublisher xmlns="http://docs.oasis-open.org/wsn/br-2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://docs.oasis-open.org/wsn/br-2 http://docs.oasis-open.org/wsn/br-2.xsd"><PublisherReference><Address xmlns="http://www.w3.org/2005/08/addressing">http://www.informatica.unibo.it</Address><ReferenceParameters xmlns="http://www.w3.org/2005/08/addressing"><in>http://localhost:12010/MyEngineEcho/</in><out>localhost:8080/HttpOutBound/echo</out></ReferenceParameters></PublisherReference><Topic Dialect="http://www.example.com"><schemalocation>http://www.ditech.it/tesi/santi/roberto/schema/rob.xsd</schemalocation></Topic></RegisterPublisher>
      ------=_Part_27_588819543.1270808985932--

      This is my binding wsdl:

      <binding name="EventBinding" type="wsn-brw:NotificationBroker">&#8232;          
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>&#8232;          
      <operation name="Notify">&#8232;               
      <soap:operation soapAction="Notify"/>&#8232;
      <wsdl:input>&#8232;                    
      <mime:multipartRelated>&#8232;                         
      <mime:part>&#8232;                              
      <soap:body parts="refNotify" use="literal" />&#8232;                         
      </mime:part>&#8232;                         
      <mime:part>&#8232;                              
      <mime:content part="Notify" type="text/xml" />&#8232;                         
      </mime:part>&#8232;                    
      </mime:multipartRelated>&#8232;               
      </wsdl:input>&#8232;               
      <output>&#8232;                    
      <soap:body parts="result" use="literal" />&#8232;               
      </output>&#8232;          
      </operation>&#8232;          
      <operation name="Subscribe">&#8232;               
      <soap:operation soapAction="urn:Subscribe"/>&#8232;               
      <wsdl:input>&#8232;                    
      <mime:multipartRelated>&#8232;                         
      <mime:part>&#8232;                              
      <soap:body parts="refSubscribe" use="literal" />&#8232;                         
      </mime:part>&#8232;                         
      <mime:part>&#8232;                              
      <mime:content part="SubscribeRequest" type="text/xml" />&#8232;                         
      </mime:part>&#8232;                    
      </mime:multipartRelated>&#8232;               
      </wsdl:input>&#8232;               
      <output>&#8232;                    
      <soap:body use="literal"/>&#8232;               
      </output>&#8232;          
      </operation>&#8232;          
      <operation name="RegisterPublisher">&#8232;               
      <soap:operation soapAction="urn:RegisterPublisher"/>&#8232;               
      <wsdl:input>&#8232;                    
      <mime:multipartRelated>&#8232;                         
      <mime:part>&#8232;                              
      <soap:body parts="refRegisterPublisher" use="literal" />&#8232;                         
      </mime:part>&#8232;                         
      <mime:part>&#8232;                              
      <mime:content part="RegisterPublisherRequest" type="text/xml" />&#8232;                         
      </mime:part>&#8232;                    
      </mime:multipartRelated>&#8232;               
      </wsdl:input>&#8232;               
      <output>&#8232;                    
      soap:body parts="result" use="literal" />&#8232;               
      </output>&#8232;          
      </operation>&#8232;     
      </binding>

      How is possible to fit this problem?
      Is it possible to convert SOAP Attachment in a JBI NM attachment?

      Thanks
      Roberto