web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Issue with Php Consume AX Web Service

(0) ShareShare
ReportReport
Posted on by 10

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!
I have the same question (0)
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    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.

  • Ahmed Naguib Profile Picture
    10 on at

    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 :)

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    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?

  • Ahmed Naguib Profile Picture
    10 on at

    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

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    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!

  • Ahmed Naguib Profile Picture
    10 on at

    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  

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans