good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
SOAP, WSDL and namespacesby tangent (Parson) |
on Mar 10, 2016 at 16:53 UTC ( [id://1157322]=perlquestion: print w/replies, xml ) | Need Help?? |
tangent has asked for the wisdom of the Perl Monks concerning the following question:
Venerable Monks,
I am trying to call a web service using SOAP with a WSDL using either XML::Compile or SOAP::Lite... Using XML::Compile This works fine, but I have to add security headers which are not defined in the WSDL - you can see a solution at the FAQ but I can't work out how to implement it. Has anyone managed to use this example? Now I can add headers easily enough with SOAP::Lite, but I have a problem with that too. Using SOAP::Lite This doesn't work because it is not setting the namespace in the setTransaction tag. I found a solution by adding this line: But I don't want to hard code the URL as I feel that defeats the purpose of the WSDL - what if it changes down the line? Is there a way to retrieve that namespace URL from the WSDL so I can add it dynamically? Or some other way to get SOAP::Lite to add it properly? Just for reference, I have a PHP example which works properly (and no issues adding headers):
Back to
Seekers of Perl Wisdom
|
|