kvradhika81
15 years agoNew Contributor
Help - Providing multipart/mixed as request from SOAPUI Tool
I am trying to test my RESTful webservice method using SOAP-UI Tool.
The service method uses multipart/mixed mime-type as request.
I am unable to send a multipart/mixed request to the service using the tool.
I posted the issue to Nabble-Jersey forum. They confirmed this is a SOAP-UI Tool issue.
http://jersey.576304.n2.nabble.com/Help ... l#a5506131
Request your inputs on this issue.
Request:
--Boundary_1_27742346_1283484587534
Content-Type: application/xhtml+xml
<?xml version="1.0" encoding="UTF-8"?>
<HTML xmlns:iBubble="http://ntr.lxnx.org">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
..............
</META>
<BODY>
<doc iTag="test1">RYAN MICHAELS, an Individual, Plaintiff, vs. NANCY ZOSS, an Individual; and DOES 1 through 100, inclusive, Defendants ............
...............
.................
ahead<br/>and do<br/>it.<br/><br/></span></doc>
</BODY>
</HTML>
--Boundary_1_27742346_1283484587534
Content-Type: text/plain
Add_document.xml
--Boundary_1_27742346_1283484587534
Content-Type: text/plain
Sudheer
--Boundary_1_27742346_1283484587534
Content-Type: application/xml
<annotationList><annotation id="0b0e8631-a9ad-4045-8ddc-3841ec1058e1" startItag="test1" endItag="test1"><beginIndex>137</beginIndex><endIndex>172</endIndex></annotation></annotationList>
--Boundary_1_27742346_1283484587534--
Response received:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><date>2010-09-07T15:43:30.552+05:00</date><responseCode>500 Internal Server Error</responseCode><name>javax.ws.rs.WebApplicationException: org.jvnet.mimepull.MIMEParsingException: Missing start boundary</name><code>SysmanDefault:JAXRS:com.sun.jersey.multipart.impl.MultiPartReader.readFrom#203</code></error>
Here is the Service end stack trace after enabling LoggingFilters:
Sep 8, 2010 9:20:38 AM com.sun.jersey.api.container.filter.LoggingFilter filter
INFO: 2 * Server in-bound request
2 > POST http://localhost:8083/myService/annotation/add
2 > Content-Length: 205001
2 > Content-Type: multipart/mixed; charset=UTF-8
2 > Host: localhost:8083
2 > Connection: Keep-Alive
2 > User-Agent: Apache-HttpClient/4.0-beta2 (java 1.5)
2 >
--Boundary_1_27742346_1283484587534
Content-Type: application/xhtml+xml
<?xml version="1.0" encoding="UTF-8"?>
<HTML xmlns:my="http://ntr.mycompany.org">
></doc>
</BODY>
</HTML>
--Boundary_1_27742346_1283484587534
Content-Type: text/plain
Add_document.xml
--Boundary_1_27742346_1283484587534
Content-Type: text/plain
Sudheer
--Boundary_1_27742346_1283484587534
Content-Type: application/xml
<annotationList><annotation id="0b0e8631-a9ad-4045-8ddc-3841ec1058e1" startItag="test1" endItag="test1"><beginIndex>137</beginIndex><endIndex>172</endIndex></annotation></annotationList>
--Boundary_1_27742346_1283484587534--
09:20:38(09/08) INFO SmapiDebug : Could not find the Error Definition for errorId: com.mycompany.services.rest.ResourceInternalServerException, smLog: com.sun.jersey.multipart.impl.MultiPartReader, using default severity of INFORMATIONAL
09:20:38(09/08) ERROR com.sun.jersey.multipart.impl.MultiPartReader : errorId = com.mycompany.services.rest.ResourceInternalServerException, severity = INF, description = : Wed Sep 08 09:20:38 PKT 2010/500 Internal Server Error/javax.ws.rs.WebApplicationException: org.jvnet.mimepull.MIMEParsingException: Missing start boundary/SysmanDefault:JAXRS:com.sun.jersey.multipart.impl.MultiPartReader.readFrom#203
09:20:38(09/08) ERROR com.sun.jersey.multipart.impl.MultiPartReader : mycompany.sysman.logging.ErrorEvent com.mycompany.services.rest.ResourceInternalServerException Wed Sep 08 09:20:38 PKT 2010/500 Internal Server Error/javax.ws.rs.WebApplicationException: org.jvnet.mimepull.MIMEParsingException: Missing start boundary/SysmanDefault:JAXRS:com.sun.jersey.multipart.impl.MultiPartReader.readFrom#203
Sep 8, 2010 9:20:38 AM com.sun.jersey.api.container.filter.LoggingFilter$Adapter finish
INFO: 2 * Server out-bound response
2 < 500
2 < Content-Type: application/xml
2 <
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><date>2010-09-08T09:20:38.892+05:00</date><responseCode>500 Internal Server Error</responseCode><name>javax.ws.rs.WebApplicationException: org.jvnet.mimepull.MIMEParsingException: Missing start boundary</name><code>SysmanDefault:JAXRS:com.sun.jersey.multipart.impl.MultiPartReader.readFrom#203</code></error>
The service method uses multipart/mixed mime-type as request.
I am unable to send a multipart/mixed request to the service using the tool.
I posted the issue to Nabble-Jersey forum. They confirmed this is a SOAP-UI Tool issue.
http://jersey.576304.n2.nabble.com/Help ... l#a5506131
Request your inputs on this issue.
Request:
--Boundary_1_27742346_1283484587534
Content-Type: application/xhtml+xml
<?xml version="1.0" encoding="UTF-8"?>
<HTML xmlns:iBubble="http://ntr.lxnx.org">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
..............
</META>
<BODY>
<doc iTag="test1">RYAN MICHAELS, an Individual, Plaintiff, vs. NANCY ZOSS, an Individual; and DOES 1 through 100, inclusive, Defendants ............
...............
.................
ahead<br/>and do<br/>it.<br/><br/></span></doc>
</BODY>
</HTML>
--Boundary_1_27742346_1283484587534
Content-Type: text/plain
Add_document.xml
--Boundary_1_27742346_1283484587534
Content-Type: text/plain
Sudheer
--Boundary_1_27742346_1283484587534
Content-Type: application/xml
<annotationList><annotation id="0b0e8631-a9ad-4045-8ddc-3841ec1058e1" startItag="test1" endItag="test1"><beginIndex>137</beginIndex><endIndex>172</endIndex></annotation></annotationList>
--Boundary_1_27742346_1283484587534--
Response received:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><date>2010-09-07T15:43:30.552+05:00</date><responseCode>500 Internal Server Error</responseCode><name>javax.ws.rs.WebApplicationException: org.jvnet.mimepull.MIMEParsingException: Missing start boundary</name><code>SysmanDefault:JAXRS:com.sun.jersey.multipart.impl.MultiPartReader.readFrom#203</code></error>
Here is the Service end stack trace after enabling LoggingFilters:
Sep 8, 2010 9:20:38 AM com.sun.jersey.api.container.filter.LoggingFilter filter
INFO: 2 * Server in-bound request
2 > POST http://localhost:8083/myService/annotation/add
2 > Content-Length: 205001
2 > Content-Type: multipart/mixed; charset=UTF-8
2 > Host: localhost:8083
2 > Connection: Keep-Alive
2 > User-Agent: Apache-HttpClient/4.0-beta2 (java 1.5)
2 >
--Boundary_1_27742346_1283484587534
Content-Type: application/xhtml+xml
<?xml version="1.0" encoding="UTF-8"?>
<HTML xmlns:my="http://ntr.mycompany.org">
></doc>
</BODY>
</HTML>
--Boundary_1_27742346_1283484587534
Content-Type: text/plain
Add_document.xml
--Boundary_1_27742346_1283484587534
Content-Type: text/plain
Sudheer
--Boundary_1_27742346_1283484587534
Content-Type: application/xml
<annotationList><annotation id="0b0e8631-a9ad-4045-8ddc-3841ec1058e1" startItag="test1" endItag="test1"><beginIndex>137</beginIndex><endIndex>172</endIndex></annotation></annotationList>
--Boundary_1_27742346_1283484587534--
09:20:38(09/08) INFO SmapiDebug : Could not find the Error Definition for errorId: com.mycompany.services.rest.ResourceInternalServerException, smLog: com.sun.jersey.multipart.impl.MultiPartReader, using default severity of INFORMATIONAL
09:20:38(09/08) ERROR com.sun.jersey.multipart.impl.MultiPartReader : errorId = com.mycompany.services.rest.ResourceInternalServerException, severity = INF, description = : Wed Sep 08 09:20:38 PKT 2010/500 Internal Server Error/javax.ws.rs.WebApplicationException: org.jvnet.mimepull.MIMEParsingException: Missing start boundary/SysmanDefault:JAXRS:com.sun.jersey.multipart.impl.MultiPartReader.readFrom#203
09:20:38(09/08) ERROR com.sun.jersey.multipart.impl.MultiPartReader : mycompany.sysman.logging.ErrorEvent com.mycompany.services.rest.ResourceInternalServerException Wed Sep 08 09:20:38 PKT 2010/500 Internal Server Error/javax.ws.rs.WebApplicationException: org.jvnet.mimepull.MIMEParsingException: Missing start boundary/SysmanDefault:JAXRS:com.sun.jersey.multipart.impl.MultiPartReader.readFrom#203
Sep 8, 2010 9:20:38 AM com.sun.jersey.api.container.filter.LoggingFilter$Adapter finish
INFO: 2 * Server out-bound response
2 < 500
2 < Content-Type: application/xml
2 <
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error><date>2010-09-08T09:20:38.892+05:00</date><responseCode>500 Internal Server Error</responseCode><name>javax.ws.rs.WebApplicationException: org.jvnet.mimepull.MIMEParsingException: Missing start boundary</name><code>SysmanDefault:JAXRS:com.sun.jersey.multipart.impl.MultiPartReader.readFrom#203</code></error>