Jump to content

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


Recommended Posts

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();
         WebService = WebServiceEndpoint.getCAdxWebServiceXmlCC();
      } catch (ServiceException error){
         logger.error(e.getMessage(), error);

X3WS serv = new X3WS(endPoint, codeLang, codeUser, password, poolAlias, requestConfig);
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


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

  • Create New...