3 Replies Latest reply on Jun 17, 2010 10:14 PM by jim.ma

    Replacing REPLACE_WITH_ACTUAL_URL in wsprovide?

      All,

      I have a Maven 2 build that does a wsprovide server gen.  The generated WSDL then gets sent to another group who use Axis to generate their client stubs (this allows doing a client gen whether the web service is running or not).  The problem is that the WSDL generated by wsprovide has a soap address of REPLACE_WITH_ACTUAL_URL.  When the other group tries to run their client gen, it blows up due to an invalid URL.  How can I have wsprovide (or Maven) provide the actual URL (or at least a valid one that would allow the client gen to succeed)?  The client gets the soap address from a property at runtime, so the whole soap address in the WSDL is unimportant.

       

      TIA

        • 1. Re: Replacing REPLACE_WITH_ACTUAL_URL in wsprovide?
          jim.ma

          Setting the Endpoint address property in BindingProvider.getRequestContext can resolve your problem ?

          • 2. Re: Replacing REPLACE_WITH_ACTUAL_URL in wsprovide?

            Thanks for the answer.  Being new to JBoss, I'm not familiar with where I'd put that.  Is there a handler or something that is called when doing a wsprovide where that code goes?  If so, how do I configure wsprovide to identify the handler?

             

            TIA

            • 3. Re: Replacing REPLACE_WITH_ACTUAL_URL in wsprovide?
              jim.ma

              I mean you do not need to change the REPLACE_WITH_ACTUAL_URL in wsprovide . You can just set the endpoint address in client side , below is the example to set the address:

               

                       Service service = Service.create(wsdlLocation, new QName(""));
                       echoPort = service.getPort(EchoPortType.class);
              
              
                       ((BindingProvider)echoPort).getRequestContext().put(
                                  BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                  "http://"+getInteropServerHost()+":8080/echo"
                          );
              
              

               

              Does this work for your case ?