cancel
Showing results for 
Search instead for 
Did you mean: 

Web Service Integration Error

pal1984
Champ in-the-making
Champ in-the-making
Hi All,

I am integrationg my Application through Web service sapproach. The Alfresco server is on remote location.  I am able to create the session with Alfresco server, where I got the Authentication ticket as well. Now I suppose we have to use this ticket in each sub sequent calls to
Alfresco wsdls, in soap header.

Here is the SOAP Header which I am using….

<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" 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>admin</wsse:Username>
        <wsseSmiley Tongueassword Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TICKET_ce8e4b6190e652ecbe46af4ba11c3a3f977f1cb7</wsseSmiley Tongueassword>
      </wsse:UsernameToken>
    </wsseSmiley Frustratedecurity>
  </soapenv:Header>
</soapenv:Envelope>

Then I am calling method "GetStores" from the WSDL : repository-service.wsdl.  However I am getting an exception as "Error processing WSDL document:  java.lang.NullPointerException".

Kindly let me know the cause for this exception and resolution of the same.Also correct me if I am doing anyting wrong. 
One more question is, how do we get the timestamp ? I used timestamp from the forum only.   


Thanks !
Have a great time !!
4 REPLIES 4

pal1984
Champ in-the-making
Champ in-the-making
Hi,


Is there anyone who can reply to this post?  I am very new to Alfresco.
Please appreciate your quick help !!

tim-erwin
Champ in-the-making
Champ in-the-making
Hi Pal1984,

is there a reason why you don't use the alfresco web service library? You don't need to care about headers or whatever, just write code like

ticket = authenticationService.authenticate("username", "password")

Quite forward, ain't it? Smiley Wink

Tim

pal1984
Champ in-the-making
Champ in-the-making
Hello Tim-Erwin ,

Thanks for your reply. Actually I tried using the webservices APIs directly, but there is some compatibility issues with the tool-teamworks which is calling these API, does not recognise the outputs given by these APIs. But when I am calling through WSDL that tool makes it easy to map the input/output parameters. Hence that is the approach.

The WSDls are discovered by teamoworks, but suppose if I call simple getStores() method, I get below error which is related to some parsing, I do not underatnd why this is coming.

Error processing WSDL document: 
WSDLException (at /wsdl:definitions/wsdl:types/schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at '/alfresco/wsdl/headers.xsd', relative to 'http://<INSTALLED_SERVER>:8080/alfresco//wsdl/repository-service.wsdl'.: no content-type: java.net.UnknownServiceException: no content-type

Do you have any suggestions?   What are the exact steps to consume Alfresco web services?

Thanks

tim-erwin
Champ in-the-making
Champ in-the-making
To be honest, I have no idea how to talk with Alfresco in SOAP directly, sorry. Can't you convert the web service types like result sets and so to what you need? Good luck…