cancel
Showing results for 
Search instead for 
Did you mean: 

Soap headers issue

pmarreddy
Champ in-the-making
Champ in-the-making
hi,

i am trying to coonect to the repository using an laszlo (presentation server) i can connect to  teh authentication web service service, some how i am not able to connect to the rest of the services, on further investiagation i found we need to set the header using the ticket. now i need to know is the header format right or am imissing some this here.

<wsseSmiley Frustratedecurity xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/07/secext" soapenv:mustUnderstand="true">
<wsse:UsernameToken>
<wsse:Username>admin</wsse:Username>
<wsseSmiley Tongueassword Type="wsseSmiley TongueasswordText">Ticket</wsseSmiley Tongueassword>
</wsse:UsernameToken>
</wsseSmiley Frustratedecurity>


what is the version of wsdl files? 1.1 or 1.2 my cleint only supports 1.1




adv thanks prasanth
4 REPLIES 4

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

The header expected by the web services upto 1.2RC2 is:




<wsse:Security soap:mustUnderstand="1">              
   <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <wsse:Username>admin</wsse:Username>
      <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_7c6a9e2b-a389-11da-983b-911c53c687cc</wsse:Password>
   </wsse:UsernameToken>
</wsse:Security>


As from 1.2 (ie the next release) you will also need to pass the timestamp  information.  This has been added to support .NET:




<wsse:Security soap:mustUnderstand="1">
   <wsu:Timestamp wsu:Id="Timestamp-070e548d-5a45-48d7-acf3-c2c4d0b7b506">
      <wsu:Created>2006-02-22T09:56:27Z</wsu:Created>
      <wsu:Expires>2006-02-22T10:01:27Z</wsu:Expires>
   </wsu:Timestamp>
   <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <wsse:Username>admin</wsse:Username>
      <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_7c6a9e2b-a389-11da-983b-911c53c687cc</wsse:Password>
   </wsse:UsernameToken>
</wsse:Security>


Hope this helps,
Roy

benji
Champ in-the-making
Champ in-the-making
I am trying to access an alfesco server with plain old SOAP messages - I used a trace to record a Java client and tried sending the exact same SOAP message. However, I get a error saying

WSDoAllReceiver: security processing failed; nested exception is:
   org.apache.ws.security.WSSecurityException: General security error (WSSecurityEngine: Callback supplied no password for: ticket)

I don't know anything about WS Security, but  is there some way of setting up the server so that it doesn't require a callback ?

Here is the SOAP message…

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header>
      <wsseSmiley Frustratedecurity xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
         <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2006-04-10T09:47:39.218Z</wsu:Created>
            <wsu:Expires>2006-04-10T14:52:39.218Z</wsu:Expires>
         </wsu:Timestamp>
         <wsse:UsernameToken>
            <wsse:Username>admin</wsse:Username>
            <wsseSmiley Tongueassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin</wsseSmiley Tongueassword>
         </wsse:UsernameToken>
      </wsseSmiley Frustratedecurity>
   </soapenv:Header>
   <soapenv:Body>
      <getStores xmlns="http://www.alfresco.org/ws/service/repository/1.0"></getStores>
   </soapenv:Body>
</soapenv:Envelope>

benji
Champ in-the-making
Champ in-the-making
Actually, I noticed in the trace that the username is "ticket" for some reason, rather than "admin"…which should I use?


Actual trace…..

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<wsseSmiley Frustratedecurity xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2006-04-10T09:47:39.218Z</wsu:Created><wsu:Expires>2006-04-10T09:52:39.218Z</wsu:Expires></wsu:Timestamp>
<wsse:UsernameToken><wsse:Username>ticket</wsse:Username><wsseSmiley Tongueassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_0edcdd8e-c877-11da-949e-055f5e3172b9</wsseSmiley Tongueassword></wsse:UsernameToken></wsseSmiley Frustratedecurity></soapenv:Header><soapenv:Body><getStores xmlns="http://www.alfresco.org/ws/service/repository/1.0"></getStores></soapenv:Body></soapenv:Envelope>

suvaraj
Champ in-the-making
Champ in-the-making
Hi,

I am trying some web service requests to the "getRepositories" service under the WSDL, http://localhost:8080/alfresco/cmis/RepositoryService using the soapUI tool.

The request is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cmis.org/2008/05">

<soapenv:Header>
<wsseSmiley Frustratedecurity xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2009-01-20T17:05:10.609Z</wsu:Created>
<wsu:Expires>2010-01-20T20:05:22.609Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>vinila</wsse:Username>
<wsseSmiley Tongueassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_1c07c25b8dfae8e5746d877337c529aaa8b0ea7a</wsseSmiley Tongueassword>
</wsse:UsernameToken>
</wsseSmiley Frustratedecurity>
</soapenv:Header>

<soapenv:Body>
<ns:getRepositories/>
</soapenv:Body>

</soapenv:Envelope>

The response is

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<wsseSmiley Frustratedecurity xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp wsu:Id="Timestamp-25511702" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2009-02-04T14:36:03.515Z</wsu:Created>
<wsu:Expires>2009-02-04T14:41:03.515Z</wsu:Expires>
</wsu:Timestamp>
</wsseSmiley Frustratedecurity>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soapSmiley Frustratederver</faultcode>
<faultstring>Incorrect password</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>

In the response, I get this SOAP fault: "Incorrect password".

The password used in the request was obtained from, http://localhost:8080/alfresco/service/ … n&pw=admin.

Am i missing something here? Please let me know how to resolve this issue.

Thanks