You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christopher Cheng <ch...@gmail.com> on 2010/02/14 17:35:33 UTC

Setting values to with XMLObject

I am using XMLBeans to generate Java code with WSDL. One of my XSD documents
of WSDL has <s:any/> as a type.
If I have another XMLObject constructed, how could I set the value?

<s:element maxOccurs="1" minOccurs="0" name="Request">
       <s:complexType>
        <s:sequence>
         *<s:any/>*
        </s:sequence>
       </s:complexType>
</s:element>

This doesn't seem to work.

Request request = Request.Factory.newInstance();
request.set(anotherXmlObject);

Re: Setting values to with XMLObject

Posted by Daniel Kulp <dk...@apache.org>.
You'll probably need to ask this on the XMLBeans list.  I'm not sure if anyone 
here are really XMLBeans "experts" to know about some of these more advanced 
use cases.

Dan


On Sun February 14 2010 11:35:33 am Christopher Cheng wrote:
> I am using XMLBeans to generate Java code with WSDL. One of my XSD
> documents of WSDL has <s:any/> as a type.
> If I have another XMLObject constructed, how could I set the value?
> 
> <s:element maxOccurs="1" minOccurs="0" name="Request">
>        <s:complexType>
>         <s:sequence>
>          *<s:any/>*
>         </s:sequence>
>        </s:complexType>
> </s:element>
> 
> This doesn't seem to work.
> 
> Request request = Request.Factory.newInstance();
> request.set(anotherXmlObject);

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog