Topic
  • 6 replies
  • Latest Post - ‏2013-01-30T18:11:25Z by etj
etj
etj
108 Posts

Pinned topic Trouble with mtom in outgoing message

‏2013-01-17T19:52:32Z |
Hi,
I'm having trouble transform to mtom in an outgoing message.
Have created a web service proxy with a policy.
The incoming message contain base54 content.

In the wsp, right after the match in the policy, have added a transform for mtom. Have configured xform for 'Use XSLT specified in this action' and 'store:' and 'mtom.xsl'.

The output of the xform is default.

Have configured mtom policy (for the xform) with xpath expression


'//*[local-name()='FileByteArray
']'
to find the base64 data to be mtom encoded. Have mtom policy set to 'Encode' and 'Include content type = on' .

After I send a message and look in the probe to the step after the transform, I see the element FileByteArray was mtom encoded.

<FileByteArray> <xop:Include href=
"cid:98576267-9738-4cd2-b6a3-f777751ac036" xmlns:xop=
"http://www.w3.org/2004/08/xop/include" />

The header content type is {code) 'application/xop+xml; type="application/soap+xml"' {code} and there is now an attachment of type

'application/binary'
. The header content type going into the transform was

'text/xml; charset=UTF-8'
and there is no attachment .

When the customer receives my message, they get the exception ...
Root MIME part must contain non-zero length value for 'charset' parameter in Content-Type header.

