You could build a proxy for your generic service.
Here's what I think: build a sparcling new web service from scratch by
writing a good, clean WSDL document and generate some Java classes based
on it - I usually use the Xfire Eclipse plugin for this, works like a
charm. Among the generated Java stuff will be some MyServiceImpl class
or the like, with methods that are ready to be populated with
functionality. In these methods, I'de just redelegate the calls to your
generic service and, if required, handle the marshalling/conversion of
input and output in order to completely encapsulate all the
non-standardness of you generic service.

Hope it helps. :)

-----Original Message-----
From: Lee Breisacher [mailto:[EMAIL PROTECTED] 
Sent: 15. februar 2007 21:58
To: [email protected]
Subject: [xfire-user] "Generic" Service?

I'm hoping someone has some suggestions for how I can use XFire to
implement a particular style of soap server. I already have a Java
request/response service (ordinary meaning of "service", not the XFire
nor SOAP/WSDL definition of the word "service") and I want to put a
SOAP/WSDL "face" on it (it was written quite a while ago, before SOAP
and WSDL were even standards). The way my request/response service works
is that there's just one entry point - it accepts a request object that
contains the name of the request along with any input parameters and it
returns a single object containing the response. It handles dispatching
the request to specific backend logic based on the request name (and
some other stuff - details are unimportant here). In other words, I do
not have a separate Java Method for each possible operation - I just
have a single "generic" Method.

I've been studying and experimenting with XFire and it seems to be
somewhat insistent that there be a separate Java Method for each Service
Operation, and the Method signature must (basically) match the WSDL
operation signature.

What I was hoping to do is arrange some XFire objects so that all
incoming SOAP requests could all be directed towards a single generic
method which accepts an array of parameter Objects (I can take care of
the data binding aspect of the problem -- converting SOAP objects to my
internal parameter types and back) and returns a single (or perhaps an
array of) Object.

I'm very impressed with the overall design of XFire - the "assortment"
of classes available (Service, Invocation, Binding, etc) seem to lend
themselves to easy building-block style development -- it seems like I
should be able to accomplish what I want to do, but so far have been
unsuccessful in figuring it out.

Any suggestions?

Thanks,

Lee

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to