You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mirae-user@ws.apache.org by Blake Scholl <bl...@pelago.us> on 2006/02/26 19:32:10 UTC

Using the same request/response classes on client & server

Hi all,

 

In my application, I'm trying to share the same request/response classes
between my client and server.  I've read a lot of docs and FAQs, but I
haven't been able to find documentation on how to do this.

 

In case this isn't clear, let me explain what I'm trying to do with a
concrete example.  Let's say I have a PolygonService which returns a
com.pelago.Polygon.  The Polygon class not only describes a Polygon but
also provides some utility methods (such as computeArea()).  This is all
fine and dandy on the server side, but when I auto-generate a client
from WSDL, the code generator doesn't know that the Polygon structure
described by the WSDL maps onto the com.pelago.Polygon class and it
generates its own separate Polygon class.  This works for moving data
around, but then I need to write adapter code to translate the
auto-generated Polygon object into a com.pelago.Polygon that has the
methods I need.

 

This is of course inefficient both from a runtime and development
perspective.  I'd like the generated client to just marshal and
unmarshall directly to/from the same classes I'm using on the
server-side. 

 

Thanks in advance for any advice you can offer.  I hope I'm not asking a
question here which is covered in an FAQ I've overlooked.

 

Cheers,

--Blake

 

 

--

Blake Scholl

Director, Product Development

Pelago, Inc.

cell: 206.276.6523

fax: 206.725.9285

blake@pelago.us