axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
Subject RE: Generated Class Configuration
Date Wed, 01 Oct 2003 13:35:32 GMT

In the Locator class there will be a get<ServiceName>(URL portAddress) function.

This is how you get a service class with a different endpoint that the one in the service
element of the WSDL.

You do not need to change WSDL2Java.

--
Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: Guillaume Sauthier [mailto:Guillaume.Sauthier@Bull.Net] 
Sent: Wednesday, October 01, 2003 9:20 AM
To: axis-dev@ws.apache.org
Subject: Generated Class Configuration

Hello all

Maybe I don't post this question at the right place but nobody on
axis-users list answer me. And I thinks that's a question that might be
interresting for the ones who are trying to use Axis in a J2EE compliant
way.

The problem is the following :
In order to integrate Axis in JOnAS (OpenSource J2EE Application
Server), we have to follow the JSR109/921. In this spec, they add a new
element in servlet and ejb Deployment Desc (the component that can be
WebServices client) : service-ref. 
This element describe the port that the component will use (with
port-component-ref element). And the port-component-ref can specify a
port-component-link, That just say that the port used by the client is
contained in the same application unit (ear file). So the URL location
of this port is unknown when we generate the Service implementation from
WSDL (the Definition with a dummy location attribute) and so we have to
specify it when deploying in
the server (we can then calculate the URL of the port).

That's for the context :) Now, how things works ?
When we generate Class from WSDL, Service class are generated with the
endpointURL of the WSDL (dummy value). And when we request a port with
this Service class, this endpointURL is always used, and we have no way
to change it (no accessor, more the endpointURL field is final!).

Is there a correct way to tell the Service class to use another endpoint
value (the updated one, computed at time of the endpoint deployment on
the Application Server)?

The easiest way I found is to change the WSDL2Java tool for removing the
"final" attribute of the endpointURL and add a setEndpointURL(QName
port, URL newURL) for replacing the endpoint value.

I will be pleased to read your point of view on this question. 

Regards

Guillaume

Mime
View raw message