Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: Converting StringValue (base64binary) in SOAP request to SOAP attachment to receiver

$
0
0

Hello!! Bhavin, All

 

Would you know how to cast attachment to MTOM: XOP Include - the below UDF is creating the attachment.

 

so that the final output come as below:

-<ns7:AttachmentDataHandler> (one of the fields on the XML message)

 

<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:cccb625678-ba29-412b-984a-78927caab5ea@example.jaxws.sun.com"/>

 

</ns7:AttachmentDataHandler>

 

so the below UDF - I am hoping can be updated to have the XOP Include to the AttachmentDataHandler Field ?! - Is this posssible using UDF - please advice!!

 

Your help is greatly appreciated!!

 

Thank you,

Ritu

 

GlobalContainer globalContainer = container.getGlobalContainer();

String decodedContent="";

byte[] decodedValue = DatatypeConverter.parseBase64Binary(Content);

decodedContent=new String(decodedValue);

 

 

byte[] convertedInput = decodedContent.getBytes();

OutputAttachments outputAttachments = globalContainer.getOutputAttachments();

Attachment outputAttachment;

String contentType= "application/octet-stream";

outputAttachment = outputAttachments.create("Myfile.xml", contentType, convertedInput);

outputAttachments.setAttachment(outputAttachment);

return "1";


Viewing all articles
Browse latest Browse all 9052

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>