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 Mike Panzitta <mp...@peoplematter.com> on 2004/04/12 21:08:53 UTC

How can I specify the service host/port in autogenerated WSDL?

Hi all,
 
I am deploying some Axis-based web services using the integrated
approach, with all files combined into a WAR file to be deployed into
Tomcat (which happens to be running within JBoss 3.2.3). Access to the
web services is through an Apache httpd fronting server (for numerous
reasons), and the development process is such that we have several
server stacks for development, QA, and production (each with a
JBoss/Tomcat/Axis server and Apache front server). In addition, it is
likely that we will be using NATting firewalls in front of the server
stacks.
 
I am unable to figure out how to have the <wsdlsoap:address
location="xxx" /> element in the autogenerated WSDL use the host and
port of the corresponding fronting server. I discovered the <endpointURL
/> element in the WSDD, but as far as I can tell, this specifies a
static value, and the host/port can't be specified from within the
packaged WAR file; it needs to be specified somewhere in the server
configuration (e.g. system property, Tomcat or JBoss configuration,
etc.). I'm looking for some kind of solution that would let me use
something like
<endpointURL>${httpd.host.and.port}/axis/services/myService</endpointURL
> in the WSDD (where "httpd.host.and.port" is a system or other
externally specified property). Alternatively, is there an option to
force the host/port of the <wsdlsoap:address location="xxx" /> element
to take its value from the Host: HTTP request header?
 
The bottom line is that if the autogenerated WSDL is obtained from
http://myhost.mydomain:9999/axis/services/myService?wsdl , then the host
and port in the WSDL's <wsdlsoap:address location="xxx" /> element
should use myhost.mydomain:9999 for the host and port portion. This can
be automagically determined, or it can be specified in the server
configuration, but it can't be defined from within the packaged WAR
file.
 
I have to believe that others have encountered this issue before me. Any
assistance or pointers would be greatly appreciated. BTW, we are using
Axis 1.1, but if a solution exists in 1.2, we can certainly go that
route.
 
Thanks in advance,
 
-Mike
 
---
Dr. Michael J. Panzitta
VP, Technology
PeopleMatter, Inc.
Voice: +1 (425) 482-4444
Mobile: +1 (206) 979-7769
www.peoplematter.com