We need to call a asp.net hosted web service from php 5.3. We can see exactly what is needed to be sent using Fidder but the documentation is so poor on PHP on this subject plus there is 3 flavors nusoap, zend, etc plus all the versions of PHP soap client.
Is there a good example of how to do it anywhere that really works. Below is what we see as the output of the .net code (from fiddler) that has been tested and works.
login:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><Login xmlns="http://lxxx.xxxx.com/webservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><asUserName>Bob</asUserName><asPassword>Bob</asPassword></Login></s:Body></s:Envelope>
CreatePurchase:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><CreatePurchase xmlns="http://xxx.xxxx.com/webservices/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><axCustomer><Customer Name="Ron Howard" EMail="RH@Anysite.com" FirstName="Ron
E" LastName="Howard" Salutation="Mr." Company="RHP" Address="1313 Mockingbird Rd." Address2="1" City="Los Angles" StateCode="CA" CountryISOCode="USA" PostCode="99999-9999" Phone="888.888.8888" Fax="888.888.8888" Comments="Now is time for all good men to come
to the aid of their country" xmlns=""><Purchase LicenseID="0" PurchaseDate="9/23/2012" Income="0.00" Comments="AAA"></Purchase></Customer></axCustomer></CreatePurchase></s:Body></s:Envelope>
I have used the xmlwriter in php to construct the xml that gets dropped in, the question is how to package it so that it goes out correctly. All help appreciated, or is there a better place to ask?
Regards,
↧
consuming asp.net web service from php.
↧