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

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



   Hi Paul,
   EXAMPLE14 is not SOAP, and should not be used as an example of a SOAP
   request.  It's an old POX web service from UPS, and, honestly, I'm not
   sure if it still works.  I assume so?  But I haven't used it in awhile
   now.  It is something I no longer use as part of my job.
   You might try EXAMPLE16 as an example of a SOAP request.  Using SSL is
   trivial...just start the URL with "https" instead of "http".
   There are perhaps a dozen different methodologies for sending a
   userid/password.  Personally, I've found the simplest is just to use
   HTTP's basic authentication.  But, obviously, you have to do whatever
   your service provider is doing.  Start by looking at how they are
   willing to accept the user/pass by looking at their WSDL.
   -SK

   On 12/27/2012 1: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-200401-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:Messa
   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</wsa: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-wss-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-200401-wss
   -wssecurity-secext-1.0.xsd"
   xmlns:wsu="[18][19]http://docs.oasis-open.org/wss/2004/01/oasis-200401-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</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][22]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][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</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][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-wssecurity-sec
ext-1.0.xsd
   4. [28]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti
lity-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-wssecurity-sec
ext-1.0.xsd
  18. [42]http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-uti
lity-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
-----------------------------------------------------------------------