Jeremy Leys
asked on
Post xml via PHP Soap Client
We are trying to post the xml input of a successful SoapUI call to the same endpoint, via XML. The endpoint is a NTLM authenticated .net service. We are successfully logging into this from PHP but we cannot send an object based on valid xml from SoapUI via a PHP xml object.
So
1) Should we be able to post the xml directly to this service from PHP?
2) If not, can we generate valid paramaters for the soap function from our valid xml?
A sample snippet of xml is
Thanks, Martin
So
1) Should we be able to post the xml directly to this service from PHP?
2) If not, can we generate valid paramaters for the soap function from our valid xml?
A sample snippet of xml is
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:spo="urn:xxxxx" xmlns:sal="urn:xxxx" xmlns:val="spoint/edi/validationresults">
<soapenv:Header/>
<soapenv:Body>
<spo:SendSalesDocument>
<spo:document>
<sal:ProcessorCode>INBOUND</sal:ProcessorCode>
<sal:HandlerCode>MAG.SALES.ORDER</sal:HandlerCode>
<sal:ReferenceNo>TEST</sal:ReferenceNo>
<sal:DocumentType>ORDER</sal:DocumentType>
<sal:SellToCustomer>
<sal:CustomerNo>10002</sal:CustomerNo>
<sal:Name>Sample Magento Sale</sal:Name>
<sal:Address>Sample Address 1</sal:Address>
<sal:Address2>Sample Address 2</sal:Address2>
<sal:City>Sydney</sal:City>
<sal:PostCode>2000</sal:PostCode>
<sal:County>NSW</sal:County>
<sal:CountryCode>AU</sal:CountryCode>
</sal:SellToCustomer>
<sal:ExternalDocumentNo>MAG-000001</sal:ExternalDocumentNo>
<sal:DocumentDate>2016-12-01</sal:DocumentDate>
<sal:RequestedDeliveryDate>2016-12-07</sal:RequestedDeliveryDate>
<sal:PaymentMethodCode>EFT</sal:PaymentMethodCode>
<sal:ShipmentMethodCode>CP</sal:ShipmentMethodCode>
<sal:SalesLine>
<sal:SequenceNo>10000</sal:SequenceNo>
<sal:Type>ITEM</sal:Type>
<sal:No>11100</sal:No>
<sal:Description>MitoQ Cleanser 150ml</sal:Description>
<sal:Quantity>1</sal:Quantity>
<sal:UnitPrice>10</sal:UnitPrice>
</sal:SalesLine>
</spo:document>
<spo:validationResult>
<val:Message>
<val:MessageNo>0</val:MessageNo>
<val:Status></val:Status>
<val:WorkflowStatus></val:WorkflowStatus>
<val:Severity></val:Severity>
<val:NoOfEntries></val:NoOfEntries>
<val:Entry>
<val:MessageLineNo>0</val:MessageLineNo>
<val:LineNo>0</val:LineNo>
<val:SequenceNo></val:SequenceNo>
<val:Severity></val:Severity>
<val:FieldNo>0</val:FieldNo>
<val:FieldName></val:FieldName>
<val:RuleCode></val:RuleCode>
<val:RuleDescription></val:RuleDescription>
<val:CreatedDateTime>0001-01-01T00:00:00</val:CreatedDateTime>
<val:Text></val:Text>
</val:Entry>
</val:Message>
</spo:validationResult>
</spo:SendSalesDocument>
</soapenv:Body>
</soapenv:Envelope>
Thanks, Martin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you your example helped me immensely and I now have a working solution :)
ASKER
Open in new window