[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ftpapi] Constructing the SOAP
Hello
I am on V7R2 with
current ptf's
Below I have included
the SOAP from the web service server and an example provided by the supplier
of the web service.
I'm just a little
confused on how to construct the xml for the SOAP body based on the example
code in RPG.
The code seems
to be creating an array of 2 elements and then named pairs (name and data)
to the array but not all the elements exist in the SOAP xml which is where
I am getting lost. And what the data string actually looks like would
compltely answer my question.
I am sure this
could be explained better but I hope someone can understand what I am trying
to say.
Any reference
to Token below is already sorted and working as we use other web service
methods that require the Token.
Appreciate any
assistance
// Create booking
and set fleet ID
Booking booking
= new Booking();
booking.Fleet
= new Fleet();
booking.Fleet.ID
= 1;
// Create pick-up
location
booking.Locations
= new Location[2];
booking.Locations[0]
= new Location();
booking.Locations[0].LocationType
= LocationType.PickUp;
booking.Locations[0].AddressType
= AddressType.Street;
booking.Locations[0].Address
= new Address();
booking.Locations[0].Address.Street
= new Street();
booking.Locations[0].Address.Street.ID
= 12;
booking.Locations[0].Address.Designation
= new Designation();
booking.Locations[0].Address.Designation.ID
= 14;
booking.Locations[0].Address.Suburb
= new Suburb();
booking.Locations[0].Address.Suburb.ID
= 9;
booking.Locations[0].TimeMode
= TimeMode.NextAvailable;
// Create drop-off
location
booking.Locations[1]
= new Location();
booking.Locations[1].LocationType
= LocationType.DropOff;
booking.Locations[1].AddressType
= AddressType.None;
BookingWebService.CreateBooking({token},
booking);
<?xml version="1.0"
encoding="utf-8"?>
<soap12:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CreateBooking xmlns="http://schemas.mt.com.au/dispatch/2.20.0/booking">
<authenticationToken>string</authenticationToken>
<booking>
<BookingID>long</BookingID>
<Fleet ID="int" Name="string" />
<Locations>
<Location>
<Address xsi:nil="true" />
<AddressType>None or Street or Suburb
or Position or Place or Designation</AddressType>
<CustomerName>string</CustomerName>
<CustomerPhoneNumber>string</CustomerPhoneNumber>
<CustomerEmail>string</CustomerEmail>
<LocationType>PickUp or DropOff</LocationType>
<Notifications xsi:nil="true"
/>
<Pax>int</Pax>
<Remark>string</Remark>
<Time>dateTime</Time>
<TimeMode>None or NextAvailable or SpecificTime</TimeMode>
<SendPhoneToDriver>boolean</SendPhoneToDriver>
<UsedNavToPickupAddress>boolean</UsedNavToPickupAddress>
<EventDetails xsi:nil="true" />
<Passengers xsi:nil="true" />
</Location>
<Location>
<Address xsi:nil="true" />
<AddressType>None or Street or Suburb
or Position or Place or Designation</AddressType>
<CustomerName>string</CustomerName>
<CustomerPhoneNumber>string</CustomerPhoneNumber>
<CustomerEmail>string</CustomerEmail>
<LocationType>PickUp or DropOff</LocationType>
<Notifications xsi:nil="true"
/>
<Pax>int</Pax>
<Remark>string</Remark>
<Time>dateTime</Time>
<TimeMode>None or NextAvailable or SpecificTime</TimeMode>
<SendPhoneToDriver>boolean</SendPhoneToDriver>
<UsedNavToPickupAddress>boolean</UsedNavToPickupAddress>
<EventDetails xsi:nil="true" />
<Passengers xsi:nil="true" />
</Location>
</Locations>
<BookingSourceType>int</BookingSourceType>
</booking>
</CreateBooking>
</soap12:Body>
</soap12:Envelope>
Thanks
Don Brown
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi