Forum Moderators: coopster

Message Too Old, No Replies

Doubt with NuSoap call

is the call similar to the sample provided?

         

guarriman

3:59 pm on Feb 5, 2008 (gmt 0)

10+ Year Member



Hi.

I want to make a SOAP call via NuSoap. This is the call sample provided by the webservice:


POST /foo/getinfo.asp HTTP/1.1
Host: webservice.domain.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.domain.com/webservices/getInfo"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<UserCredentials xmlns="http://www.domain.com/webservices/">
<UserName>string</UserName>
<Password>string</Password>
</UserCredentials>
</soap:Header>
<soap:Body>
<GetInfo xmlns="http://www.domain.com/webservices/" />
</soap:Body>
</soap:Envelope>

I tried with this PHP code


$soapaction = "http://www.domain.com/webservices/getInfo";
$wsdl = "https://webservice.domain.com/foo/getInfo";
$client = new soapclient($wsdl);

$mysoapmsg = $client->serializeEnvelope('<UserCredentials xmlns="http://www.domain.com/webservices/">
<UserName>John</UserName>
<Password>#*$!x</Password>
</UserCredentials>','',array(),'document', 'literal');

$response = $client->send($mysoapmsg, $soapaction);
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';

But I received a "not valid user" response. Is this a valid request similar to the one suggested by the webservice?

Thank you very much.

dreamcatcher

7:34 pm on Feb 14, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi guarriman,

You`ve not had any replies to your problem. Have you had any success finding a solution?

dc