Can anyone help me with this issue?
I've been working on it for a while.
Thanks,
El
Updated on 2013-01-30T18:11:25Z at 2013-01-30T18:11:25Z by etj
  • msiebler
    msiebler
    140 Posts

    Re: Trouble with mtom in outgoing message

    ‏2013-01-17T20:01:17Z  
    can we see the full http headers & message sent by datapower?
  • etj
    etj
    108 Posts

    Re: Trouble with mtom in outgoing message

    ‏2013-01-22T21:15:21Z  
    
    Before mtom transform...   Message:   <soapenv:Envelope xmlns:soapenv=
    "http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <Send_File xmlns=
    "https://myother.myomh.ny.gov/somsde/"> <Action>Update</Action> <Metadata> <NYID>5163130L</NYID> <VERSION_NUMBER>1.1</VERSION_NUMBER> <FIRST_NAME>Test</FIRST_NAME> <LAST_NAME>Test</LAST_NAME> <DOCUMENT_TYPE>PBM</DOCUMENT_TYPE> <HEART_DATE>2012-09-18T00:00:00.000-04:00</HEART_DATE> <CONTENT_TYPE>pdf</CONTENT_TYPE> </Metadata> <FileByteArray>JVBERi0xLjYNJeLjz9MNCjI3IDAgb2Jqg0KJSVFT0YNCg==</FileByteArray> </Send_File> </soapenv:Body> </soapenv:Envelope>     Protocol Headers:   name       value Host      18.52.213.42:50772 Accept       application/soap+xml,multipart/related,text
    /* User-Agent        IBM WebServices/1.0 Cache-Control       no-cache Pragma no-cache SOAPAction     "https://myother.myomh.ny.gov/somsde/DCJSServices/Send_File" SAVECONNECTION   6045788251358545284260 IBM-WAS-CLIENT   TRUE Content-Type       text/xml; charset=UTF-8 Date    Fri, 18 Jan 2013 21:41:24 GMT Via       1.1 18.52.213.39:50772,1.1 AQAAANceAAA- X-Client-IP     18.52.213.38 Attachments: none After mtom transform... Message: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body><Send_File xmlns="https://myother.myomh.ny.gov/somsde/"> <Action>Update</Action> <Metadata> <NYID>5163130L</NYID> <VERSION_NUMBER>1.1</VERSION_NUMBER> <FIRST_NAME>Test</FIRST_NAME> <LAST_NAME>Test</LAST_NAME> <DOCUMENT_TYPE>PBM</DOCUMENT_TYPE> <HEART_DATE>2012-09-18T00:00:00.000-04:00</HEART_DATE> <CONTENT_TYPE>pdf</CONTENT_TYPE> </Metadata> <FileByteArray><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:baecb9ad-4ece-465e-b621-f5d57f4336ba"/></FileByteArray> </Send_File> </soapenv:Body> </soapenv:Envelope> Protocol Headers: name    value Host      18.52.213.42:50772 Accept       application/soap+xml,multipart/related,text/* User-Agent        IBM WebServices/1.0 Cache-Control       no-cache Pragma no-cache SOAPAction     "https://myother.myomh.ny.gov/somsde/DCJSServices/Send_File" SAVECONNECTION   6045788251358545284260 IBM-WAS-CLIENT   TRUE Content-Type       application/xop+xml; type="application/soap+xml" Date Fri, 18 Jan 2013 21:41:24 GMT Via       1.1 18.52.213.39:50772,1.1 AQAAANceAAA- X-Client-IP     18.52.213.38 Attachments in Context 'PIPE': uri content-type    content cid:baecb9ad-4ece-465e-b621-f5d57f4336ba        application/binary      (show binary) Click on the Magnifying Glass after Result... Protocol Headers: name      value Host      18.52.213.42:50772 Accept       application/soap+xml,multipart/related,text/* User-Agent        IBM WebServices/1.0 Cache-Control       no-cache Pragma no-cache SOAPAction     "https://my.myomh.ny.gov/somsde/DCJSServices/Send_File" SAVECONNECTION        6045788251358545284260 IBM-WAS-CLIENT   TRUE Content-Type       multipart/related; boundary="13aaf07a-e392-4512-a1a4-feee12a55178"; start-info="application/soap+xml"; type="application/xop+xml" Date    Fri, 18 Jan 2013 21:41:24 GMT Via       1.1 18.52.213.39:50772,1.1 AQAAANceAAA- X-Client-IP     18.52.213.38 Attachments: Attachments in Context 'dpvar_1': uri content-type    content cid:baecb9ad-4ece-465e-b621-f5d57f4336ba        application/binary      (show binary) Local Variables: Variables in Context 'dpvar_1': name     type    value var://local/attachment-manifest   node-set        (show nodeset) <manifest xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dp="http://www.datapower.com/schemas/management"> <package-headers/> <root-headers/> <media-type> <value>multipart/related; boundary="13aaf07a-e392-4512-a1a4-feee12a55178"</value> <type>multipart</type> <sub-type>related</sub-type></media-type> <attachments> <attachment> <uri>cid:baecb9ad-4ece-465e-b621-f5d57f4336ba</uri> <size>26122</size> <header> <name>Content-ID</name> <value><baecb9ad-4ece-465e-b621-f5d57f4336ba></value></header> <header> <name>Content-Transfer-Encoding</name> <value>binary</value></header> <header> <name>Content-Type</name> <value>application/binary</value></header></attachment></attachments></manifest> Context Variables: name  type    value var://context/dpvar_1/attachment-manifest node-set        (show nodeset) var://context/mtom-context-PSDR_mtom_MYOMH_DCJSServices/_extension/variables     node-set        (show nodeset) var://context/SLM-internal-debug/_extension/variables    node-set        (show nodeset) var://context/SLM-internal-debug/input   node-set        (show nodeset) var://context/SLM-internal-debug/policy  node-set        (show nodeset) var://context/transaction/_extension/variables   node-set        (show nodeset) var://context/transaction/encrypting-cert        string  'cert:MIIFZjCCBE6gAwIBAgIJAO1MsABlPh0CMA0GCSqGSIb3DQEBRMA8GA
    
  • etj
    etj
    108 Posts

    Re: Trouble with mtom in outgoing message

    ‏2013-01-22T22:18:37Z  
    Here's a little more info.
    The policy does a transform for the mtom, then a digital sig and then verify.
    The destination url is https and the dest server cert is configured in a ssl proxy profile.
    
    Click on the Magnifying Glass after Result...   Protocol Headers:   name     value Host      18.52.213.42:50772 Accept       application/soap+xml,multipart/related,text
    /* User-Agent        IBM WebServices/1.0 Cache-Control       no-cache Pragma no-cache SOAPAction     "https://myother.myomh.ny.gov/somsde/DCJSServices/Send_File" SAVECONNECTION   6045788251358545284260 IBM-WAS-CLIENT   TRUE Content-Type       multipart/related; boundary="13aaf07a-e392-4512-a1a4-feee12a55178"; start-info="application/soap+xml"; type="application/xop+xml" Date    Fri, 18 Jan 2013 21:41:24 GMT Via       1.1 18.52.213.39:50772,1.1 AQAAANceAAA- X-Client-IP     18.52.213.38 Attachments: Attachments in Context 'dpvar_1': uri content-type    content cid:baecb9ad-4ece-465e-b621-f5d57f4336ba        application/binary      (show binary) Local Variables: Variables in Context 'dpvar_1': name     type    value var://local/attachment-manifest   node-set        (show nodeset) <manifest xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dp="http://www.datapower.com/schemas/management"> <package-headers/> <root-headers/> <media-type> <value>multipart/related; boundary="13aaf07a-e392-4512-a1a4-feee12a55178"</value> <type>multipart</type> <sub-type>related</sub-type></media-type> <attachments> <attachment> <uri>cid:baecb9ad-4ece-465e-b621-f5d57f4336ba</uri> <size>26122</size> <header> <name>Content-ID</name> <value><baecb9ad-4ece-465e-b621-f5d57f4336ba></value></header> <header> <name>Content-Transfer-Encoding</name> <value>binary</value></header> <header> <name>Content-Type</name> <value>application/binary</value></header></attachment></attachments></manifest> Context Variables: name  type    value var://context/dpvar_1/attachment-manifest node-set        (show nodeset) var://context/mtom-context-PSDR_mtom_OMH_DCJSServices/_extension/variables       node-set        (show nodeset) var://context/SLM-internal-debug/_extension/variables    node-set        (show nodeset) var://context/SLM-internal-debug/input   node-set        (show nodeset) var://context/SLM-internal-debug/policy  node-set        (show nodeset) var://context/transaction/_extension/variables   node-set        (show nodeset) var://context/transaction/encrypting-cert        string  'cert:MIIFZjCCBE6gAwIBAgIJAO1MsABlPh0CMA0GCSqGSIb3DQEBRMA8GA Message: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1"> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-0e99429e-42b8-4d05-a775-9943f14ca0e2"> <wsu:Created>2013-01-18T21:41:24Z</wsu:Created> <wsu:Expires>2013-01-18T21:46:24Z</wsu:Expires> </wsu:Timestamp> <wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-15a55289-2c9a-4430-bf7c-6fc1f7b13823" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3">MIIFZjCCBE6gAwIBAgIJAO1MsABlPh0CMA4PC9YY/</wsse:BinarySecurityToken> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI="#Timestamp-0e99429e-42b8-4d05-a775-9943f14ca0e2"> <Transforms> <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>59tT8A8VPoA1iKqYjnCacE4aN1I=</DigestValue> </Reference> <Reference URI="#Body-a4d6b0e6-dafc-4839-83da-05eb0a6b2cef"> <Transforms> <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </Transforms> <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>RWUoPGab/ztbWAI4+P7vMaeJW+s=</DigestValue> </Reference> </SignedInfo> <SignatureValue>GDWJku/pSqvKF2LpWjzT2iKUW+w2Gm0bjw==</SignatureValue> <KeyInfo> <wsse:SecurityTokenReference xmlns=""> <wsse:Reference URI="#SecurityToken-15a55289-2c9a-4430-bf7c-6fc1f7b13823" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/> </wsse:SecurityTokenReference> </KeyInfo> </Signature> </wsse:Security> </soapenv:Header> <soapenv:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Body-a4d6b0e6-dafc-4839-83da-05eb0a6b2cef"> <Send_File xmlns="https://my.omh.ny.gov/somsde/"><Action>Update</Action> <Metadata> <NYID>5163130L</NYID> <VERSION_NUMBER>1.1</VERSION_NUMBER> <FIRST_NAME>Test</FIRST_NAME> <LAST_NAME>Test</LAST_NAME> <DOCUMENT_TYPE>PBM</DOCUMENT_TYPE> <HEART_DATE>2012-09-18T00:00:00.000-04:00</HEART_DATE> <CONTENT_TYPE>pdf</CONTENT_TYPE></Metadata> <FileByteArray><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:baecb9ad-4ece-465e-b621-f5d57f4336ba"/> </FileByteArray> </Send_File> </soapenv:Body> </soapenv:Envelope> Protocol Headers: name     value Host      18.52.213.42:50772 Accept       application/soap+xml,multipart/related,text/* User-Agent        IBM WebServices/1.0 Cache-Control       no-cache Pragma no-cache SOAPAction     "https://myother.myomh.ny.gov/somsde/DCJSServices/Send_File" SAVECONNECTION   6045788251358545284260 IBM-WAS-CLIENT   TRUE Content-Type       multipart/related; boundary="13aaf07a-e392-4512-a1a4-feee12a55178"; start-info="application/soap+xml"; type="application/xop+xml" Date    Fri, 18 Jan 2013 21:41:24 GMT Via       1.1 18.52.213.39:50772,1.1 AQAAANceAAA- X-Client-IP     18.52.213.38 Attachments in Context 'dpvar_1': uri      content-type    content cid:baecb9ad-4ece-465e-b621-f5d57f4336ba        application/binary      (show binary) Variables in Context 'dpvar_1': name      type    value var://local/attachment-manifest   node-set        (show nodeset) <manifest xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dp="http://www.datapower.com/schemas/management"> <package-headers/> <root-headers/> <media-type> <value>multipart/related; boundary="13aaf07a-e392-4512-a1a4-feee12a55178"</value> <type>multipart</type> <sub-type>related</sub-type></media-type> <attachments> <attachment> <uri>cid:baecb9ad-4ece-465e-b621-f5d57f4336ba</uri> <size>26122</size> <header> <name>Content-ID</name> <value><baecb9ad-4ece-465e-b621-f5d57f4336ba></value></header> <header> <name>Content-Transfer-Encoding</name> <value>binary</value></header> <header> <name>Content-Type</name> <value>application/binary</value></header></attachment></attachments></manifest> Context Variables: name  type    value var://context/dpvar_1/attachment-manifest node-set        (show nodeset) var://context/mtom-context-PSDR_mtom_OMH_DCJSServices/_extension/variables       node-set        (show nodeset) var://context/SLM-internal-debug/_extension/variables    node-set        (show nodeset) var://context/SLM-internal-debug/input   node-set        (show nodeset) var://context/SLM-internal-debug/policy  node-set        (show nodeset) var://context/transaction/_extension/variables   node-set        (show nodeset) var://context/transaction/encrypting-cert        string  'cert:MIIFZjCCBE6gAwIBAgIJAO1MsABlP
    
  • etj
    etj
    108 Posts

    Re: Trouble with mtom in outgoing message - Help ,Help, Help

    ‏2013-01-30T16:32:47Z  
    Help ,Help, Help

    For an outgoing datapower MTOM message, my customer is getting this error when he receives the MTOM message...
    Root MIME part must contain non-zero length value for 'charset' parameter in Content-Type header

    Can someone help me please?
    Thanks,
    El
  • Daviiid
    Daviiid
    284 Posts

    Re: Trouble with mtom in outgoing message

    ‏2013-01-30T16:42:43Z  
    Hello

    I'm not sur it resolved your probleme but maybe you can change this value Include charset in response-type and set it to on

    Objects/Service Configuration/Web Service Proxy. Select your WSD and click on Proxy Settings tab
  • etj
    etj
    108 Posts

    Re: Trouble with mtom in outgoing message

    ‏2013-01-30T18:11:25Z  
    I did turn that "Include charset in response-type" on.
    It looks like the CDATA stuff needs to be removed and perhap the first 'Content-Type:' needs to include ' charset=utf-8; ' .
    The message looks like this at the customer site...
    
    <![CDATA[   --2a32dbda-786d-420c-9f54-7596106aeb42 Content-Type: application/xop+xml; type=
    "application/soap+xml" Content-Transfer-Encoding: binary   <?xml version=
    "1.0" encoding=
    "UTF-8"?> <soapenv:Envelope xmlns:soapenv=
    "http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsse:Security soapenv:mustUnderstand=
    "1" xmlns:wsse=
    "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp wsu:Id=
    "Timestamp-8dee6d29-561d-427e-a8ff-4bfa549f47bc" xmlns:wsu=
    "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2013-01-30T17:36:48Z</wsu:Created><wsu:Expires>2013-01-30T17:41:48Z</wsu:Expires></wsu:Timestamp><wsse:BinarySecurityToken wsu:Id=
    "SecurityToken-fb7a7047-8b60-4bff-a2f3-e3e668bd7ad3" EncodingType=
    "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType=
    "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" xmlns:wsu=
    "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">MIIFZjCCBE6gAwIBAWVMgRGl2aXNpb24gb2YgQ3JpbWluYWwgSnVzdGljZSBTZXJ2aWNlczEyMDAGA1UECxMpTllTIERpdmlzaW9uIG9mIENyaW1pbmFsIEp1c3RpY2UgU2VydmljZXMxITAfBgNVBAMUGGRwb3dlcl9kZXYxLmRjanMubnlzLmdvdjE4MDYGCSqGSIb3DQEJARYxyrSdZLUIC+49PwskwKX7WlgpdExTYZltg1XWWEH4xRsymSMiGykTDrRKbm2XwL9cdhQpWgQu/zs7i4bTzFuivHhBdusYCn2nEc0qPiaoGD8kcRyJ3LeU2OhDJHaqUOPr94ho9J1AtiQjM0bW4QoFNoQdN16jlMGyqSkNnwm15gJMzKGxEE73qET9319mdxBvND4S1wlOYqZ4F2nBD/GNN77N4PC9YY/</wsse:BinarySecurityToken><Signature xmlns=
    "http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm=
    "http://www.w3.org/2001/10/xml-exc-c14n#"/> <SignatureMethod Algorithm=
    "http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <Reference URI=
    "#Timestamp-8dee6d29-561d-427e-a8ff-4bfa549f47bc"> <Transforms> <Transform Algorithm=
    "http://www.w3.org/2001/10/xml-exc-c14n#"/> </Transforms> <DigestMethod Algorithm=
    "http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>vJeMwsXrWgVs2+V1TX3DwBIp1xw=</DigestValue> </Reference> <Reference URI=
    "#Body-f4ca6a66-c3da-4130-a476-a06b3a6c229f"> <Transforms> <Transform Algorithm=
    "http://www.w3.org/2001/10/xml-exc-c14n#"/> </Transforms> <DigestMethod Algorithm=
    "http://www.w3.org/2000/09/xmldsig#sha1"/> <DigestValue>LC7chUbDFuZDvg8m3b3x/mntqtA=</DigestValue> </Reference> </SignedInfo> <SignatureValue>kUiMnoimX3TcFjmx8j0Mpd5TdUMMXk1HL7eTGIhDyAHVetalnjLIOG4GOkN7tLJqDW60N0Fnf70AnxzA8f014u2qLjcwacVNGotzw0lG
    //RGXKorUwAULdwNzT9zsArLFNa7hBQyBungXmxjP3/j8Y5ltwg87hJrfo5plyMfFGEjJBs2EdPBEk9e5EZmw2j2TtuCi1XOu3lhmsshqamdg/ErjIQ3GnDW7mgbPtg==</SignatureValue><KeyInfo><wsse:SecurityTokenReference xmlns=""><wsse:Reference URI="#SecurityToken-fb7a7047-8b60-4bff-a2f3-e3e668bd7ad3" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference></KeyInfo></Signature></wsse:Security></soapenv:Header><soapenv:Body wsu:Id="Body-f4ca6a66-c3da-4130-a476-a06b3a6c229f" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><Send_File_Parole xmlns="https://my.omh.ny.gov/somsde/"><Action>New</Action><Metadata><NYSID>3090948M</NYSID><VERSION_NUMBER>1.0</VERSION_NUMBER><FIRST_NAME>Mark</FIRST_NAME><LAST_NAME>Murphy</LAST_NAME><DOCUMENT_TYPE>PVM</DOCUMENT_TYPE><HEARING_DATE>2010-09-18T00:00:00.000-04:00</HEARING_DATE><CONTENT_TYPE>pdf</CONTENT_TYPE></Metadata><FileByteArray><xop:Include href="cid:e8de60b0-7d81-4989-9121-0bbe421c4ec4" xmlns:xop="http://www.w3.org/2004/08/xop/include"/></FileByteArray></Send_File_Parole></soapenv:Body></soapenv:Envelope> --2a32dbda-786d-420c-9f54-7596106aeb42 Content-ID: <e8de60b0-7d81-4989-9121-0bbe421c4ec4> Content-Transfer-Encoding: binary Content-Type: application/binary   %PDF-1.6 % 27 0 obj <</Linearized 1/L 26122/O 29/E 9553/N 6/T 25772/H [ 455 177]>> endobj 33 0 obj <</DecodeParms<</Columns 4/Predictor 12>>/Filter/FlateDecode/ID[<4AAE03FDA394214E8408AF400790F9B1><F4CF60795FA6FE4EAD069A3EEF95B166>]/Index[27 11]/Info 26 0 R/Length 52/Prev 25773/Root 28 0 R/Size 38/Type/XRef/W[1 2 1]>>stream h bbd``b`