I am trying to call a wcf ws from php client
WSDL https://ws-web.test.nhn.no/v1/AR?wsdl
$url = 'https://ws-web.test.nhn.no/v1/AR?wsdl';
$params = array('login' => '*****',
'password' => '######',
'soap_version' => SOAP_1_2,
'trace' => TRUE);
$client = new SoapClient($url, $params);
var_dump($client->__soapCall("Ping"));
With the above code I am always getting a null
response and I am not able to call other functions from wsdl
If I try this with another syntax sometimes I get an action mismatch error
and I am also getting a null
response in Soap UI.
Based on the WSDL, the Ping function has an input message.
<wsdl:operation name="Ping">
<wsdl:input wsam:Action="http://register.nhn.no/CommunicationParty/ICommunicationPartyService/Ping" message="tns:ICommunicationPartyService_Ping_InputMessage"/>
<wsdl:output wsam:Action="http://register.nhn.no/CommunicationParty/ICommunicationPartyService/PingResponse" message="tns:ICommunicationPartyService_Ping_OutputMessage"/>
</wsdl:operation>
Input message consists of parameters defined here ...
<wsdl:message name="ICommunicationPartyService_Ping_InputMessage">
<wsdl:part name="parameters" element="tns:Ping"/>
</wsdl:message>
And finally the Ping object doesn't look like it has any properties. Weird.
<xs:element name="Ping">
<xs:complexType>
<xs:sequence/>
</xs:complexType>
</xs:element>
So give this a try.
$pingObj = new stdClass();
$client->__soapCall("Ping", [$pingObj]);