cancel
Showing results for 
Search instead for 
Did you mean: 

Re: problem uploading file using mtom/xop handler

Highlighted
Occasional Contributor

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 5
Highlighted

Re: problem uploading file using mtom/xop handler

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


Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Occasional Contributor

Re: problem uploading file using mtom/xop handler

I tried that but I still get the same error.

Is there also a namespace that I need to add in my xml request?

ex.  xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:xop-mime="http://www.w3.org/2003/12/xop/mime"

How will relate to the namespace?

Thanks.
Highlighted

Re: problem uploading file using mtom/xop handler

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


Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Occasional Contributor

Re: problem uploading file using mtom/xop handler

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]"
Highlighted

Re: problem uploading file using mtom/xop handler

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


Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 12
2 nmrao 8
3 HimanshuTayal 3
Top Kudoed Authors