On Sep 19, 11:54 am, Joseph Kesselman <keshlam-nos...@comcast.net>
wrote:
> The standard way to encapsulate XML within other XML is just to embed it
> directly as XML document content, rather than trying to escape it and
> having to run a second parse over it. That does require that the
> enveloping XML be sufficiently flexible to accept the "foreign" XML
> elements at the appropriate point.
>
> --
> Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Thanks Joe.
I agree that you describe a central pattern of XML and certainly the
design of XML Schema supports your suggestion. And WSDL, by
supporting XML Schema, lets one declare aribitrary XML types as valid
content, and bind those types to message parameters in the body of a
SOAP message. But a restriction on the overall implementation
involving the libraries mentioned is that these defined types are
typically mapped concretely to relatively fine-grained Java objects
(as method parameters or returns) by Jax-WS or Axis, and what I want
is for the payload XML in the third-party format to come through as
unparsed text - I don't want it mapped to fine-grained Java types or
objects.
To put it another way, I'm not trying to define an XML message format
that combines features of the envelope with logical structures from
another schema; I'm trying to send an opaque XML payload in the
envelope, but I don't want the tier which handles the envelope to
effect any parsing or transformation on that payload. The goal is not
to extend one XML structure with another here; it is to put a chunk of
XML payload in an RPC parameter or return; it just so happens the RPC
stack also happens to use XML.
So I'm really asking a very specific question about using externally-
defined XML payloads in these kinds of SOAP webservice tools and
applications, not a general question about XML. With the popularity
of Java EE webservices with Jax-WS etc. and XML standards like XBRL,
MathML, etc. I'm hoping there's someone out there who has tread this
path.
TIA,
Chris
|