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

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



   If you are interested I have some code I just wrote a few months ago
   that does a Qualcomm transfer of a truck from one NMS to another using
   https.The inside should be different but everything else should be the
   same. Contact me off-line if you are interested.

   On Thu, Dec 27, 2012 at 12:56 PM, <[1]PReid@xxxxxxxxxxxx> wrote:

        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][2]http://www.w3.org/2003/05/soap-envelope";

     xmlns:wsa="[2][3]http://schemas.xmlsoap.org/ws/2004/03/addressing";

     xmlns:wsse="[3][4]http://docs.oasis-open.org/wss/2004/01/oasis-20040
     1-wss-
        wssecurity-secext-1.0.xsd"

     xmlns:wsu="[4][5]http://docs.oasis-open.org/wss/2004/01/oasis-200401
     -wss-w
        ssecurity-utility-1.0.xsd"
        xmlns:xsd="[5][6]http://www.w3.org/2001/XMLSchema";
        xmlns:xsi="[6][7]http://www.w3.org/2001/XMLSchema-instance";>
        <soap:Header>

     <wsa:Action>[7][8]http://www.qualcomm.com/VerifyAccess</wsa:Action>

     <wsa:MessageID>urn:uuid:db5ab195-ceb1-4325-8e1a-3b293ee1b49b</wsa:Me
     ssa
        geID>
        <wsa:ReplyTo>

     <wsa:Address>[8][9]http://schemas.xmlsoap.org/ws/2004/08/addressing/
     role/a
        nonym
        ous</wsa:Address>
        </wsa:ReplyTo>

     <wsa:To>[9][10]https://qhos.qualcommapps.com/qhoswsna/driver.asmx</w
     sa:To>
        <wsse:Security soap:mustUnderstand="1">
        <wsse:UsernameToken xmlns:wsu="[10][11]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][12]http://docs.oasis-open.org/wss/2004/01/oasis-200401-ws
     s-usern
        ame-token-profile-1.0#PasswordText">*********</wsse:Password>
        </wsse:UsernameToken>
        </wsse:Security>
        </soap:Header>
           <soap:Body>
              <ExportDriver xmlns="[12][13]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][14]http://www.w3.org/2003/05/soap-envelope";
        xmlns:xsi="[14][15]http://www.w3.org/2001/XMLSchema-instance";
        xmlns:xsd="[15][16]http://www.w3.org/2001/XMLSchema";

     xmlns:wsa="[16][17]http://schemas.xmlsoap.org/ws/2004/08/addressing";

     xmlns:wsse="[17][18]http://docs.oasis-open.org/wss/2004/01/oasis-200
     401-wss
        -wssecurity-secext-1.0.xsd"

     xmlns:wsu="[18][19]http://docs.oasis-open.org/wss/2004/01/oasis-2004
     01-wss-
        wssecurity-utility-1.0.xsd">
           <env:Header
     xmlns:env="[19][20]http://www.w3.org/2003/05/soap-envelope";>

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

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

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

     <wsa:To>[21][22]http://schemas.xmlsoap.org/ws/2004/08/addressing/rol
     e/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][23]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</LastAvailHoursRe
     cal
        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</LastAvailHoursRe
     cal
        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][24]http://www.erbgroup.com/
     References
        1. [25]http://www.w3.org/2003/05/soap-envelope
        2. [26]http://schemas.xmlsoap.org/ws/2004/03/addressing
        3.
     [27]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
     ty-secext-1.0.xsd
        4.
     [28]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
     ty-utility-1.0.xsd
        5. [29]http://www.w3.org/2001/XMLSchema
        6. [30]http://www.w3.org/2001/XMLSchema-instance
        7. [31]http://www.qualcomm.com/VerifyAccess
        8.
     [32]http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonym
        9. [33]https://qhos.qualcommapps.com/qhoswsna/driver.asmx
       10. [34]http://docs.oasisopen/
       11.
     [35]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username
     -token-profile-1.0#PasswordText
       12. [36]http://www.qualcomm.com/
       13. [37]http://www.w3.org/2003/05/soap-envelope
       14. [38]http://www.w3.org/2001/XMLSchema-instance
       15. [39]http://www.w3.org/2001/XMLSchema
       16. [40]http://schemas.xmlsoap.org/ws/2004/08/addressing
       17.
     [41]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
     ty-secext-1.0.xsd
       18.
     [42]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
     ty-utility-1.0.xsd
       19. [43]http://www.w3.org/2003/05/soap-envelope
       20. [44]http://www.qualcomm.com/ExportDriverResponse
       21.
     [45]http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
       22. [46]http://www.qualcomm.com/
       23. [47]http://www.erbgroup.com/
     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list.  To unsubscribe, please go to:
     [48]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---

References

   1. mailto:PReid@xxxxxxxxxxxx
   2. http://www.w3.org/2003/05/soap-envelope
   3. http://schemas.xmlsoap.org/ws/2004/03/addressing
   4. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
   5. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-w
   6. http://www.w3.org/2001/XMLSchema
   7. http://www.w3.org/2001/XMLSchema-instance
   8. http://www.qualcomm.com/VerifyAccess
   9. http://schemas.xmlsoap.org/ws/2004/08/addressing/role/a
  10. https://qhos.qualcommapps.com/qhoswsna/driver.asmx
  11. http://docs.oasisopen/
  12. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-usern
  13. http://www.qualcomm.com/
  14. http://www.w3.org/2003/05/soap-envelope
  15. http://www.w3.org/2001/XMLSchema-instance
  16. http://www.w3.org/2001/XMLSchema
  17. http://schemas.xmlsoap.org/ws/2004/08/addressing
  18. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss
  19. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
  20. http://www.w3.org/2003/05/soap-envelope
  21. http://www.qualcomm.com/ExportDriverResponse
  22. http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anony
  23. http://www.qualcomm.com/
  24. http://www.erbgroup.com/
  25. http://www.w3.org/2003/05/soap-envelope
  26. http://schemas.xmlsoap.org/ws/2004/03/addressing
  27. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
  28. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
  29. http://www.w3.org/2001/XMLSchema
  30. http://www.w3.org/2001/XMLSchema-instance
  31. http://www.qualcomm.com/VerifyAccess
  32. http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonym
  33. https://qhos.qualcommapps.com/qhoswsna/driver.asmx
  34. http://docs.oasisopen/
  35. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText
  36. http://www.qualcomm.com/
  37. http://www.w3.org/2003/05/soap-envelope
  38. http://www.w3.org/2001/XMLSchema-instance
  39. http://www.w3.org/2001/XMLSchema
  40. http://schemas.xmlsoap.org/ws/2004/08/addressing
  41. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
  42. http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
  43. http://www.w3.org/2003/05/soap-envelope
  44. http://www.qualcomm.com/ExportDriverResponse
  45. http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
  46. http://www.qualcomm.com/
  47. http://www.erbgroup.com/
  48. http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------