dev@glassfish.java.net

Changing the <soap:address location=...> in WSDL file

From: Chris Loftus <cwl_at_aber.ac.uk>
Date: Thu, 08 Mar 2007 13:55:09 +0000

Hello,

Is there a way to get wsgen to change the WSDL <soap:address
location=uri..> ? When deploying locally the name of my PC is used: e.g.

http://pcpcwl:8080/CalculatorWS/CaclculatorWSService

The problem is that this name is also included in the WSDL element:

<xsd:schema>
<xsd:import namespace="http://ws/"
schemaLocation="http://pcpcwl:8080/CalculatorWS/CaclculatorWSService/__container$publishing$subctx/WEB-INF/wsdl/CaclculatorWSService_schema1.xsd"/>

</xsd:schema>

When a web service client imports this it fails since it doesn't know
the host pcpcwl.

How can I configure the hostname to use in the WSDL file? There didn't
seem to even be a way of manually editing this file on the server side,
either via the admin console, or netbeans or the wsgen command in the
build.xml file.

One workround suggested is to obtain the WSDL file and then edit it
manually on the server side to change the URI values and then use the
@WebService and its WSDL attribute. However, if there's some way to
specify the host when automatically generating WSDL from the wsgen
command then that would be better.

Many thanks,

Chris

-- 
Chris Loftus mbcs
University of Wales, Aberystwyth
Dept of Computer Science
Penglais, Aberystwyth
Ceredigion, SY23 3DB
Wales, UK
Tel: +44 (0)1970 622422