Wednesday, 4 February 2015

SOAP and PHP. How do I retrieve this response?



I am stuck on a problem for a while now. I'm trying to get this request, that works in SOAP UI, to work in PHP:



<soapenv:Envelope xmlns:soapenv="http://ift.tt/sVJIaE" xmlns:otp="OTPNA">
<soapenv:Header/>
<soapenv:Body>
<otp:ProductRequestIn>
<otp:fromRole>
<otp:PartnerRoleDescription>
<otp:ContactInformation>
<otp:contactName>
<otp:FreeFormText lang="NL">?</otp:FreeFormText>
</otp:contactName>
<otp:EmailAddress>?</otp:EmailAddress>
<!--Optional:-->
<otp:facsimileNumber>
<otp:CommunicationsNumber>?</otp:CommunicationsNumber>
</otp:facsimileNumber>
<otp:telephoneNumber>
<otp:CommunicationsNumber>?</otp:CommunicationsNumber>
</otp:telephoneNumber>
</otp:ContactInformation>
<otp:GlobalPartnerRoleClassificationCode>? </otp:GlobalPartnerRoleClassificationCode>
<otp:PartnerDescription>
<otp:BusinessDescription>
<!--Optional:-->
<otp:GlobalBusinessIdentifier>-BZNSID-</otp:GlobalBusinessIdentifier>
<!--Optional:-->
<otp:GlobalSupplyChainCode>?</otp:GlobalSupplyChainCode>
<!--Optional:-->
<otp:businessName>
<otp:FreeFormText lang="?">?</otp:FreeFormText>
</otp:businessName>
</otp:BusinessDescription>
<otp:GlobalPartnerClassificationCode>? </otp:GlobalPartnerClassificationCode>
</otp:PartnerDescription>
</otp:PartnerRoleDescription>
</otp:fromRole>
<otp:Authentication>
<otp:Username>-USERNAME-</otp:Username>
<otp:Password>-PASSWORD-</otp:Password>
</otp:Authentication>
<otp:productIdentifier type="PDI">---</otp:productIdentifier>
<otp:lang>NL</otp:lang>
<otp:ProductInformationType>RIC</otp:ProductInformationType>
<otp:RequestedPartner>
<otp:PartnerID>-PARTNERID-</otp:PartnerID>
</otp:RequestedPartner>
</otp:ProductRequestIn>


The WSDL file returns 1 function called ProductRequest.


I tried a lot of suggestions and none of them worked so far. I am not sure if I should use the XML in the function ProductRequest with the XML are paramter (didn't work) or i should build up some array and parse that into the argument (didn't work, or didn't do correctly)


The WSDL can be found here: http://ift.tt/16lNAd1


No comments:

Post a Comment