I have very big problem cal wcf service from php. When i call this wcf throw exception : null object.
My wsdl :
Code: Select all
<xs:element name="sendMails">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="fromAddr" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="toAddr" nillable="true" type="q2:ArrayOfstring"/>
</xs:sequence>
</xs:complexType>
</xs:element>
Code: Select all
<xs:schema elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<xs:complexType name="ArrayOfstring">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfstring" nillable="true" type="tns:ArrayOfstring"/>
</xs:schema>
and my call from php:
Code: Select all
$client = new SoapClient('http://localhost:1022/wsSite/WS.svc?wsdl');
$tab = array();
array_push($tab, "a1@gmail.com");
array_push($tab, "a2@gmail.com");
$parameters = array(
"fromAddr" => "anyFromaddres@gmail.com",
"toAddr" => $tab,
);
$result = $client->sendMails($parameters);
Propably i'am not correctly call wcf service.
Please help if you has any ideas
Regards Thom.