Does that mean that this is something that the WS-I basic profile missed? Or is 
it 
deliberate that they do not recommend any other mechanism?

The issue is that for a specific application, the schema may be well known so 
that
it can be a part of the WSDL. But for tool developers, who want to provide an 
API that
enables multiple applications to exchange XML documents, it becomes a big 
problem.

String is not really an option since the xml document may be of unknown size 
based on
the specific application. 

Attachments are also not an option since specific apps may want to use 
WS-Security.

The ideal thing would be to translate the WSDL to an endpoint
interface that accepts and sends out a DOM (again, consider that we are not 
using the
message style of axis). But a how to you express an operation that accepts a 
DOM as
a parameter other than use xsd:any or xsd:anyType?

Shantanu

--- Anne Thomas Manes <[EMAIL PROTECTED]> wrote:

> The WS-I Basic Profile does not permit use of xsd:any or xsd:anyType. It
> also does not recommend any other mechanism for exchanging arbitrary XML. I
> think you should assume that the general rule is not to exchange arbitrary
> XML if your goal is to achieve interoperability.
> 
> I can think of three ways to exchange arbitrary XML:
> 1. encode it as a string
> 2. send it as an attachment
> 3. use xsd:any/xsd:anyType
> 
> I don't much care for the first option. Encoding it as a string makes it
> completely opaque to the web services infrastructure. This might not be an
> awful option, but it limits what types of things you can do -- for example,
> you can't sign the document and expect the signature to validate later after
> it's been decoded.
> 
> The second option would be reasonable if attachments were interoperable, but
> they aren't. And neither SwA/MIME nor WS-Attachments/DIME can be protected
> by WS-Security. (MTOM can be, but that's a future thing. And MTOM is
> designed for binary attachments, not XML attachments.)
> 
> Therefore, my preference is xsd:any/xsd:anyType. But recognize that you
> won't be WS-I compliant, and you will have to communicate out of band with
> your consumers what constraints may exist on the arbitrary XML and any rules
> regarding processing.
> 
> Anne
> 
> On 11/18/05, Shantanu Sen <[EMAIL PROTECTED]> wrote:
> >
> > But if the general rule is not to use xsd:any or xsd:anyType, what is the
> > preferred mode of exchanging an arbitrary xml document using doc/lit mode?
> >
> > If I do not want to use axis message style, how should I construct my WSDL
> > so that I can accept and return an arbitrary xml document?
> >
> > Shantanu
> >
> > > ________________________________
> > >
> > > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, November 14, 2005 4:27 AM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: How to handle xsd:anyType with Message Style web services ?
> > >
> > >
> > > As I said, the .NET client can construct the XML document and stuff it
> > > into a SOAP envelope using DOM with the System.XML API. But is it really
> > > necessary? How is the .NET client supposed to know what to send you?
> > >
> > > Is the document truly of xsd:anyType? Do you really not know in advance
> > > what the type of "in0" should be? If there is a predefined structure,
> > > then your WSDL should define that structure -- regardless of how you've
> > > elected to process it on the server side (message style vs document or
> > > wrapped).
> > >
> > > If you choose to use the message style, then you should edit the
> > > generated WSDL and add the appropriate schema definitions so that
> > > clients can more easily communicate with you.
> > >
> > > As a general rule, you shouldn't use <xsd:any>, <xsd:anyType>, or
> > > <xsd:anyAttribute> in your WSDL.
> > >
> > > Anne
> > >
> > >
> > > On 11/13/05, Kr <[EMAIL PROTECTED]> wrote:
> > >
> > > Thank you Anne.
> > >
> > > For my AXIS message style web service, the AXIS generated WSDL
> > > has
> > > <element name="in0" type="xsd:anyType"/> and can .NET consumer
> > > support
> > > this xsd:anyType and pass in an xml document using the generated
> > > stubs
> > > out of such WSDL's ?
> > >
> > >
> > >
> > >
> >
> >
> 

Reply via email to