This is a feature, I think. In fact, it's a feature that my project likes. :)

The assumption is that you might have a dynamic SOAP client that can discover
a service as run-time and call it working only from the WSDL. In that case,
it's important that the WSDL contain the true endpoint. "True" means what the
client would call, so the WSDL varies according to the client's position on
your net.


If you want to publish WSDL with a textually-fixed endpoint, put the file on a
web server. External clients will all see the same WSDL, I think, so the
variations may not be a real problem.


On Tue, 18 Oct 2005, Richard Gregory wrote:

> Hi,
>
> Apologies if this has already been asked on the list, but I did a search
> and couldn't find anything. I'm developing some axis 1.2.1 web services
> running in a tomcat 5.5.9 server. I've written the wsdl files, and have
> these specified in the wsdd files for the services. At the moment the
> soap:address location for the service is specified with the IP address
> of my machine for testing, as follows:
>
> <service name="BiorsAdvancedQueryDocStyleService">
>     <port binding="tns:BiorsAdvancedQuerySOAPBinding"
> name="BiorsAdvancedQueryDocStyle">
> <soap:address location="http://<IP
> address>:8080/biorsws/services/BiorsAdvancedQueryDocStyle"/>
> </port>
> </service>
>
> I've noticed that axis changes the soap:address to reflect the URL used
> to request the wsdl. For example, if I call the wsdl files using, for
> example, http://<IP
> address>:8080/biorsws/services/BiorsAdvancedQueryDocStyle?wsdl , it is
> returned as I defined it in the wsdl:
>
> <service name="BiorsAdvancedQueryDocStyleService">
>     <port binding="tns:BiorsAdvancedQuerySOAPBinding"
> name="BiorsAdvancedQueryDocStyle">
> <soap:address location="http://<IP
> address>:8080/biorsws/services/BiorsAdvancedQueryDocStyle"/>
> </port>
> </service>
>
> However, if I call the wsdl with
> http://localhost:8080/biorsws/services/BiorsAdvancedQueryDocStyle?wsdl ,
> the wsdl is changed to:
>
> <service name="BiorsAdvancedQueryDocStyleService">
>     <port binding="tns:BiorsAdvancedQuerySOAPBinding"
> name="BiorsAdvancedQueryDocStyle">
> <soap:address
> location="http://localhost:8080/biorsws/services/BiorsAdvancedQueryDocStyle"/>
> </port>
> </service>
>
> and if I use the name of the machine on our local network
> (http://<machine
> name>:8080/biorsws/services/BiorsAdvancedQueryDocStyle?wsdl) the
> returned wsdl contains:
>
> <service name="BiorsAdvancedQueryDocStyleService">
>     <port binding="tns:BiorsAdvancedQuerySOAPBinding"
> name="BiorsAdvancedQueryDocStyle">
> <soap:address location="http://<machine
> name>:8080/biorsws/services/BiorsAdvancedQueryDocStyle"/>
> </port>
> </service>
>
> This happend whether I  request the wsdl in a browser, using WSDL2Java,
> when or using MS Visual Studio to generate a .Net client.  All other
> elements of the wsdl are unchanged, as far as I can see.
>
> I'm now at the stage where I want to deploy these services on our
> production server with a regular web address (http://www.gsf.de/.....)
> defined for the service within the wsdl, such as
>
> <service name="BiorsAdvancedQueryDocStyleService">
>     <port binding="tns:BiorsAdvancedQuerySOAPBinding"
> name="BiorsAdvancedQueryDocStyle">
> <soap:address
> location="http://www.gsf.de/ws/biorsws/services/BiorsAdvancedQueryDocStyle"/>
> </port>
> </service>
>
> with this address mapped to the actual location of the service. However,
> I'm now finding that if I request the wsdl for this service, as is
> changing the address in the returned wsdl to include the machine name
> and port on which the service is deployed.
>
> <service name="BiorsAdvancedQueryDocStyleService">
>     <port binding="tns:BiorsAdvancedQuerySOAPBinding"
> name="BiorsAdvancedQueryDocStyle">
> <soap:address location="http://<machine
> name>:8080/biorsws/services/BiorsAdvancedQueryDocStyle"/>
> </port>
> </service>
>
> Can anyone tell me why this is happening, and more importantly, is there
> a way to ensure that the wsdl returned by axis is exactly as I have
> defined it.
>
> Thanks in advance for your help.
>
> Richard.
>

Guy Rixon                                       [EMAIL PROTECTED]
Institute of Astronomy                          Tel: +44-1223-337542
Madingley Road, Cambridge, UK, CB3 0HA          Fax: +44-1223-337523

Reply via email to