I am a newbie to PHP and webservices.
There is a webservice that I am sending data to that I need to have SoapHeader information wrapped around the XML that I am sending to it.
I cannot for the life of me figure out where to place the DevToken for this.
Here is my PHP code. This is a TEST function that once I get everything working will be placed into a website for use:
<?php
function test($a, $b, $c, $d, $e, $f)
{
$str = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><Transmission><EdProviderData><DetailData><Detail>";
$str = $str . "<IN_PROV>$a</IN_PROV> <IN_CRSE>$b</IN_CRSE> <IN_CDATE>$c</IN_CDATE> <IN_ZIP>$d</IN_ZIP>";
$str = $str . "<IN_LICENSE>$e</IN_LICENSE> <IN_NAME>$f</IN_NAME> </Detail> </DetailData> </EdProviderData> </Transmission>";
$wsdl="https://<website>/ProcessEdRoster/Service1.asmx?wsdl";
$client=new soapclient($wsdl, 'wsdl');
echo $client->call('ProcessRoster',$str);
}
test('11111','22222','33333','44444','55555','66666');
?>
Here is the snippet from the WSDL...
- <s:element name="ProcessRoster">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="xmlReq" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="ProcessRosterResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ProcessRosterResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ValidationSoapHeader" type="tns:ValidationSoapHeader" />
- <s:complexType name="ValidationSoapHeader">
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="DevToken" type="s:string" />
</s:sequence>
<s:anyAttribute />
</s:complexType>
</s:schema>
</wsdl:types>
Thanks for your help in advance!!
Eddi Rae