code_junkie

webservice using security UserNameToken

Nov 13th, 2011
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  2. <soapenv:Header>
  3. <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
  4. <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-10034404">
  5. <wsu:Created>2009-01-19T16:33:38.537Z</wsu:Created>
  6. <wsu:Expires>2009-01-19T16:34:08.537Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-10034094">
  7. <wsse:Username>myUser</wsse:Username>
  8. <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">myPasswd</wsse:Password>
  9. </wsse:UsernameToken>
  10. </wsse:Security>
  11. <wsa:MessageID soapenv:mustUnderstand="0">uuid:ecc3b150-e646-11dd-96e5-9f80a576275b</wsa:MessageID>
  12. <wsa:To soapenv:mustUnderstand="0">http://62.154.241.166:8080/HTNGService/WebServiceForTrustService</wsa:To>
  13. <wsa:Action soapenv:mustUnderstand="0">http://webservice.trustinternational.com/ws/services/Htng2ReservationService</wsa:Action>
  14. <wsa:From xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing" soapenv:mustUnderstand="0">
  15. <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address></wsa:From>
  16. </soapenv:Header>
  17. <soapenv:Body>
  18. ...
  19. </soapenv:Body></soapenv:Envelope>
  20.  
  21. <?xml version="1.0" encoding="UTF-8"?>
  22. <definitions
  23. xmlns="http://schemas.xmlsoap.org/wsdl/"
  24. xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  25. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  26. xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="WebServiceForTrustService" targetNamespace="http://wstrust/" xmlns:tns="http://wstrust/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp1="http://www.w3.org/ns/ws-policy" xmlns:fi="http://java.sun.com/xml/ns/wsit/2006/09/policy/fastinfoset/service" xmlns:tcp="http://java.sun.com/xml/ns/wsit/2006/09/policy/soaptcp/service"
  27. >
  28.  
  29. <message name="otaHotelResNotif"/>
  30. <message name="otaHotelResNotifResponse"/>
  31. <portType name="WebServiceForTrust">
  32. <operation name="otaHotelResNotif">
  33. <input message="tns:otaHotelResNotif"/>
  34. <output message="tns:otaHotelResNotifResponse"/>
  35. </operation>
  36. </portType>
  37. <binding name="WebServiceForTrustPortBinding" type="tns:WebServiceForTrust">
  38. <wsp:PolicyReference URI="#WebServiceForTrustPortBindingPolicy"/>
  39. <operation name="otaHotelResNotif">
  40. <input/>
  41. <output/>
  42. </operation>
  43. </binding>
  44. <service name="WebServiceForTrustService">
  45. <port name="WebServiceForTrustPort" binding="tns:WebServiceForTrustPortBinding"/>
  46. </service>
  47. <wsp:Policy wsu:Id="WebServiceForTrustPortBindingPolicy">
  48. <wsp:ExactlyOne>
  49. <wsp:All/>
  50. </wsp:ExactlyOne>
  51. </wsp:Policy>
  52. </definitions>
  53.  
  54. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  55. <ns2:AMConfig xmlns:ns2="http://identity.netbeans.org/access_manager_config_1_0">
  56. <ProviderConfig type="WSP" name="WebServiceForTrustService">
  57. <SecurityMechanism uri="urn:sun:wss:security:null:UserNameToken-Plain"/>
  58. </ProviderConfig>
  59. </ns2:AMConfig>
Add Comment
Please, Sign In to add comment