Jump to content

Problems in migrating to Sage 12 an existing Java web application for calling a web service


 Share

Recommended Posts

Hi,
I have some problems in migrating to Sage 12 an existing Java web application for calling a web service.Now I have a Java web application that properly calls a Sage web service and the source code is the following

public class X3WS {
    ...

   StringBuffer XmlInput = new StringBuffer();
   public CAdxResultXml ResultXML = null;
   public CAdxWebServiceXmlCCServiceLocator WebServiceEndpoint;
   public CAdxWebServiceXmlCC WebService = null;
   public CAdxCallContext caller = new CAdxCallContext();

   public void Init() {
      WebServiceEndpoint = new CAdxWebServiceXmlCCServiceLocator();
      WebServiceEndpoint.setCAdxWebServiceXmlCCEndpointAddress(this.endPoint);
      try{
         WebService = WebServiceEndpoint.getCAdxWebServiceXmlCC();
      } catch (ServiceException error){
         logger.error(e.getMessage(), error);
      }
      caller.setCodeLang(this.codeLang);
      caller.setCodeUser(this.codeUser);
      caller.setPassword(this.password);
      caller.setPoolAlias(this.poolAlias);
      caller.setRequestConfig(this.requestConfig);
   }
   ...
}

X3WS serv = new X3WS(endPoint, codeLang, codeUser, password, poolAlias, requestConfig);
serv.Init();
serv.WebService.save(serv.caller, sendDocumentData.serviceType, inputXmlDoc);


With Sage 12 I have to do a Basic Authentication.

In an .NET example I founded that I need to create a new CAdxWebServiceXmlCCServiceBasicAuth class
that overrides the getWebRequest(uri) of the .NET CAdxWebServiceXmlCCService method (see the image below),

but I haven't the getWebRequest(uri) method in the Java CAdxWebServiceXmlCCService generated from the WSDL definition.

Any suggestions to create a Java class version of the CAdxWebServiceXmlCCServiceBasicAuth .NET class?

Thank you in advance, best regards

 Alessandroimage.png.ece489dba3a39a9f25d354bb9043ae51.png

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...