Announcements
Hi All
I created PHP code for consuming AX web service my code as below :
ini_set('soap.wsdl_cache_enabled', '0');
$wsdl = "wsdl_url";
$client = new SoapClient($wsdl,array('trace' => 1,'soap_version' => SOAP_1_2));
$security = array(
'UserName' => array(
'UserName'=>'username',
'Password'=>'password',
)
);
$client->__getLastResponse();
$header = new SoapHeader('ChannelFactory','Credentials',$security, false);
$client->__setSoapHeaders($header);
try {
$ret = $client->getAllItm();
print_r($ret);
}catch(Exception $e){
echo $e->getMessage();
}
and the above code return the below Error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL. in
Thanks!
Thanks Bro :)
I found the solution ,the service created with the tcp not http :)
so i asked the developer make it working on http because in tcp wcf working only with wcf not php
I would still appreciate more details. Trying to help without almost any information about the problem isn't easy.
What error did you get in WCF Test Client?
Do you mean a custom service or a document service? Is it a standard service or something you developed? Did you test it locally? How did you configure the inbound port?
What does "our .net develop it" mean? I suspect you mean that somebody developed the service, but I meant the WSDL description of the service. Also, do you mean a web service defined inside AX at all? If somebody built a web service in .NET, it sounds like a completely different topic. I wish you actually told us what you're doing!
i mean WCF Test Client (WcfTestClient.exe)
What kind of service is it?
AIF services
Where did you get the WSDL code?
our .net develop it on ax 2012
What do you mean by microsoft WCF client tool and what error did you get?
Did you check the binging, as I suggested?
What kind of service is it?
Where did you get the WSDL code?
Thanks dear Martin for your quick answer but i have 2 things :
1-my code working perfectly with other WCF services
2-when i test the ax service on microsoft WCF client tool i got an error (is something to work around it?)
Thanks again :)
It seems to me that your problem isn't really related to AX, therefore you should rather ask in a PHP forum. See Could not find any usable binding services in WSDL, for example.
My first step would be checking bindings in WSDL, though.
André Arnaud de Cal...
294,069
Super User 2025 Season 1
Martin Dráb
232,858
Most Valuable Professional
nmaenpaa
101,158
Moderator