How do I disable namespace aliasing in PHP soap cl

2019-07-17 04:51发布

I have a problem with my PHP - Microsoft AX integration. I'm using SOAP/WSDL to integrate with the service, the problem I have is that I get this error after sending a request from PHP to WSDL

"Invalid instance type name 'ns3:AxdEntity_DirParty_DirOrganization"

Part of XML sent that causes this problem

<ns3:DirParty class="entity" xsi:type="ns3:AxdEntity_DirParty_DirOrganization"

and my soap env

SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKey" xmlns:ns2="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKeyList" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://schemas.microsoft.com/dynamics/2008/01/documents/Customer" xmlns:ns4="http://schemas.microsoft.com/dynamics/2008/01/sharedtypes" xmlns:ns5="http://schemas.microsoft.com/dynamics/2008/01/services" xmlns:ns6="http://schemas.microsoft.com/dynamics/2010/01/datacontracts">

As you can see, PHP & it's soap client has aliased all of the namespaces, I need them inline, like this

<DirParty xsi:type="AxdEntity_DirParty_DirOrganization" class="entity" action="update" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

How do I disable namespace aliasing in PHP soap client?

0条回答
登录 后发表回答