I use nusoap to connect to the .net service, but I get the error message "Note: Undefined variable: HEADER in C: \ xampplite \ htdocs \ newsoap \ searchwwcc.php on line 54
Fatal error: throw SoapFault exception: function [Client] ("serializeEnvelope") is not a valid method for this service in C: \ xampplite \ htdocs \ newsoap \ searchwwcc.php: 54 Stack trace: # 0 [internal function]: SoapClient → __ call ('serializeEnvelo ...', Array) # 1 C: \ xampplite \ htdocs \ newsoap \ searchwwcc.php (54): SoapClient-> serializeEnvelope ('
Here is the link code I'm using
require_once('lib/nusoap.php');
$serverpath ='https://service.website.net/ws/bridge.asmx?wsdl';
$SOAPClient = new soapclient($serverpath);
$SOAPACTION = "http://connect2.askadmissions.net/webservices/GetContact";
$BODY='<?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>
<GetContact xmlns="http://service.website.net/webservices/">
<ClientName>clientname</ClientName>
<PassKey>*******</PassKey>
<SearchCriteriaXml>
<![CDATA[
<attributes>
<attribute>
<name>email</name>
<value>name@name.com</value>
<operator>equals</operator>
</attribute>
</attributes>
]]>
</SearchCriteriaXml>
<AttributesXml>
<![CDATA[
<attributes>
<attribute>
<name>firstname</name>
</attribute>
<attribute>
<name>lastname</name>
</attribute>
</attributes>
]]>
</AttributesXml>
</GetContact>
</soap:Body>
</soap:Envelope>';
$SOAPMESSAGE = $SOAPClient->serializeEnvelope($BODY,$HEADER,array(),'document', 'literal');
$RESULT = $SOAPClient->send($BODY, $SOAPACTION);
echo $SOAPClient->response;
Johal source
share