8 Replies Latest reply on Apr 9, 2008 11:13 AM by Seevaratnam Karnan

    Web Service Response problem

    Seevaratnam Karnan Newbie

      Hi,

      Im using JBossws203GA with jboss405GA.
      I generated interfaces and service classes with wsconsume from wsdl file

      And i also wrote my client which will consume the service.
      BUt i have a prob with the response of the server.

      Details:

      here is my web method:

      
       @WebMethod(operationName = "OpenSession", action = "http://WebServicesToolkit.net/SV/SessionContext/v1.0/OpenSession")
       @RequestWrapper(localName = "OpenSession", targetNamespace = "http://WebServicesToolkit.net/SV/SessionContext/v1.0/", className = "net.webservicestoolkit.sv.sessioncontext.v1.OpenSession")
       @ResponseWrapper(localName = "OpenSessionResponse", targetNamespace = "http://WebServicesToolkit.net/SV/SessionContext/v1.0/", className = "net.webservicestoolkit.sv.sessioncontext.v1.OpenSessionResponse")
       public void openSession(
       @WebParam(name = "UserName", targetNamespace = "http://WebServicesToolkit.net/SV/SessionContext/v1.0/")
       String userName,
       @WebParam(name = "Password", targetNamespace = "http://WebServicesToolkit.net/SV/SessionContext/v1.0/")
       String password,
       @WebParam(name = "projectLanguage", targetNamespace = "http://WebServicesToolkit.net/SV/SessionContext/v1.0/")
       SVLanguage projectLanguage,
       @WebParam(name = "OpenSessionResult", targetNamespace = "http://WebServicesToolkit.net/SV/SessionContext/v1.0/", mode = WebParam.Mode.OUT)
       Holder<Result> openSessionResult,
       @WebParam(name = "SessionId", targetNamespace = "http://WebServicesToolkit.net/SV/SessionContext/v1.0/", mode = WebParam.Mode.OUT)
       Holder<String> sessionId){
      
       Holder<String> tmp = new Holder<String>("12345");
       sessionId = tmp;
       openSessionResult = new Holder<Result>();
       System.out.println("openSession");
      }
      


      here is the client:

      When i call the this remote method from the client, i always get the value 0.
      I checked the type of the response (0) with getClass().getName(), and i got String.

      Where is the prob,
      can someone help me
      thx a lot
       serviceName = new QName("http://WebServicesToolkit.net/SV/SessionContext/v1.0/", "SessionContext");
       SessionContext service = new SessionContext(wsdlLocation, serviceName);
       SessionContextSoap scs = service.getSessionContextSoap();
      
       Holder<Result> openSessionResult = new Holder<Result>();
       Holder<String> sessionId = new Holder<String>();
       System.out.println("sessionId avant appel: " + sessionId.value);
       scs.openSession("Karnan","azerty",SVLanguage.CONTEXT_DEFAULT,openSessionResult,sessionId);
       System.out.println("Karnan sessionId: " + sessionId);