AnsweredAssumed Answered

Web Services Question

Question asked by luisg on Jul 16, 2009
Latest reply on Sep 29, 2009 by openpj
Hi there. I've a big problem here, and don't know how to solve this.
Imagine the following scenario:
An application, A, need to access to a Web Service, B, (in a Tomcat 1) to invoke something. When A, make a request to B, B should make an operation in Alfresco (running in Tomcat 2). example: A make a request to B to create a folder in Alfresco. you know what I mean?

I did a Web Service in Eclipse and I wrote a simple function to login in Alfresco: the function receive a user (String) and a password (String) and return a message (String) that indicate if login succeeds or not. After that I generated a client with the wsdl.
If I make a request with that client to the service, giving the credentials ('admin', 'admin') I get this:





pt0103 is the name of my machine.

The code is working, cause I did a test with a class with that code. the code is:

public String novaAccao(java.lang.String user, java.lang.String pass){
      final String URL = "http://localhost:8080/alfresco/api";
      String result;
         System.out.println("Logging to " + URL);
         AuthenticationUtils.startSession(user, pass);
         result = "success";
      catch(Exception e)
            result = "fail";
      return result;

Any of you have (or had) the same problem?
What am I doing wrong?

Please, Help