Forum Discussion

ayasoapui's avatar
ayasoapui
Occasional Contributor
15 years ago

Re: problem uploading file using mtom/xop handler

I am getting an error trying to upload a csv file using mtom/xop:

In arg2 is where I specify the csv file.  Here is the xml:


    cid:12345678


I already enabled mtom, I also set the content-type in the attachement to plain/text
and the ContentID to be 12345678
.
I also included this in my soapenv:  xmlns:xop="http://www.w3.org/2004/08/xop/include".

This is the error I get:


 

 
     
        env:Client
        Unable to parse the incoming request
       
            java.io.IOException: Could not parse SOAP message. Remaining stream ...
javax.xml.soap.SOAPException: java.io.IOException
java.io.IOException
javax.xml.stream.XMLStreamException: javax.xml.stream.XMLStreamException: Premature end of file encountered
javax.xml.stream.XMLStreamException: Premature end of file encountered

       

     

 


Please help!

5 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    hmm.. you should only have to enter cid:12345678 in your XML (where cid is matched to the ContentID of an attachment in your Request), then enable MTOM for your request and if the arg2 is a binary datatype in your schema you should be all set.. (soapUI adds the XOP:Include stuff itself.. ).. Does that help?

    regards!

    /Ole
    eviware.com
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    no, you shouldn't be required to add any namespaces, soapUI should take care of all that under the hood..

    Can you please post the contents of the HTTP-log after you have made your request so I can see if the request is malformed somehow?

    regards!

    /Ole
    eviware.com
  • ayasoapui's avatar
    ayasoapui
    Occasional Contributor
    ok here is my http log...Thanks.


    Mon Aug 17 09:44:13 EDT 2009:DEBUG:>> "POST /SOAPAPI/CMService HTTP/1.1[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:>> "SOAPAction: ""[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:>> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:>> "Host: env.sdb.com:7001[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:>> "Content-Length: 0[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:>> "[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "HTTP/1.1 500 Internal Server Error[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "HTTP/1.1 500 Internal Server Error[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "Date: Mon, 17 Aug 2009 13:44:13 GMT[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "Transfer-Encoding: chunked[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "Content-Type: text/xml; charset=utf-8[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "X-Powered-By: Servlet/2.5 JSP/2.1[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\r][\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "0"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "2"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "6"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "f"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\r]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "
    env:ClientUnable to parse the incoming requestjava.io.IOException: Could not parse SOAP message. Remaining stream ... [\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "javax.xml.soap.SOAPException: java.io.IOException[\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "java.io.IOException[\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "javax.xml.stream.XMLStreamException: javax.xml.stream.XMLStreamException: Premature end of file encountered[\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "javax.xml.stream.XMLStreamException: Premature end of file encountered[\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "
    "
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\r]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "0"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "0"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "0"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "0"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\r]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\r]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\n]"
    Mon Aug 17 09:44:13 EDT 2009:DEBUG:<< "[\r][\n]"
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    oh.. this looks wrong.. (the request body is empty) is there anything in your error log tab? could you attach your WSDL (or send it to support@eviware.com) so we can have a look?

    regards!

    /Ole
    eviware.com