You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by er...@free.fr on 2009/08/27 19:01:09 UTC

Question about xsd:any

Hello again,

I have a xsd with an extension, I mean something like that :

[...]
<xsd:sequence>
 <xsd:element name="begin" type="xsd:string" />
 <xsd:element name="end" type="xsd:string" />
 <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
[...]

I have a axis2 generated webservice. The response of this service use the above element of xsd).
Well the service send me something like that
[...]
<begin>start</begin>
<customfield1>this is a customfield</customfield1>
<customfield2>this is a customfield</customfield2>

Is there's a way to use the 'any' element in axis2 ? something like registering objects that can hold the de/serialization for 'any' ?
Can 'customFields' be some more complex elements ? like :
<customfield><firstfield>test</firstfield></customfield>


thank you for any help 

-- 
Martin

Re: Question about xsd:any

Posted by Amila Suriarachchi <am...@gmail.com>.
On Thu, Aug 27, 2009 at 10:31 PM, <er...@free.fr> wrote:

> Hello again,
>
> I have a xsd with an extension, I mean something like that :
>
> [...]
> <xsd:sequence>
>  <xsd:element name="begin" type="xsd:string" />
>  <xsd:element name="end" type="xsd:string" />
>  <xsd:any namespace="##other" processContents="lax" minOccurs="0"
> maxOccurs="unbounded" />
> </xsd:sequence>
> [...]
>
> I have a axis2 generated webservice. The response of this service use the
> above element of xsd).
> Well the service send me something like that
> [...]
> <begin>start</begin>
> <customfield1>this is a customfield</customfield1>
> <customfield2>this is a customfield</customfield2>
>
> Is there's a way to use the 'any' element in axis2 ? something like
> registering objects that can hold the de/serialization for 'any' ?
> Can 'customFields' be some more complex elements ? like :
> <customfield><firstfield>test</firstfield></customfield>


try your self. for any It generates an OMElement. so you can have any thing.

thanks,
Amila.

>
>
>
> thank you for any help
>
> --
> Martin
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/