axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Martin.Ba...@wellsfargo.com>
Subject RE: Generating generic stubs
Date Tue, 20 May 2008 15:58:22 GMT
Hi Paul,

I have used the XMLBeans binding with Axis2 to generate client stubs. I
have a number of potential end-points too, and I instantiate one
'Service' object (from the generated code) for each one. I pass the
Service object with the end-point I'm interested in to my framework/code
doing the actual call on this stub.

So far I have avoided touching the generated code at all so as to
minimize the coupling. I package the generated code in one archive, and
my framework in another to allow me to regenerate the stub as needed. I
user Spring to hook up the necessary resources.

As for package naming, use the -ns2p option in wsdl2java:

   -ns2p ns1=pkg1,ns2=pkg2  Specify a custom package name for each
namespace specified in the wsdls schema.


Hope this helps!

Martin

-----Original Message-----
From: paul.ockleford@nhs.net [mailto:paul.ockleford@nhs.net] 
Sent: Tuesday, May 20, 2008 7:42 AM
To: axis-user@ws.apache.org
Subject: Generating generic stubs

Hi,

We have provided an api that people wishing to interface with our system
must code to. This ensures that any users will provide the same objects
and the same service name that we will call.

What we would like to do is to create a set of generic stubs that we can
use to make a call to any provider, by looking up the end point in the
database for a particular system. So far I have in part achieved this by
calling
getService() and passing in an endpoint URL.

When I look at the code generated with wsdl2java it is not completely
generic though, I have overridden the package structure to look like
'stub.generic.ltc' but the namespaces in the generated classes still map
to the packages defined by the provider (I guess this is due to the WSDL
namespaces).

Has anybody done this sort of thing before? Is it possible? Am I
approaching this in the right way if it is possible? And should I be
editing the generated code to remove any namespaces?

Ideally the situation we would like to end up with is one set of stubs
generated and placed into a jar file, with the endpoint switched at
runtime to point to a particular provider, we would only ever use one
wsdl to generate the stubs and all new providers that would like us to
call this service would only need to provide us with an endpoint.

Thanks,

Paul Ockleford


**********************************************************************
This message  may  contain  confidential  and  privileged information.
If you are not  the intended  recipient please  accept our  apologies.
Please do not disclose, copy or distribute  information in this e-mail
or take any  action in reliance on its  contents: to do so is strictly
prohibited and may be unlawful. Please inform us that this message has
gone  astray  before  deleting it.  Thank  you for  your co-operation.

NHSmail is used daily by over 100,000 staff in the NHS. Over a million
messages  are sent every day by the system.  To find  out why more and
more NHS personnel are  switching to  this NHS  Connecting  for Health
system please visit www.connectingforhealth.nhs.uk/nhsmail
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message