Thanx for the quick response.
What I understand from your email is:
1. The consumer of a web service can use the (generated, in my case)
wsdl to determine the structure of any data that is required by the web
service so there is no need for actual class definitions to be
exchanged.
2. Pojos are actually shipped as xml. This is as I understood from my
days using DOTNET.
3. While I could directly manipulate xml, that would be unnecessarily
complex since Axis does it out-of-the-box.
This all sounds like goodness to me but feel free to correct me if I
misunderstood. :-)
Thanx again,
Garth
Anne Thomas Manes wrote:
Neither Axis nor Axis2 send or receive POJOs. As with any
web services
platform, they send and receive XML messages. But what they can do is
automatically map the XML messages to POJOs so that the application
can work with Java objects rather than XML. But even if you elect to
work with POJOs, there is no requirement for the client and server to
share the same class definitions. The only thing that needs to be
shared is the WSDL definition.
Axis and Axis2 support POJO mapping using Java/XML binding frameworks.
Axis includes a built-in Java/XML binding framework that conforms to
the binding specificed in the JAX-RPC specification. Axis2 provides a
plug-in framework that can support any Java/XML binding framework.
Axis2 provides a lightweight binding framework (Axis2 Data Binding
[ADB]), but you can also use XMLBeans, JiBX, JAXB, and other
databinding frameworks. It can support Castor, too, although I haven't
seen anyone implement support for it yet.
You really don't want to send/receive the XML as a string, because
then it would be serialized as an encoded XML string. What you want is
to send serialized XML, (which is what the binding frameworks do for
you.)
Both Axis and Axis2 permit you to work directly with the XML if you
prefer rather than mapping the XML to Java objects. In Axis, you use
the "message" style interface, which maps the serialized XML to DOM.
In Axis2, you use AXIOM, an XML data model based on StAX.
Anne
On 1/10/07, Garth Keesler <[EMAIL PROTECTED]> wrote:
I know that Axis makes it easy to send/receive pojos (I've never
actually
made this work yet but I believe it's true:-) using web services but
this
requires that both ends have access to the class definition. I would
prefer
to send/receive xml as a string avoiding that requirement,
loading/unloading
the xml into an instance of the class in the service. I've read a bit
on
Castor but I'm curious if there isn't something built into Tomcat/Axis
that
would do this.
Thanx,
Garth
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
|