Well, I used the same schema file to generate the java classes using
scomp and the same schema to generate a sample xml file. So, they both
match.

Can I send you my xsd files for you to review? Thanks.

-Muthu 

-----Original Message-----
From: Radu Preotiuc-Pietro [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 28, 2008 5:22 PM
To: user@xmlbeans.apache.org
Subject: Re: Name/Value Pair Issue.

Most likely, this is because your Schema (that you generated the Java
classes from) doesn't match your payload. Check that the namespace URIs
match.

Radu

On Mon, 2008-01-28 at 17:19 -0800, Muthu Ramaswamy wrote:
> Hi All-
> 
> I am new to XMlBeans. When I tried to use a sample XML file that 
> contains name/value pair, I can read the data only using XmlCursor.
> When I use the java objects that got created using scomp, the length 
> of array is 0 and the name/value pair cannot be retrieved as it is 
> null. But, the dump method shows the xml content but the getter 
> methods using the java objects are not working. Any ideas?
> 
> XMlBeans Version: 
> ---------------------
> Apache Software Foundation, org.apache.xmlbeans.XmlBeans version
> 2.3.0-r540734
> 
> Sample Payload: 
> -------------------
> <p704:getSkuInventoryListResponse xmlns:p704="urn:SkuInventory">
> <p704:getSkuInventoryListReturn>123 Service Ack. 456 Service Ack.
> </p704:getSkuInventoryListReturn>
> <p704:returnListQty>
> <p909:skuInvMap
> xmlns:p909="http://util.skuinventory.webservice.app.dd";>
> <item>
> <key xsi:type="xsd:string">123</key>
> <value xsi:type="xsd:string">101</value> </item> <item> <key 
> xsi:type="xsd:string">456</key> <value 
> xsi:type="xsd:string">101</value> </item> </p909:skuInvMap> 
> </p704:returnListQty> </p704:getSkuInventoryListResponse>
> 
> Here is the sample code: 
> //process response document
> GetSkuInventoryListResponseDocument response = 
> getSkuInventoryListResponseDocument(result);
> SkuInventoryMap resMap =
> response.getGetSkuInventoryListResponse().getReturnListQty();
> MapItem[] array = resMap.getSkuInvMap().getItemArray();
> System.out.println(array.length);
> Response.dump();
> 
> Here is the dump call output: 
> ROOT (USER) *:R:<cur>[0] (DocumentXobj) 
>     ELEM p704:[EMAIL PROTECTED]:SkuInventory
> (ElementXobj) 
>       ATTR xmlns:[EMAIL PROTECTED]://www.w3.org/2000/xmlns/
> Value( "urn:SkuInventory" ) (AttrXobj) 
>       ELEM p704:[EMAIL PROTECTED]:SkuInventory Value( "123

> Service Ack. 456 Service Ack. " ) (ElementXobj)
>       ELEM p704:[EMAIL PROTECTED]:SkuInventory (ElementXobj) 
>         ELEM p909:[EMAIL PROTECTED]://util.skuinventory.webservice.app.dd
> (ElementXobj) 
>           ATTR xmlns:[EMAIL PROTECTED]://www.w3.org/2000/xmlns/
> Value( "http://util.skuinventory.webservice...."; ) (AttrXobj) 
>           ELEM item (ElementXobj) 
>             ELEM key (ElementXobj) 
>               ATTR xsi:[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema-instance
> Value( "xsd:string" ) After( "123" ) (AttrXobj) 
>             ELEM value (ElementXobj) 
>               ATTR xsi:[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema-instance
> Value( "xsd:string" ) After( "101" ) (AttrXobj) 
>           ELEM item (ElementXobj) 
>             ELEM key (ElementXobj) 
>               ATTR xsi:[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema-instance
> Value( "xsd:string" ) After( "456" ) (AttrXobj) 
>             ELEM value (ElementXobj) 
>               ATTR xsi:[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema-instance
> Value( "xsd:string" ) After( "101" ) (AttrXobj)
> 
> 
> The array lenegth is 0 but when I say, response.dump(), I can see the 
> xml output on the screen.
> 
> Question? Why is the name/value pair null while the xmlcursor shows 
> the content is valid.
> 
> Appreciate your input. Thanks.
> 
> -Muthu
> 

Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to