Author |
Message
|
vickas |
Posted: Thu Aug 14, 2014 3:41 am Post subject: sending 'n' no of attachmnts (MTOM )along with SOAP request |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
HIe All ,
Am Working on an Assingment which asks me to send some attachements (say .jpeg) along with the SOAP request . I have used a sample WSDL which supports MTOM .
using SOAPUI (WSDL - with only 1 element of type="base64Binary" xmime:expectedContentTypes="image/jpeg" ) , am able to send an attachment (.jpeg) to the SOAP INPUT node and placing onto my file system & thats fine.
But i find problem when i try to attach more than one attachment. (WSDL - with 4 elements of type="base64Binary" xmime:expectedContentTypes="image/jpeg" ).
I have set the MTOM property to 'true' & browsed all the attachments but it says " java.lang.IllegalArgumentException: No attachment found for content ID '.jpg'" .
It shows an exception only for the 2nd element saying "no attachment found " n if absent then no attachment found for 3rd n if absent , then for 4th element .
how do i send n number of attachments (MTOM) along with the SOAP request ??
what might be the problem ? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 14, 2014 5:00 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The problem is in how you have constructed the message tree. |
|
Back to top |
|
 |
vickas |
Posted: Thu Aug 14, 2014 6:07 am Post subject: |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
@ Mqjeff , thnx for your reply .
this is how i have requested from SOAPUI ,
Below is the image which shows the request and error response
and here is the WSDL
Code: |
<definitions>
<types>
<complexType name="DataType">
<sequence>
<element name="docName1" type="string"/>
<element name="docName2" type="string"/>
<element name="docName3" type="string"/>
<element name="docName4" type="string"/>
<element name="docUrl1" type="string"/>
<element name="docUrl2" type="string"/>
<element name="docUrl3" type="string"/>
<element name="docUrl4" type="string"/>
<element name="doc1" type="base64Binary" xmime:expectedContentTypes="image/jpeg"/>
element name="doc2" type="base64Binary" xmime:expectedContentTypes="image/jpeg"/>
<element name="doc3" type="base64Binary" xmime:expectedContentTypes="image/jpeg"/>
<element name="doc4" type="base64Binary" xmime:expectedContentTypes="image/jpeg"/>
</sequence>
</complexType>
<element name="MTOMIn" type="s:DataType"/>
.
.
.
</types>
<message name="MTOMInRequest">
<part name="data" element="s:MTOMIn"/>
</message>
.
.
.
<operation name="MTOMIn">
<input message="tns:MTOMInRequest"/>
<output message="tns:MTOMInResponse"/>
</operation>
.
.
.
</definitions> |
please tell me where am wrong ? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Aug 14, 2014 6:12 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Sorry, I misread your post, I thought you were using a SOAPRequest node, not a SOAPInput node. |
|
Back to top |
|
 |
vickas |
Posted: Thu Aug 14, 2014 6:16 am Post subject: |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 14, 2014 6:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Note from the admin:
Please do not insert spaces before or after the url. The tag should be right before and right after the url.
like ...img]url[/img... or ...url]http........html[/url...
Thanks
As for the MTOM type what does the tree look like right after the SOAP input node (and before the SOAP extract node)... _________________ MQ & Broker admin |
|
Back to top |
|
 |
vickas |
Posted: Thu Aug 14, 2014 8:45 am Post subject: |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
Hie fjb ,
Quote: |
As for the MTOM type what does the tree look like right after the SOAP input node (and before the SOAP extract node)... |
The request isn't reaching the flow when i try to process more than one image . Its resulting to an error response which you can have find in the above image !
please tel me where am i going wrong |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Aug 14, 2014 10:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Are you even sure it is leaving SOAPUI? Your document doesn't look like SOAP with attachments to me... Where is the MIME Format?
Your WSDL looks more like an xsd than a WSDL. Are you sure you have correctly defined a SOAP document with attachments?
See This google search  _________________ MQ & Broker admin |
|
Back to top |
|
 |
vickas |
Posted: Mon Aug 18, 2014 4:27 am Post subject: |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Aug 18, 2014 4:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Looks like the attachment for jellyfish.jpg is not being recognized. Either a typo somewhere in your definition or wsdl or filename or... and if the request is not reaching the flow that would mean that either you have the wrong url in SOAPUI, or the reply you see comes from SOAPUI because your message does not conform to the wsdl and never made it out the door.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
vickas |
Posted: Wed Aug 20, 2014 3:26 am Post subject: |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
HIe Fjb , Thnx for your reply!
Quote: |
if the request is not reaching the flow that would mean that either you have the wrong url in SOAPUI, |
The url is correct and am able to succesfully process a single attachment(.jpg) using the same WSDL file (here the request message has only one element in WSDL)
Quote: |
Either a typo somewhere in your definition or wsdl or filename or... and reply you see comes from SOAPUI because your message does not confirm to the wsdl and never made it out the door |
As u Said , The request isnt reaching the flow when i attach multiple attachments . since it was complaining that "No attachment found for jellyfish.jpg" (If you observe , it only complains for other than the first attachment) I attached the same(first - Desert.jpg)
attachment 4 times and tried hitting the service and i wasnt able to hit.
can you please route me to a certain place where i can find a WSDL supporing multiple attachments ?? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 20, 2014 5:14 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried the google search I mentioned earlier?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
vickas |
Posted: Wed Aug 20, 2014 5:29 am Post subject: |
|
|
Centurion
Joined: 18 Aug 2013 Posts: 126
|
Yes but Wasnt that lucky enough !!! . plz help me @ Fjb |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 20, 2014 6:12 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Use TCP/IP Monitor in your Toolkit to set up an intercepter between soapui and the broker.
Then you can find out if SOAPUI is sending the request or not, and see what it looks like before it gets to broker. |
|
Back to top |
|
 |
satheesh.k |
Posted: Wed Nov 05, 2014 4:52 am Post subject: |
|
|
Novice
Joined: 15 Jan 2014 Posts: 10
|
In the sopa UI properties set the Disablemultiparts = 'false' then u can send mutli attachements |
|
Back to top |
|
 |
|