1 Reply Latest reply on Jan 16, 2008 10:03 AM by Zeeshan Javeed

    SOAP Request and Response- Compatibility with old clients.

    Zeeshan Javeed Newbie

      HI All,

      I would like to confirm about 'arg0' in soap request.

      The soap request part looks like :
      <ns1:startSession xmlns:ns1="http://ips.iplabs.de/types">
      <arg0>
      0.5
      0
      </arg0>
      </ns1:startSession>

      and the request coming from one the old client is like

      <ns0:startSession>
      <TSession_1>
      0.5
      0
      </TSession_1>
      </ns0:startSession>

      the handling code in implementation file is :

       public TSession startSession(TSession session)
       {
       if(session != null)
       {
       log.debug("Start session");
      
       }
       else
       {
       log.error("Session is null");
       return null;
       }
       }
      



      In the frist request , I got Start Session while in the later request it says Session is null.
      I replaced "TSession_1" wiht "arg0" in SOAP Handler and then the old request also worked fine.

      Any Idea why we are getting arg0 there and why Server is depending on variables name there other then the object pased.

      the defenition of the method in interface class is :
      @WebMethod
       @WebResult(name = "result", targetNamespace = "")
       @RequestWrapper(localName = "startSession", targetNamespace = "http://ips.iplabs.de/types", className = "de.iplabs.ips.types.StartSession")
       @ResponseWrapper(localName = "startSessionResponse", targetNamespace = "http://ips.iplabs.de/types", className = "de.iplabs.ips.types.StartSessionResponse")
       public TSession startSession(
       @WebParam(name = "TSession_1", targetNamespace = "")
       TSession tSession1);
      
      



      This problem is also valid for return type. It is sending return object with name of "return" and client is expecting "result".

      Regards,
      Zeeshan