Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SOAP error when sending messages with attachments to a webserice

843834Oct 9 2007 — edited Oct 30 2007
Hi!

im trying to send an ebxml extended soap message to a webservice thats supposed to accept it and send it out, the webservice however thinks that there is a problem with the attachment part of the soap message, if I remove the attachment it works great and there are no reported problems with the soap message.

The message including attachment looks like this:
POST /corvus/httpd/ebms/sender HTTP/1.1
Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: multipart/related; type="text/xml"; boundary="----=_Part_0_21356612.1191939936638"
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.6.0_02
Host: 127.0.0.1:9090
Connection: keep-alive
Content-Length: 3310

------=_Part_0_21356612.1191939936638
Content-Type: text/xml; charset=utf-8

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
	<eb:MessageHeader xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope" 
			  xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd" 
			  SOAP:mustUnderstand="1" eb:version="2.0">
	<eb:From>
	<eb:PartyId eb:type="se:foretag1">SEForetag1</eb:PartyId>
	</eb:From>
	<eb:To>
		<eb:PartyId eb:type="se:foretag2">SEForetag2</eb:PartyId>
	</eb:To>
	<eb:CPAId>20071006:SEForetag1:SEForetag2</eb:CPAId>
	<eb:ConversationId>125498SEForetag1</eb:ConversationId>
	<eb:Service>urn:foretag1:services:documentprocessing:NewOrder</eb:Service>
	<eb:Action>incomingNewOrder</eb:Action>
	<eb:MessageData>
		<eb:MessageId>125-101213498-@foretag1.se</eb:MessageId>
		<eb:Timestamp>1-2-5T10:12:13</eb:Timestamp>
	</eb:MessageData>
	</eb:MessageHeader>
	<eb:AckRequested xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope" 
			 xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd" 
			 SOAP:actor="urn:oasis:names:tc:ebxml-msg:actor:toPartyMSH" SOAP:mustUnderstand="1" 
			 SOAP:signed="false" eb:version="2.0"/>
	<eb:SyncReply xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope" 
		      xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd" 
		      SOAP:actor="http://schemas.xmlsoap.org/soap/actor/next/" SOAP:mustUnderstand="1" 
		      eb:id="" eb:version="2.0"/>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
	<eb:cpaId xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
			   20071006:SEForetag1:SEForetag2</eb:cpaId>
	<eb:service xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
			   urn:foretag1:services:documentprocessing:NewOrder</eb:service>
	<eb:action xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
			   incomingNewOrder</eb:action>
	<eb:convId xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
			   125498SEForetag1</eb:convId>
	<eb:fromPartyId 
		xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
			   SEForetag1</eb:fromPartyId>
	<eb:fromPartyType 
		xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
			   se:foretag1</eb:fromPartyType>
	<eb:toPartyId 
		xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
			   SEForetag2</eb:toPartyId>
	<eb:toPartyType 
	        xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd">
			   se:foretag2</eb:toPartyType>
	<eb:Manifest 
		xmlns:eb="http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd" 
		  	   eb:version="2.0">
	<eb:Reference xmlns:xlink="http://www.w3.org/1999/xlink" 
			   xlink:href="cid:ebxmlpayload@foretag1.se" xlink:type="simple">
	<eb:Description xml:lang="se">This is a purchase order.</eb:Description>
	<eb:Schema eb:location="urn:se:foretag1:collaborationprocesses:NewOrder.xsd" 
	  	           eb:version="1.0"/></eb:Reference>
	</eb:Manifest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------=_Part_0_21356612.1191939936638
Content-Type: text/xml
Content-ID: cid:ebxmlpayload@foretag1.se

<order>
	<manufacturer>
	Saw corp
	</manufacturer>
	<item>
	Hell saw
	</item>
	<effect>
	30.00
	</effect>
	<price>
	1000.00
	</price>
	<quantity>
	2
	</quantity>
</order>

------=_Part_0_21356612.1191939936638--
This is the error message the webservice is giving:
2007-10-09 16:25:42 [Thread-741  ] <ERROR> <cecid.ebms.spa> <Error in outbox task>
hk.hku.cecid.ebms.spa.task.MessageValidationException: Cannot reconstruct the message 20071009-162537-01817@193.11.251.64 from repository
	by com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
	by java.lang.Exception: Missing Start Boundary, or boundary does not start on a new line
	at hk.hku.cecid.ebms.spa.handler.EbxmlMessageDAOConvertor.getEbxmlMessage(EbxmlMessageDAOConvertor.java:373)
	at hk.hku.cecid.ebms.spa.task.OutboxTask.execute(OutboxTask.java:261)
	at hk.hku.cecid.piazza.commons.module.ActiveThread.run(ActiveThread.java:90)
	at java.lang.Thread.run(Thread.java:619)
Caused by: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to internalize message
	at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:475)
	at com.sun.xml.messaging.saaj.soap.MessageImpl.<init>(MessageImpl.java:278)
	at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.<init>(Message1_1Impl.java:68)
	at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(SOAPMessageFactory1_1Impl.java:62)
	at hk.hku.cecid.ebms.spa.handler.EbxmlMessageDAOConvertor.getEbxmlMessage(EbxmlMessageDAOConvertor.java:367)
	... 3 more
Caused by: java.lang.Exception: Missing Start Boundary, or boundary does not start on a new line
	at com.sun.xml.messaging.saaj.packaging.mime.internet.BMMimeMultipart.getNextPart(BMMimeMultipart.java:237)
	at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:429)
	... 7 more
What do you guys think could be the problem?

/Eddie

Edited by: eddie_swe on Oct 9, 2007 8:37 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 27 2007
Added on Oct 9 2007
2 comments
3,433 views