[Xml-compile] XOP with XML::Compile::WSDL11
Kit Peters
Kit.Peters at broadbean.com
Mon Oct 17 23:27:28 GMT 2016
I tried that, like so (not actual code):
# $xml_content is <Attributes>…</Attributes><Content>…</Content>
my $xop = XML::Compile::XOP->new;
my $content = $xop->bytes( $xml_content, type => ‘text/xml’ );
# Call to submitLargeDocument has been compiled already
$wsdl->call( ‘submitLargeDocument’, parameters => { Document => $content } );
And when I look at the content just before it’s sent to the server, I don’t see that it’s being translated into MTOM. Instead I see:
<?xml version="1.0" encoding="UTF-8"?>
<soap11:Envelope xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/">
<soap11:Header>
<wsa:MessageID xmlns:wsa="http://www.w3.org/2005/03/addressing">Query-Export-5490E6F8-94BE-11E6-9A62-DBB52521867A</wsa:MessageID>
<wsa:ReplyTo xmlns:wsa="http://www.w3.org/2005/03/addressing">
<wsa:Address>http://www.taleo.com/ws/integration/toolkit/2005/07/addressing/queue</wsa:Address>
</wsa:ReplyTo>
<wsa:Action xmlns:wsa="http://www.w3.org/2005/03/addressing">http://www.taleo.com/ws/integration/toolkit/2005/07/action/export</wsa:Action>
</soap11:Header>
<soap11:Body>
<tns0:submitLargeDocument xmlns:tns0="http://www.taleo.com/ws/integration/toolkit/2011/05/management" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tns0:Document><!-- # Long base64 string redacted --> tns0:Document>
</tns0:submitLargeDocument>
</soap11:Body>
</soap11:Envelope>
I expect this is happening because of the following element in the WSDL:
<xsd:element name="submitLargeDocument">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="Document" nillable="true" type="nsm:StreamBody" nsxmlmime:expectedContentTypes="application/octet-stream"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Am I doing the XOP right, and if so, how do I put this into MTOM, rather than just base64 encoding the XML fragment? Do I need to fiddle the WSDL somehow?
KP
--
Kit Peters
Doer of Things, ATS Integrations
D: +1 949 793 8208 M: +1 816 200 0279
On 10/17/16, 04:54, "Mark Overmeer" <mark at overmeer.net> wrote:
* Kit Peters (Kit.Peters at broadbean.com) [161014 15:33]:
> How do I make an XOP request using XML::Compile::WSDL11? I’ve seen
> the XOP unit test in XML::Compile::SOAP, but I’m not sure how to adapt
> that to a compiled call with XML::Compile::WSDL11.
Produce the XOP Include elements and put them in your data-tree on the
usual spot for that data. During the creation of the SOAP message,
it will get attached and replaced by the attachement reference.
--
greetz,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark at Overmeer.net solutions at overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net
More information about the Xml-compile
mailing list