<div dir="ltr">Resending now that I've registered on the list.<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 1, 2014 at 5:48 PM, Robert Woodard <span dir="ltr"><<a href="mailto:robt.woodard@gmail.com" target="_blank">robt.woodard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<p class="MsoNormal">I’m having a terrible time trying to figure out how to get
the WSS SOAP header out of my compiled client.<span>
</span>For some reason, doing this:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">use
XML::Compile::WSDL11;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">use
XML::Compile::SOAP11;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">use
XML::Compile::Transport::SOAPHTTP;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">use
XML::Compile::C14N::Util qw/C14N_EXC_NO_COMM/;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">use
XML::Compile::Util qw/pack_type/;</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">my
$wsdl = XML::Compile::WSDL11->new(“TicketManagement.wsdl");</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">my
$createTroubleTicket = $wsdl->compileClient( 'createTroubleTicket' );</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">my
@ticket_params = (</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><span> </span>parameters => {</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><span> </span>TroubleTicket => $ticket_xml,</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><span> </span>}</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">);</span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">my
($response, $trace) = $createTroubleTicket->( @ticket_params );</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Yields this SOAP object:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><?xml version="1.0"
encoding="UTF-8"?></p>
<p class="MsoNormal"><SOAP-ENV:Envelope xmlns:SOAP-ENV="<a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>"></p>
<p class="MsoNormal"><span>
</span><SOAP-ENV:Header></p>
<p class="MsoNormal"><span>
</span><wsse:Security
xmlns:wsse="<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</a>"
SOAP-ENV:mustUnderstand="1"/></p>
<p class="MsoNormal"><span>
</span></SOAP-ENV:Header></p>
<p class="MsoNormal"><span>
</span><SOAP-ENV:Body></p>
<p class="MsoNormal">[…]</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">And the web service responds (using Dumper($response) to
dump the response object):</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Fault => {</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>faultstring => 'MustUnderstand headers:
[{<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd%7DSecurity" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security</a>]
are not understood.',</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>faultcode =>
'{<a href="http://schemas.xmlsoap.org/soap/envelope/%7DMustUnderstand" target="_blank">http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand</a>',</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>_NAME => 'error'</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>},</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>wsse_Security => {},</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>error => {</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>reason => 'MustUnderstand headers:
[{<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd%7DSecurity" target="_blank">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security</a>]
are not understood.',</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>class => [</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span>
</span>'<a href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a>',</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>'MustUnderstand'</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>],</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>code =>
'{<a href="http://schemas.xmlsoap.org/soap/envelope/%7DMustUnderstand" target="_blank">http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand</a>'</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><span> </span>}</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I am at my wits’ end trying to figure out how to get rid of
that SOAP header…or to get mustUnderstand set to zero.<span> </span>Turning on WSS security on the service is not
an option, unfortunately.</p><p class="MsoNormal"><br></p><p class="MsoNormal">Any suggestions?</p><p class="MsoNormal"><br></p><p class="MsoNormal">Sincerely,</p><p class="MsoNormal"><br></p><p class="MsoNormal">Rob Woodard</p><p class="MsoNormal"><a href="mailto:robt.woodard@gmail.com" target="_blank">robt.woodard@gmail.com</a><br></p>
</div>
</blockquote></div><br></div></div>