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

PHP SOAP-ERROR: Parsing Schema: element already defined When Connecting to D365 WSDL

(0) ShareShare
ReportReport
Posted on by 42

I am connecting to dynamics 365. It used to work perfectly, i curl to get the token then i use it as an authorization header along with php soapclient and it works, i connect i create a client and i can call my methods.

All of a sudden it decided not to work, and where it used to connect as SOAP 1.1 now it enforced SOAP 1.2
After changing from SOAP 1.1 to SOAP 1.2 ( because I got the error of binding mismatch where it said expecting application/soap+xml and text/xml was found ) So I changed versions and that error disappeared and got replaced with ERROR Fetching HTTP Headers.

That error got stuck for the longest time, people suggested to increase timeout but i put it as high as 500 800 5000 all the same.

Then all of a sudden, it started giving me SOAP ERROR Parsing schema element already defined. I did not change my code, i played for awhile with the headers but to no avail, I even removed the authorization header just to see what is going on and that did nothing i kept getting the same error.


SOAP-ERROR: Parsing Schema: element 'schemas.datacontract.org/.../Microsoft.Dynamics.Ax.Xpp:XppObjectBase' already defined [string:Exception:private]

everytime I try to connect I get different kind of parsing schema error even though i am not changing anything in my code:


SOAP-ERROR: Parsing Schema: element 'schemas.microsoft.com/.../:anyType' already defined [string:Exception:private]

and another

SOAP-ERROR: Parsing Schema: element 'schemas.datacontract.org/.../Microsoft.Dynamics.AX.KernelInterop:ProxyBase' already defined [string:Exception:private]


and then sometimes it does get through for a second but with fetching http header error again..

so i can not create a client instance anymore now..
where before i was able to create a client instance but i get an error when I call the method of "Error Fetching HTTP Headers"

something is definitely not stable because my errors are not one.

now some stated the wsdl could be faulty, but don't know how i can make sure of that 

Help is this a PHP problem or a dynamics problem or wsdl custom made problem .

And how to solve this.

Thank you.

I have the same question (0)
  • nmaenpaa Profile Picture
    101,160 Moderator on at

    Have you checked these PHP samples: github.com/.../PHPConsoleApplication

  • smk85 Profile Picture
    42 on at

    Using Curl just times out.

    Similar to when I use PHP Soapclient .. it times out and i get an error fetching http header ( which when i searched it; is  a timeout error)

  • smk85 Profile Picture
    42 on at

    I am finding this in my wsdl file

    <sp:IssuedToken sp:IncludeToken="docs.oasis-open.org/.../AlwaysToRecipient">

    <sp:RequestSecurityTokenTemplate>

    <trust:TokenType xmlns:trust="docs.oasis-open.org/.../200512">

    docs.oasis-open.org/.../oasis-wss-saml-token-profile-1.1

    </trust:TokenType>

    <trust:KeyType xmlns:trust="docs.oasis-open.org/.../200512">

    docs.oasis-open.org/.../Bearer

    </trust:KeyType>

    </sp:RequestSecurityTokenTemplate>

    <wsp:Policy>

    <sp:RequireInternalReference/>

    SAML and Bearer keytype.. these were not available in soap 1.1 I am still learning how to POST to SOAP but does this mean i need to get two tokens? SAML and then oAuth ? can someone lead me to a code for SAML token?

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 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans