mmtux Posted May 18, 2007 Share Posted May 18, 2007 Hey, I'm trying to build a PHP Web Services client that uses the rpc/literal standard. The problem is, that the envelope it sends to the server is different to what it should send. What it should send: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <authenticate xmlns="services.core.err.de"> <username>server</username> <password>server</password> </authenticate> </soapenv:Body> </soapenv:Envelope> What it actually sends: <?xml version="1.0" encoding="UTF-8"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="services.core.err.de"> <env:Body> <ns1:authenticate> <param0>server</param0> <param1>server</param1> </ns1:authenticate> </env:Body> </env:Envelope> My code: $client_options = array('location' => 'http://www.localhost:8080/Authentication', 'uri' => 'services.core.err.de', 'style' => SOAP_RPC, 'use' => SOAP_LITERAL); $client = new SoapClient(null, $client_options); $call_function = 'authenticate'; $call_params = array('username'=>'server', 'password'=>'server'); $result = $client->__soapCall($call_function, $call_params); Any idea why my code is producing the wrong envelopes? Quote Link to comment https://forums.phpfreaks.com/topic/52041-web-services-rpcliteral-wrong-parameter-packaging/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.