axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: Generated Class Configuration
Date Wed, 01 Oct 2003 14:30:27 GMT
ok. i see your point. Can you please submit a patch? (remove final and add setEndpoint method).
Here are the instructions for submitting a patch.
(http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/SubmitPatches)

Thanks,
dims

PS: Is your JSR 109 Impl tightly integrated to JONAS? We need an 109 impl for Geronimo
(http://wiki.codehaus.org/geronimo/Architecture/WebServices)

--- Guillaume Sauthier <Guillaume.Sauthier@Bull.Net> wrote:
> Thanks for the response :)
> 
> Ok, Maybe this time I'll success to explain my problem :) 
> 
> In fact, what I want to do is to use the generated classes (for the
> client side) with a different Endpoint URL.
> Because I am integrating Axis in an Application Server, and the user
> must get an already configured interface when he perform a lookup on the
> service, I have some constraints :
> 
> I cant say to the client : "If you use a webservices endpoint from a
> module in the same application unit, you have to set the URL by hand in
> your code!" It's impossible!
> Here is a code snippet from the spec :
> <snippet>
> InitialContext ic = new InitialContext();
> AddressBookService abf = (AddressBookService)  
> ic.lookup("java:comp/env/service/AddressBookService");
> </snippet>
> 
> So I have to preconfigure the service objects he will retrieve from the
> lookup call.
> When the user have a generated service class binded in the JNDI, the
> endpoint URL of the Ports he might access are hardcoded! So I cannot
> change them ! (no setEndpoint methods !).More, the generated Service
> class construct a new **SoapBinding for each <service>.get<PortName>()
> call (with the hardcoded endpointURL :'( ).
> 
> That why the only solution I find is to modify WSDL2Java!
> 
> Regards
> Guillaume
> 
> Davanum Srinivas wrote:
> > 
> > Guillaume,
> > 
> > Am confused. Are you talking about the **BindingStub.java class? It's not needed
on the
> > server-side. It's used from a client when the client wants to invoke the service.
That's the
> only
> > class that has a endpointURL param, note that **BindingStub.java classes have additional
> > constructors where you can pass in the endpoint url as well.
> > 
> > Thanks,
> > -- dims
> > 
> > --- Guillaume Sauthier <Guillaume.Sauthier@Bull.Net> wrote:
> > > 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
> > 
> > =====
> > Davanum Srinivas - http://webservices.apache.org/~dims/


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

Mime
View raw message