9 Replies Latest reply on Sep 14, 2007 3:06 AM by Richard Opalka

    change in run-time the soap:address location of wsdl.

    amit Newbie

      Hi, I'm tring to create a j2ee client which will call to webservice.
      Only at run time I know the ip of the machine that runs the web-service.

      Do I need to parse the wsdl file and to replace the string <REPLACE_WITH_ACTUAL_URL> by the real ip ?
      Is there another option? I know when using the stub option (which doesn't implemented in JBOSS) there is an option to change the end point IP address in the stub

      _setProperty(ENDPOINT_ADDRESS_PROPERTY, "http://tulip.imagine-com.local:12124");
      


      Currently my code looks as follow
      URL mappingLocation = this.getClass().getClassLoader
       .getResource("META-INF/jaxrpc-mapping.xml");
      File file = new File("C:/a.wsdl");
      URL url = new URL(file.toURL().toString());
      QName serviceName = new QName("http://com.bbb.aa",
       "aaService");
      ServiceFactoryImpl factory = (ServiceFactoryImpl) ServiceFactory
       .newInstance();
      Service service = (Service) factory.createService(url, mappingLocation,
       null, serviceName, null);