NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Consuming a .NET WSDL web service with php nusoap client


Joined: 24 Oct 2015
Posts: 1
Reply with quote
Hello I need to consume a WSDL web service but the required envelope for the request is different from the one generated by nusoap

This is what i should properly request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:ExecuteLogin>
<tem:EmailAddress>email@email.com</tem:EmailAddress>
<tem:Password>password</tem:Password>
</tem:ExecuteLogin>
</soapenv:Body>
</soapenv:Envelope>

However, Nusoap requests this

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns8794:ExecuteLogin xmlns:ns8794="http://xml.dev.hoteldo.com/send">
<EmailAddress xsi:type="xsd:string">email@email.com</EmailAddress>
<Password xsi:type="xsd:string">password</Password>
</ns8794:ExecuteLogin></SOAP-ENV:Body></SOAP-ENV:Envelope>


How can I change the SOAP-ENV to soapenv , and ns8794 to tem?

This is my code:


Code:

$client = new nusoap_client("http://xx.xxx.xx.xxx/CezanneRecruitmentWCF/Applicant.svc?wsdl.xml");
$client->soap_defencoding = 'UTF-8';


$params = array(
"EmailAddress" => "email@email.com" ,
"Password" => "password"
);


$result = $client->call("ExecuteLogin", $params );



I'd be immensely grateful to anyone suggesting a few ideas about this.
Thank you
E
View user's profileFind all posts by floyd0987Send private message
Consuming a .NET WSDL web service with php nusoap client
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic