The following is intended to outline my experience and exposure to PeopleSoft’s Technologies. This is not a training document. References in this blog have been compiled from various sources like Oracle webcasts, blogs, and prototypes that I have developed over time.
Saturday, March 26, 2016
Sending and Receiving MTOM-encoded binary data
PeopleSoft supports the MTOM protocol for sending and
receiving binary data using service operations. While you can send and receive
binary data using SOAP, doing so requires that you Base64-encode the data,
which can increase message size by 33 percent or more. The MTOM protocol
enables you to send and receive binary data in its original binary form,
without any increase in size due to encoding.
For sending or receiving MTOM-encoded binary data, we have
to use message segments to store the data. The SegmentContentType property of
the message object is used to set or read the content type of each message
Following is a test that I did to send a XML file as an
attachment in a SOAP message and then read the attachment that is sent by the
3rd party system that I am interacting with. I am running PT 8.53.22.
Request message is as shown below. For this test I am
storing this in a html object called as MY_MESSAGE but this can be
generated dynamically as needed using SOAPDoc or XMLDoc classes. The request
message defined on the service operation is nonrowset based.
document.xml is my payload which I have created in a
different routine and I am just using it here. Its just like creating any other
XML file in PeopleSoft. Payload can be a binary file like a pdf or a image
Sender node is my default local node and receiving node is
the delivered WSDL_NODE. You can always create a custom receiving node if
needed. Routing is using local gateway and HTTPTARGET connector. Under routing,
connector properties content-type is set to text/xml as my payload is a xml
file, HTTPPROPERTY MTOM is set to Y, METHOD is POST, SOAPUpContent is set to N
as I have already built the SOAP wrapper in my html object above. If you need
IB to create the wrapper then set this property to Y. Provided PRIMARYURL to
destination 3rd party application. Took all other defaults.
Response message defined on the service operation is a non-rowset based message. Sender node is the default local node and receiving node is WSDL_NODE. Using local gateway and HTTPTARGET connector. Setting HEADER properties Content-Type to text/xml as the response attachment that I am receiving is a xml file, sendUncompressed is Y, HTTPPROPERTY Method is POST and SOAPUpContent is Y and finally the PRIMARYURL to the 3rd party service.
On the weblogic webserver, in the integrationGateway.properties file enable the MTOM Listening Connectors.