I run the code below for testing:
        LOANSTATUS loanStatus = LOANSTATUS.Factory.newInstance();

        System.out.println("toString: " + loanStatus.toString());//(1)
        loanStatus.setLoanStatusID(null);
        System.out.println("toString: " + loanStatus.toString());//(2)
         loanStatus.unsetLoanStatusID();
        System.out.println("toString: " + loanStatus.toString());//(3)

and the result:
<?xml version="1.0" encoding="UTF-8"?>
<xml-fragment ></xml-fragment>
<?xml version="1.0" encoding="UTF-8"?>
<xml-fragment LoanStatusID=""></xml-fragment>
<?xml version="1.0" encoding="UTF-8"?>
<xml-fragment ></xml-fragment>

The problem is XMLBeans regarding a null String as an empty String in toString() methode.

Regards,

Regards,
-----------------------------------------------------------------------------------

Bao Le
Lecturer

http://leducbao.blogspot.com

Faculty of Information Technology
Ton Duc Thang University of Technology

Mobile:  +(84-95) 888 2585
-----------------------------------------------------------------------------------



Radu Preotiuc-Pietro wrote:

Can you post the declaration of the attribute “ MERSOrganizationIdentifier”?

As a general rule, XmlBeans doesn’t add attributes unless explicitly required by the user, so there’s something else going on here.

 

Radu

 

-----Original Message-----
From: Bao Le [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 22, 2005 12:01 AM
To: [email protected]
Subject: Re: toString() problem

 


Bao Le wrote:

Dear XMLBeans Users.
I created an object by XMLBeans and using toString() for getting it's content. The issue is the attribute does not set (nullable attribute) , the toString() methode return the empty value.

Input:
<?xml version="1.0" encoding="UTF-8"?>
<NON_PERSON_ENTITY_DETAIL xmlns="http://mif.wdc.com/cdr" xmlns:cdr="http://mif.wdc.com/cdr" targetNamespace="http://mif.wdc.com/cdr"
TaxIdentificationNumberIdentifier="String"
OrganizationType="0"
NonPersonEntityID="ID000078"
SuccessOrClauseTextDescription="String"
OrganizationTypeOtherDescription="String"
OrganizedUnderTheLawsOfJurisdictionName="String"
OrganizationLicensingTypeDescription="String"/>



Output:
<?xml version="1.0" encoding="UTF-8"?>
<NON_PERSON_ENTITY_DETAIL xmlns="http://mif.wdc.com/cdr" xmlns:cdr="http://mif.wdc.com/cdr" targetNamespace="http://mif.wdc.com/cdr"
TaxIdentificationNumberIdentifier="String"
OrganizationType="0"
NonPersonEntityID="ID000078"
MERSOrganizationIdentifier=""  <--- this value is null(in debug session), but something like this when use toString() method
SuccessOrClauseTextDescription="String"
OrganizationTypeOtherDescription="String"
OrganizedUnderTheLawsOfJurisdictionName="String"
OrganizationLicensingTypeDescription="String"/>

anyone has experiences on this issue, please help me

Regards,
-----------------------------------------------------------------------------------

Bao Le
Lecturer

http://leducbao.blogspot.com

Faculty of Information Technology
Ton Duc Thang University of Technology
Mobile :  +(84-95) 888 2585
-----------------------------------------------------------------------------------



Radu Preotiuc-Pietro wrote:

 Hi Dennis, 
 Can you give me a more detailed scenario? You _can_ load an XmlBean and 
 save it back and the prefixes will be preserved. 
   
 We had support for canonicalization in our plans, but we had to drop it, 
 mainly because we couldn't get anyone interested enough in the problem 
 involved :p 
   
 Thanks, 
 Radu 
   
 -----Original Message----- 
 From: Dennis Sosnoski [mailto:[EMAIL PROTECTED]]  
 Sent: Monday, August 15, 2005 6:47 PM 
 To: [email protected] 
 Subject: XML-Signature 
   
  From a quick look it appears that XMLBeans is incompatible with XML  
 Signature, since it doesn't retain all the information needed for XML  
 Canonicalization (namespace prefixes, in particular). Are there any  
 plans to change this and support XML Signature - or is the documentation 
   
 out of date and Canonicalization is already supported? Thanks, 
   
   - Dennis 
   
 --------------------------------------------------------------------- 
 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] 
   
   
   
    

Start your day with Yahoo! - make it your home page

Start your day with Yahoo! - make it your home page


Start your day with Yahoo! - make it your home page

Reply via email to