[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

For SOAP Request with a UserID and Password (EXAMPLE14).



   Hello.
   I've been attempting to learn how to use the HTTPAPI for several days
   now. Our company has a need to make a SOAP request to one of our
   vendors and receive data back from them. They require a UserID and
   Password in the request. Also, it is a secure (https) service. Can you
   tell me which of the HTTPAPI Examples I should start with as a model to
   do this. I am thinking EXAMPLE14, however; I don't seem to be able to
   get EXAMPLE14 to work, are we sure that the URL's in this example
   aren't out of date?
   I have been experimenting with SoapUI so I know what my XML request and
   response will look like. Note I have replaced my actual UserID and
   Password with stars for security reasons.
   Any help would be much appreciated as I've very new to this. Thanks!!!
   XML Request
   <?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope
   xmlns:soap="[1]http://www.w3.org/2003/05/soap-envelope";
   xmlns:wsa="[2]http://schemas.xmlsoap.org/ws/2004/03/addressing";
   xmlns:wsse="[3]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
   wssecurity-secext-1.0.xsd"
   xmlns:wsu="[4]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w
   ssecurity-utility-1.0.xsd"
   xmlns:xsd="[5]http://www.w3.org/2001/XMLSchema";
   xmlns:xsi="[6]http://www.w3.org/2001/XMLSchema-instance";>
   <soap:Header>
   <wsa:Action>[7]http://www.qualcomm.com/VerifyAccess</wsa:Action>
   <wsa:MessageID>urn:uuid:db5ab195-ceb1-4325-8e1a-3b293ee1b49b</wsa:Messa
   geID>
   <wsa:ReplyTo>
   <wsa:Address>[8]http://schemas.xmlsoap.org/ws/2004/08/addressing/role/a
   nonym
   ous</wsa:Address>
   </wsa:ReplyTo>
   <wsa:To>[9]https://qhos.qualcommapps.com/qhoswsna/driver.asmx</wsa:To>
   <wsse:Security soap:mustUnderstand="1">
   <wsse:UsernameToken xmlns:wsu="[10]http://docs.oasisopen.
   org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
   wsu:Id="SecurityToken-fbd3add0-e734-4dc3-b717-609e4089228d">
   <wsse:Username>*******************</wsse:Username>
   <wsse:Password
   Type="[11]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-usern
   ame-token-profile-1.0#PasswordText">*********</wsse:Password>
   </wsse:UsernameToken>
   </wsse:Security>
   </soap:Header>
      <soap:Body>
         <ExportDriver xmlns="[12]http://www.qualcomm.com";>
            <!--Optional:-->
            <request>
               <!--Optional:-->
               <Drivers>
                  <!--Zero or more repetitions:-->
                  <string>CGOES</string>
                  <string>LBOLT</string>
               </Drivers>
               <RuleSet>CANMain</RuleSet>
            </request>
         </ExportDriver>
      </soap:Body>
   </soap:Envelope>
   XML Response
   <soap:Envelope xmlns:soap="[13]http://www.w3.org/2003/05/soap-envelope";
   xmlns:xsi="[14]http://www.w3.org/2001/XMLSchema-instance";
   xmlns:xsd="[15]http://www.w3.org/2001/XMLSchema";
   xmlns:wsa="[16]http://schemas.xmlsoap.org/ws/2004/08/addressing";
   xmlns:wsse="[17]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss
   -wssecurity-secext-1.0.xsd"
   xmlns:wsu="[18]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
   wssecurity-utility-1.0.xsd">
      <env:Header xmlns:env="[19]http://www.w3.org/2003/05/soap-envelope";>

   <wsa:Action>[20]http://www.qualcomm.com/ExportDriverResponse</wsa:Actio
   n>

   <wsa:MessageID>urn:uuid:2ba97535-796d-4e24-9bb4-8215718d8f80</wsa:Messa
   geID>

   <wsa:RelatesTo>urn:uuid:f866f097-61e1-40c2-85a3-945fa79c4621</wsa:Relat
   esTo>

   <wsa:To>[21]http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anony
   mous</wsa:To>
         <wsse:Security>
            <wsu:Timestamp
   wsu:Id="Timestamp-a1924cfb-a098-481f-922c-df5b8c524aea">
               <wsu:Created>2012-12-27T17:52:20Z</wsu:Created>
               <wsu:Expires>2012-12-27T17:57:20Z</wsu:Expires>
            </wsu:Timestamp>
         </wsse:Security>
      </env:Header>
      <soap:Body>
         <ExportDriverResponse xmlns="[22]http://www.qualcomm.com";>
            <ExportDriverResult>
               <DriverExport>
                  <DriverExportData>
                     <DriverId>CGOES</DriverId>
                     <Password>3395</Password>
                     <LastName>Goes</LastName>
                     <FirstName>Casey</FirstName>
                     <DepotId>13</DepotId>
                     <TractorId>05197</TractorId>

   <ActivityStarted>2012-12-27T12:41:00</ActivityStarted>
                     <DayDrive>715</DayDrive>
                     <DayDuty>492</DayDuty>
                     <WeekDuty>2593</WeekDuty>
                     <DayOff>15497</DayOff>
                     <Shift>612</Shift>

   <LastAvailHoursRecalc>2012-12-27T12:52:20.6906826Z</LastAvailHoursRecal
   c>
                     <TodayOnDuty>272</TodayOnDuty>
                     <TodayOffDuty>424</TodayOffDuty>
                     <TodaySleeper>0</TodaySleeper>
                     <TodayDrive>65</TodayDrive>
                     <YesterdayOnDuty>379</YesterdayOnDuty>
                     <YesterdayOffDuty>959</YesterdayOffDuty>
                     <YesterdaySleeper>0</YesterdaySleeper>
                     <YesterdayDrive>102</YesterdayDrive>
                     <Activity>4</Activity>
                     <TimeZone>Eastern Standard Time</TimeZone>
                     <USDutyCycle>EightDay</USDutyCycle>
                     <CANDutyCycle>SevenDay</CANDutyCycle>
                     <CurrentRuleSet>CANMain</CurrentRuleSet>
                  </DriverExportData>
                  <DriverExportData>
                     <DriverId>LBOLT</DriverId>
                     <Password>4498</Password>
                     <LastName>Bolt</LastName>
                     <FirstName>Lynden</FirstName>
                     <DepotId>14</DepotId>
                     <TractorId>02160</TractorId>

   <ActivityStarted>2012-12-27T11:43:00</ActivityStarted>
                     <DayDrive>687</DayDrive>
                     <DayDuty>488</DayDuty>
                     <WeekDuty>3848</WeekDuty>
                     <DayOff>19808</DayOff>
                     <Shift>608</Shift>

   <LastAvailHoursRecalc>2012-12-27T12:52:20.7063081Z</LastAvailHoursRecal
   c>
                     <TodayOnDuty>250</TodayOnDuty>
                     <TodayOffDuty>420</TodayOffDuty>
                     <TodaySleeper>0</TodaySleeper>
                     <TodayDrive>93</TodayDrive>
                     <YesterdayOnDuty>0</YesterdayOnDuty>
                     <YesterdayOffDuty>1440</YesterdayOffDuty>
                     <YesterdaySleeper>0</YesterdaySleeper>
                     <YesterdayDrive>0</YesterdayDrive>
                     <Activity>4</Activity>
                     <TimeZone>Eastern Standard Time</TimeZone>
                     <USDutyCycle>EightDay</USDutyCycle>
                     <CANDutyCycle>SevenDay</CANDutyCycle>
                     <CurrentRuleSet>CANMain</CurrentRuleSet>
                  </DriverExportData>
               </DriverExport>
            </ExportDriverResult>
         </ExportDriverResponse>
      </soap:Body>
   </soap:Envelope>
   ___________________________________________________________
   Paul Reid
   Application Developer III
   Erb Group of Companies | 290 Hamilton Road | New Hamburg, Ontario | N3A
   1A2
   Phone: 519.662.6133 ext. 2363
   Web: [23]http://www.erbgroup.com/

References

   1. http://www.w3.org/2003/05/soap-envelope
   2. http://schemas.xmlsoap.org/ws/2004/03/addressing
   3. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
   4. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
   5. http://www.w3.org/2001/XMLSchema
   6. http://www.w3.org/2001/XMLSchema-instance
   7. http://www.qualcomm.com/VerifyAccess
   8. http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonym
   9. https://qhos.qualcommapps.com/qhoswsna/driver.asmx
  10. http://docs.oasisopen/
  11. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText
  12. http://www.qualcomm.com/
  13. http://www.w3.org/2003/05/soap-envelope
  14. http://www.w3.org/2001/XMLSchema-instance
  15. http://www.w3.org/2001/XMLSchema
  16. http://schemas.xmlsoap.org/ws/2004/08/addressing
  17. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
  18. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
  19. http://www.w3.org/2003/05/soap-envelope
  20. http://www.qualcomm.com/ExportDriverResponse
  21. http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
  22. http://www.qualcomm.com/
  23. http://www.erbgroup.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------