munnikd Posted April 30, 2010 Share Posted April 30, 2010 Hi, I trying to call a .Net webservice but get the following error: Array ( [faultcode] => soap:Client [faultstring] => Object reference not set to an instance of an object. [detail] => ) Array here is the wsdl file of the webservice I'm trying to call: POST /WebSetup1/CAIRegister.asmx HTTP/1.1 Host: 172.18.22.181 Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://tempuri.org/Execute" <?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:Body> <Execute xmlns="http://tempuri.org/"> <userContext> <Username>string</Username> <UserPassword>string</UserPassword> <ApplicationMnemonic>string</ApplicationMnemonic> <ApplicationPassword>string</ApplicationPassword> </userContext> <registrationRequest> <Identifiers xmlns="http://www.ampath.co.za/SOAPheaders"> <IdentifiersItem>string</IdentifiersItem> <IdentifiersItem>string</IdentifiersItem> </Identifiers> <Type xmlns="http://www.ampath.co.za/SOAPheaders">string</Type> <FirstName xmlns="http://www.ampath.co.za/SOAPheaders">string</FirstName> <LastName xmlns="http://www.ampath.co.za/SOAPheaders">string</LastName> <EmailAddress xmlns="http://www.ampath.co.za/SOAPheaders">string</EmailAddress> <ContactNumber xmlns="http://www.ampath.co.za/SOAPheaders">string</ContactNumber> <Status xmlns="http://www.ampath.co.za/SOAPheaders">string</Status> </registrationRequest> </Execute> </soap:Body> Here is my code to call the webservice: $c = new soapclient("http://172.18.22.181/WebSetup1/CAIRegister.asmx?wsdl",true); $err = $c->getError(); if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; } $rt = $c->call('Execute',$userContext,$registrationRequest); print_r($rt); ANY IDEAS ??? Link to comment https://forums.phpfreaks.com/topic/200281-nusoap-webservice-help-urgent/ Share on other sites More sharing options...
Ken2k7 Posted April 30, 2010 Share Posted April 30, 2010 Straight from the Forum Guidelines & Rules located here: http://www.phpfreaks.com/page/rules-and-terms-of-service 2. Users will not mark their post as being "URGENT" by either making the post ALL CAPS or adding any hint that they need it done Quick or ASAP. All posts are treated equal, your post is no more important than any other user's post on this forum. If it is "URGENT" pay someone to do it Link to comment https://forums.phpfreaks.com/topic/200281-nusoap-webservice-help-urgent/#findComment-1051055 Share on other sites More sharing options...
munnikd Posted April 30, 2010 Author Share Posted April 30, 2010 Thank you for the reply but I still need an answer on my question Link to comment https://forums.phpfreaks.com/topic/200281-nusoap-webservice-help-urgent/#findComment-1051096 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.