axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Davis <...@us.ibm.com>
Subject Re: AnyContentType
Date Sat, 12 Jul 2003 12:23:42 GMT





Interesting - Not sure if its still in there, but a long time ago you were
supposed to be able to ask for the payload in various forms - including as
an input stream, DOM or when whatever form it might current be - like SAX
events.  Seems like this is similar.  I took a quick look thru the samples
and didn't notice anything in there using this - could you add one so
people could learn more about it and in particular how its supposed to be
used.
-Dug


Thomas Sandholm <sandholm@mcs.anl.gov> on 07/12/2003 01:15:40 AM

Please respond to axis-dev@ws.apache.org

To:    axis-dev@ws.apache.org, axis-dev@ws.apache.org
cc:
Subject:    Re: AnyContentType


At 10:26 PM 7/11/2003 -0600, Doug Davis wrote:





>I'm confused - Element can map to xsd:any - whether Axis does it properly

No an xsd:any maps to a Bean containing an array of  MessageElements. I
think that is the proper way of doing it too, although it should really be
SOAPElements to be more JAX-RPC friendly. An any is conceptually an XML
payload part with lax processing or deferred deserialization, and thus maps

nicely into MessageElement which is the format all SOAP payloads are
coverted to before being further deserialized.

>or not is something different - but its possible, so why can't Element be
>used in place of AnyContentType?

Part of the confusion here is that you are talking about a Java->WSDL
scenario whereas I am talking about a WSDL->Java scenario. And there is no
way, and in my opinion shouldn't either be a way, to define a type or
construct in XML schema that maps to a DOM Element. .NET in fact does a
mapping to an XML Infoset DOM like object, and we have found that to be a
big limitation compared to the model currently implemented in Axis.

>Not sure about the performance gain since
>the minute anyone wants to do something with a MessageElement it will be
>convert into a DOM, right?

No incorrect. We have a lot of use cases where the xsd:any travels through
SOAP intermediaries not interested in the content of various pieces (and
not aware of typemappings for the payload) of the request. When the payload

eventually ends up at the final destination (aware of the typemappings of
the payload), the MessageElement format makes it easy to kick in the
correct deserialization into a particular java type without having to go
through the DOM Element format. The xsd:any construct and the mapping to a
MessageElement thus makes perfect sense in this scenario. The
AnyContentType is just to tag beans generated from a XMLSchema complex
type, and containing an xsd:any definition with an interface so that
generic processing can be performed on that XML payload part. We may
convert the XML to a java type, just a string buffer or a DOM Element
depending on the availability of typemappings and the application context.

/Thomas

>-Dug
>
>
>Thomas Sandholm <sandholm@mcs.anl.gov> on 07/12/2003 12:24:21 AM
>
>Please respond to axis-dev@ws.apache.org
>
>To:    axis-dev@ws.apache.org, axis-dev@ws.apache.org
>cc:
>Subject:    Re: AnyContentType
>
>
>The purpose of the AnyContentType is to have an interface in common for
all
>
>types that contain an xsd:any element definition, so that utilities can
>assume the availability of the get_any and set_any operations without
>knowing the actual type. There is no type or construct in wsdl that maps
to
>
>Element as far as I know, and the fact that xsd:any elements do not get
>deserialized into DOM Elements automatically  (but instead
MessageElements)
>
>can be a big performance gain.
>/Thomas
>At 05:19 AM 7/11/2003 -0600, Doug Davis wrote:
>
>
>
>
>
> >What's the purpose behind the AnyContentType class?
> >I have a feeling it might to support any generic chunk of XML as a param
>in
> >the RPC case, but if so why not just use Element?
> >-Dug
>
>Thomas Sandholm <sandholm@mcs.anl.gov>
>The Globus Project(tm) <http://www.globus.org>
>Ph: 630-252-1682, Fax: 630-252-1997
>Argonne National Laboratory





Mime
View raw message