You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Bill Keese <bi...@tech.beacon-it.co.jp> on 2005/01/27 01:10:18 UTC

inconvenient host name / port # in WSDL file

It's inconvenient having the host name / port number in the WSDL file,
like below, because every time you setup your service on a new machine
you have to manually modify the WSDL file with the new machine's name.
Do other people have a trick for dealing w/this inconvenience? Are
people dynamically generating their WSDL files, similar to the way JSP
pages are dynamically generated?

<wsdl:service name="MyService">
<wsdl:port binding="impl:InicioSoapBinding" name="MyService">
<wsdlsoap:address location="http://localhost:8080/axis/services/MyService"/>
</wsdl:port>
</wsdl:service>

Thanks,
Bill


Re: inconvenient host name / port # in WSDL file

Posted by Anand Natrajan <an...@cs.virginia.edu>.
Bill,

If you use the WSDD file when you change machines, you don't have to bother
with the WSDL. Just re-deploy the WSDD file (which doesn't contain
machine-specific information) on whatever machine you like and voila, you'll
get a WSDL that contains that machine's information.

The specs for web services state that the machine name and port number be
part of the description for a service. In other words, the presence of the
machine and port there is essential so that clients can locate the service.

If I want to use the WSDL alone (and specifically not the WSDD) then I write
an Ant filter to strip out the old host/port and paste the new one. Shown
below is such a filter.
	<replaceregexp file="${wsdl.dir}/MyService.wsdl"
		match="https://Host1:Port1" replace="https://Host2:Port2"/>

Anand

On Thu, 27 Jan 2005, Bill Keese wrote:

: It's inconvenient having the host name / port number in the WSDL file,
: like below, because every time you setup your service on a new machine
: you have to manually modify the WSDL file with the new machine's name.
: Do other people have a trick for dealing w/this inconvenience? Are
: people dynamically generating their WSDL files, similar to the way JSP
: pages are dynamically generated?
:
: <wsdl:service name="MyService">
: <wsdl:port binding="impl:InicioSoapBinding" name="MyService">
: <wsdlsoap:address location="http://localhost:8080/axis/services/MyService"/>
: </wsdl:port>
: </wsdl:service>
:
: Thanks,
: Bill

Re: inconvenient host name / port # in WSDL file

Posted by Patrick Cogan <pa...@gmail.com>.
Using Axis RC2 it automatically substitutes the correct url of the
machine it is running on, regardless of what the actual value is in
the wsdl. This works even if you specify in the deploy.wsdd
<wsdlFile>/xxx.wsdl</wsdlFile>under <service> element for you service.

Regards,

Patrick.


On Thu, 27 Jan 2005 09:10:18 +0900, Bill Keese
<bi...@tech.beacon-it.co.jp> wrote:
> It's inconvenient having the host name / port number in the WSDL file,
> like below, because every time you setup your service on a new machine
> you have to manually modify the WSDL file with the new machine's name.
> Do other people have a trick for dealing w/this inconvenience? Are
> people dynamically generating their WSDL files, similar to the way JSP
> pages are dynamically generated?
> 
> <wsdl:service name="MyService">
> <wsdl:port binding="impl:InicioSoapBinding" name="MyService">
> <wsdlsoap:address location="http://localhost:8080/axis/services/MyService"/>
> </wsdl:port>
> </wsdl:service>
> 
> Thanks,
> Bill
> 
>

Re: inconvenient host name / port # in WSDL file

Posted by Peter Molettiere <pi...@axonstudios.net>.
On Jan 26, 2005, at 4:10 PM, Bill Keese wrote:

> It's inconvenient having the host name / port number in the WSDL file,
> like below, because every time you setup your service on a new machine
> you have to manually modify the WSDL file with the new machine's name.

Look at the filtering="on" option on the copy command in ant.

--
Peter Molettiere
Senior Engineer
Truereq, Inc.
http://www.truereq.com/