I'm trying to write a SOAP client with WS security to be implemented on a CGI page. I am able to create a client using the ->service("wsdlURL") method, and my request gets to the server, but it returns a 404 error. I know from reading the log on the server side that my request is getting to the server, but it is failing to correctly map to an endpoint. I can see the raw XML from the request, and I noticed that in the Body of the request, the format is:
<SOAP-ENV:Body>
<namespace:myRemoteFunctionName>
... parameters ...
<namepsace:/myRemoteFunctionName>
</SOAP-ENV:Body>
I already have two working methods of sending SOAP requests: one through soapUI, and the other through a PHP client I got working. I looked at the raw XML of successful requests from both of these, and I saw:
<SOAP-ENV:Body>
<namespace:myRemoteFunctionNameRequest>
... parameters ...
<namepsace:/myRemoteFunctionNameRequest>
</SOAP-ENV:Body>
This is the only non-trivial difference I can find between the XML generated by Perl and the other two clients. Is it possible that this is what is causing my problem? Here's my code for calling the function, where $Security is my WS-Security Header (some code irrelevant to this issue is omitted):