Join wMUsers | Blog at wMUsers | Edit my wMUsers Profile | Site Map | webMethods Jobs |For Employers

wMUsers  
  #1  
Old 11-20-2008, 06:29
mcarlson's Avatar
mcarlson mcarlson is offline
Admin
 
Join Date: Jan 2002
Posts: 3,895
Thanks: 27
Thanked 56 Times in 39 Posts
Default Advantage Technical Article - SOAP MTOM Support in IS 7.1.x

Originally posted as Advantage Article ID 1614326864
Quote:
Issue

explain how MTOM attachments should work in IS 7.1.2.
Resolution

To use MTOM in an IS 7.1 Provider service you would do it much like the MTOMSample in the WMSoapSamples.

Your input document to the Service that you are using as the Operation of the Web Service would have it's normal Non-MTOM fields defined along with the 2 String fields, theSignedForm and theCrashPhoto (from your example shown below). Those 2 string fields would be defined in the IS DocumentType record with a Constraint property that sets the ContentType to base64Binary. Similar to what the inputData field does in the service in receiveAndSendMtomAttachments MTOM example.

Code:
<?xml version='1.0' ?> 
<SOAP-ENV:Envelope 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
<SOAP-ENV:Body> 
<claim:insurance_claim_auto id="insurance_claim_document_id" 
xmlns:claim="http://schemas.risky-stuff.com/Auto-Claim"> 
<theSignedForm href="cid:claim061400a.tiff@claiming-it.com"/> 
<theCrashPhoto href="cid:claim061400a.jpeg@claiming-it.com"/> 
<!-- ... more claim details go here... --> 
</claim:insurance_claim_auto> 
</SOAP-ENV:Body> 
</SOAP-ENV:Envelope> 
  
--MIME_boundary 
Content-Type: image/tiff 
Content-Transfer-Encoding: base64 
Content-ID: <claim061400a.tiff@claiming-it.com> 
  
...Base64 encoded TIFF image... 
--MIME_boundary 
Content-Type: image/jpeg 
Content-Transfer-Encoding: binary 
Content-ID: <claim061400a.jpeg@claiming-it.com>

When your client formats and sends the request with a valid MTOM usage to use attachments for both of those fields, the client side code would replace the content of the field in the request with the correct MTOM/XOP include statement referring to the actual attachment part containing the data.


Something like

Code:
 <inputData><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:45f7daa62eca20d911d455d3530"></xop:Include>
Where the href= is referring to the ream Mime attachment:

Something like:

Code:
------=_Part_7_29473574.1227024350026 

content-type: application/octet-stream 

content-transfer-encoding: binary 

content-id: <45f7daa62eca20d911d455d3530> 

hi how are you?
When this MTOM request is received by the IS Soap Processor, the processor will automatically extract the data from the MIME attachments and replace the XOP include placeholders in the request with the data contained in the referenced mime part. What the underlying service receives would be the base64Binary string representing the data in the MIME attachment. The underlying service simply accesses the field from the Document type, like it would any other field with Flow Map steps etc. The data in the field at this point is the base64Binary encoded string. To decode the Base64Binary string back to its true binary form, you could use the pub.string:base46Decode service to convert the encoded string back into its binary object representation.

Because the Provider Web Service is using MTOM/XOP, all of the MIME and/or attachment access is automatically performed by the IS Soap Processor along with the rest of the SOAPMessage unmarshalling. The underlying IS services do not have to bother with MIME attachments, or even soapMessages. They simply make use of IS Document Types that have fields with base64Binary constraints.

Hope this helps to explain how MTOM attachments should work in IS 7.1.2.
__________________
Conneva, Inc - webMethods Architecture Consulting


Reply With Quote
Advertisement
Reply

Bookmarks

Tags
mime, mtom, soap, soap with attachments, web services


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
6.1 Support Extension Announcement mcarlson webMethods and Integration News 2 01-08-2009 07:04
Advantage Technical Article - Web services changes mcarlson SOA Service Development (Web Services, SOAP and WSDL) 0 11-20-2008 06:24
wM 7.1 MTOM enabled SOAP Webservices phiberopticz SOA Service Development (Web Services, SOAP and WSDL) 3 11-19-2007 09:31
Why does SOAP Message Handler create an empty soapResponseData object? sandeeppotdar SOA Service Development (Web Services, SOAP and WSDL) 3 10-08-2007 05:44
SOAP Faults using an Access Controlled Custom SOAP Processor charper SOA Service Development (Web Services, SOAP and WSDL) 14 11-14-2006 15:36


All times are GMT -6. The time now is 09:58.


.
All Content Copyright ©2002-2009, Conneva, Inc. DBA wMUsers.Com

wMUsers is an independent organization and is not sponsored in any manner by Software AG or webMethods, Inc.

Page generated in 0.07417 seconds with 15 queries