When I've seen something like this, its usually because my instance wasn't
value. Try validating and verifying there are no errors.
-jacobd

On Thu, May 13, 2010 at 7:38 AM, GeniusS <yogen...@gmail.com> wrote:

>
> I'm not able to retrieve value from Xmlbean document object, however when I
> inspect the object the values is there.
>
> Following is the complete description of the problem
>
> Step 1
>
> Following is the XSD used to generate XML Bean document objects
>
> <xs:element name="getPremiumDetailResponse">
>    <xs:complexType>
>      <xs:complexContent mixed="false">
>        <xs:extension base="response:messageResponse">
>          <xs:sequence>
>            <xs:element minOccurs="0" name="asOfDate" type="xs:date" />
>            <xs:element minOccurs="0" name="premiumQuoteIndividual">
>              <xs:complexType>
>                <xs:sequence>
>                  <xs:element minOccurs="0" name="individualFirstName"
> type="pere:firstName" />
>                  <xs:element minOccurs="0" name="individualLastName"
> type="pere:lastName" />
>                  <xs:element minOccurs="0" name="premiumQuotePlanGroup">
>                    <xs:complexType>
>                      <xs:sequence>
>                        <xs:element minOccurs="0" maxOccurs="unbounded"
> name="premiumQuotePlan">
>                          <xs:complexType>
>                            <xs:sequence>
>                              <xs:element minOccurs="1"
> name="planDescription" type="ppte:planDescription" />
>                              <xs:element minOccurs="1" name="amountDue"
> type="ppte:amountDue" />
>                              <xs:element minOccurs="1" name="planSubTotal"
> type="ppte:planSubTotal" />
>                            </xs:sequence>
>                          </xs:complexType>
>                        </xs:element>
>                      </xs:sequence>
>                    </xs:complexType>
>                  </xs:element>
>
> Step 2
>
> Code I'm using to get the document object values:
>
> GetPremiumDetailResponseDocument xbGetPremiumDetailResponseDocument =
> (GetPremiumDetailResponseDocument) gpsResponse;
>        GetPremiumDetailResponse xbGetPremiumDetailResponse =
> xbGetPremiumDetailResponseDocument
>                .getGetPremiumDetailResponse();
>        xbGetPremiumDetailResponse.getAsOfDate();
>
>
> xbGetPremiumDetailResponse.getPremiumQuoteIndividual().getIndividualLastName();
>
> Step 3
>
> When I try to inspect
> xbGetPremiumDetailResponse.getPremiumQuoteIndividual(), I get to see
> following output:
>
> <xml-fragment xmlns:gpd="http://gps.uhc.com/2008/08/01/getpremiumdetail";
> xmlns:mres="http://gps.uhc.com/2008/08/01/common/messageresponse";
> xmlns:pqp="http://gps.uhc.com/2008/08/01/common/premiumquoteplan";>
>  <pqp:individualFirstName>TRVOF</pqp:individualFirstName>
>  <pqp:individualLastName>FU</pqp:individualLastName>
>  <pqp:premiumQuotePlanGroup>
>    <pqp:premiumQuotePlan>
>      <pqp:planDescription>AARP MedicareComplete (HMO)</pqp:planDescription>
>      <pqp:amountDue>75.0</pqp:amountDue>
>      <pqp:planSubTotal>75.0</pqp:planSubTotal>
>    </pqp:premiumQuotePlan>
>  </pqp:premiumQuotePlanGroup>
>  <pqp:premiumQuoteIndividualAdjustmentGroup/>
>  <pqp:premiumQuoteHouseholdAdjustmentGroup/>
>  <pqp:householdPremium>75.0</pqp:householdPremium>
> </xml-fragment>
>
> Step 5:
> However When I try to inspect
>
> xbGetPremiumDetailResponse.getPremiumQuoteIndividual().getIndividualLastName().
> it returns null.
>
> Although the value is there in the
> <pqp:individualLastName>FU</pqp:individualLastName> node.
>
>
>
>
> It would great if anyone can help me out to sort out this issue. We have
> pilot release tommorow.
>
> Thanks
> Yogen
> --
> View this message in context:
> http://old.nabble.com/Unable-to-retrieve-value-form-Xmlbean-document-object-tp28548413p28548413.html
> Sent from the Xml Beans - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
> For additional commands, e-mail: user-h...@xmlbeans.apache.org
>
>

Reply via email to