You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Jacob Danner (JIRA)" <xm...@xml.apache.org> on 2004/11/17 21:32:49 UTC
[jira] Resolved: (XMLBEANS-71) when trying to retrieve data from a XMLBean with Input from a XML Document, we cannot get any data from the Bean.
[ http://nagoya.apache.org/jira/browse/XMLBEANS-71?page=history ]
Jacob Danner resolved XMLBEANS-71:
----------------------------------
Resolution: Fixed
If I ran through your repro correctly, it appears the easiest way to get around this is by adding the following to your schema declaration.
elementFormDefault="qualified"
This was the resolution I came to after compiling your schema and trying to validate the instance. The Error listener gave messages about using the a type not qualified by the namespace without a namespace.
If you are still unsure what I mean add the following to your code.
ArrayList errors = new ArrayList();
XmlOptions xmOpts = new XmlOptions();
xmOpts.setErrorListener(errors);
if(!curveResponse.validate(xmOpts))
System.out.println("Errors: "+errors);
> when trying to retrieve data from a XMLBean with Input from a XML Document, we cannot get any data from the Bean.
> -----------------------------------------------------------------------------------------------------------------
>
> Key: XMLBEANS-71
> URL: http://nagoya.apache.org/jira/browse/XMLBEANS-71
> Project: XMLBeans
> Type: Bug
> Versions: Version 1.0.3
> Environment: version 1.0.3
> JDK is IBM JDK 1.4
> Reporter: sreeram
> Attachments: CurveResponse.xml, CurveServiceMod.xml
>
> we generated our XML beans from a wsdl file.
> Once we receive a Response from web service end point, we store the Response message in an XML file.
> we try to use the generated XMl beans to parse the Response XML Document and try to retrieve the attribute values from the bean.
> The returned values are null.we see no exceptions thrown and when we try to print out the values retrieved from the Bean, all of them are null.
> I am wondering if generating the beans from the wsdl rather than a Schema document is causing the problems.
> The following is the code we are using to Parse the XML Document.
> String filePath = "c://test/CurveResponse.xml";
> java.io.File curveResponseFile = new java.io.File(filePath);
>
> CurveResponseDocument curveDoc = CurveResponseDocument.Factory.parse(curveResponseFile);
> CurveResponseDocument.CurveResponse curveResponse = curveDoc.getCurveResponse();
> System.out.println("Status is : "+ curveResponse.getStatus());
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org