Hello all, I am trying to figure out how to use the Soap Toolkit for what I need.
I am being required to send a soap message to a web service in a nested format:
Note: I have replaced the angled brackets with square ones for this message.
[?xml version="1.0" encoding="UTF-8"?]
[SOAP-ENV:Envelope
xmlns:SOAP-ENV="
http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="
http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:m="*** web service here ****"]
[SOAP-ENV:Header]
[m:authenticationHeader]
[userCode]usercode[/userCode]
[password]password[/password]
[/m:authenticationHeader]
[/SOAP-ENV:Header]
[SOAP-ENV:Body]
[m:importPickTicketList]
[m:data]
[pickTicket-list]
[pickTicket state="creating"]
[pickTicketId]666[/pickTicketId]
[warehouseCode]00[/warehouseCode]
[pin][/pin]
[deliveryDate]2004-01-16 00:00:00.000000[/deliveryDate]
[routeCode]123[/routeCode]
[loadCode]A[/loadCode]
[vehicleCode]100[/vehicleCode]
[bayNumber]12[/bayNumber]
[bayLevel]T[/bayLevel]
[requestType]S[/requestType]
[loadType]EE[/loadType]
[secondaryVehicleCode][/secondaryVehicleCode]
[secondaryBayNumber][/secondaryBayNumber]
[secondaryBayLevel][/secondaryBayLevel]
[palletSequence][/palletSequence]
[pickState][/pickState]
[pickTicketDetail-list]
[pickTicketDetail]
[pickTicketId]666[/pickTicketId]
[lineNumber][/lineNumber]
[stopNumber][/stopNumber]
[customerCode]111[/customerCode]
[customerName]Joe Danger[/customerName]
[orderNumber]345[/orderNumber]
[itemCode]101[/itemCode]
[itemDescription]Some kinda item[/itemDescription]
[warehouseLocationId][/warehouseLocationId>
[lotNumber][/lotNumber]
[codeDate][/codeDate]
[pickingGroup]ABC[/pickingGroup]
[pickingSequence]0[/pickingSequence]
[quantity]90[/quantity]
[palletNumber][/palletNumber]
[palletTotal][/palletTotal]
[/pickTicketDetail]
[/pickTicketDetail-list]
[/pickTicket]
[/pickTicket-list]
[/m:data]
[/m:importPickTicketList]
[/SOAP-ENV:Body]
[/SOAP-ENV:Envelope]
To generate the nested structure I used a DOMDocument and using the save method of the DomDocument I have generated the following:
[?xml version="1.0" ?]
- [pickTicket-list]
- [pickTicket state="add"]
[pickTicketId]10000000033[/pickTicketId]
[warehouseCode]0[/warehouseCode]
[pin /]
[deliveryDate]2003-12-03 00:00:00.000000[/deliveryDate]
[routeCode]2011[/routeCode]
[loadCode]1[/loadCode]
[vehicleCode]50-18[/vehicleCode]
[driverCode]105562063[/driverCode]
[driverName]Smithers, Cory[/driverName]
[bayNumber]1[/bayNumber]
[bayLevel]B[/bayLevel]
[requestType]B[/requestType]
[loadType]S[/loadType]
[secondaryVehicleCode /]
[secondaryBayNumber]0[/secondaryBayNumber]
[secondaryBayLevel /]
[palletSequence]0[/palletSequence]
[pickState /]
[palletNumber]1[/palletNumber]
[palletTotal]2[/palletTotal]
[stopNumber]9999[/stopNumber]
[customerCode]100774[/customerCode]
[customerName]A.W. Collins Co.[/customerName]
[orderNumber /]
- [pickTicketDetail-list]
- [pickTicketDetail]
[pickTicketId]10000000033[/pickTicketId]
[lineNumber /]
[itemCode]1101[/itemCode]
[itemDescription]6Cn Pepsi[/itemDescription]
[warehouseLocationId /]
[lotNumber /]
[codeDate /]
[pickingGroup]HHH[/pickingGroup]
[pickingSequence]7010[/pickingSequence]
[quantity]99[/quantity]
[/pickTicketDetail]
[/pickTicketDetail-list]
[/pickTicket]
[/pickTicket-list]
The question is now how do I handle getting everything loaded into SOAP?
I have looked at the high level but I do not think it will do the header. As I said I am only using SOAP for the first time here so I am still learning.
What looked more promising is the low level API calls.
Your thoughts would be appreciated.
Jason