Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

Issue with Php Consume AX Web Service

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!
  • Ahmed Naguib Profile Picture
    Ahmed Naguib 10 on at
    RE: Issue with Php Consume AX Web Service

    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  

  • Martin Dráb Profile Picture
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: Issue with Php Consume AX Web Service

    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
    Ahmed Naguib 10 on at
    RE: Issue with Php Consume AX Web Service

    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
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: Issue with Php Consume AX Web Service

    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
    Ahmed Naguib 10 on at
    RE: Issue with Php Consume AX Web Service

    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
    Martin Dráb 230,235 Most Valuable Professional on at
    RE: Issue with Php Consume AX Web Service

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans