Can you please create a bug report for this here:

https://issues.apache.org/jira/browse/AXIOM

Make sure that you mention the exact Axiom version you are using,
provide the necessary code to reproduce the issue and add the complete
stack trace.

Andreas

On Mon, Oct 1, 2012 at 12:02 PM, FILIPPO AGAZZI
<filippo.aga...@studenti.unipr.it> wrote:
> Hi,
> i've got a big problem with this: i wanto to do sth like this.
>
> FileInputStream policyStream = null;
>                 try {
>                     policyStream = new FileInputStream (policy_file);
>                 } catch (FileNotFoundException e) {
>                     e.printStackTrace();
>                 }
>                 StAXOMBuilder stAXOMBuilder = new
> StAXOMBuilder(policyStream);
>                 OMElement documentElement =
> stAXOMBuilder.getDocumentElement();
>
> tnPolicyColl.addChild(documentElement);
> where tnPolicyColl is an OMElement created with a determinate OMFactory.
>
> But i get an error " WRONG_DOCUMENT_ERR: A node is used in a different
> document than the one that created it." By many searches i understand that
> thw two OMElement must have the same OMFactory. But, the problem is: how can
> i do this, when i need to attach as a child an OMElement created from a
> source, that is a n XML File? I try also this:
>
> FileReader soapFileReader = new FileReader(policy_file);
>                 XMLStreamReader parser =
> XMLInputFactory.newInstance().createXMLStreamReader(soapFileReader);
>                 StAXOMBuilder stAXOMBuilder =  new StAXOMBuilder(omFactory,
> parser);
>                 OMElement documentElement =
> stAXOMBuilder.getDocumentElement();
>
> But it didn't work. How can i creat an AXIOM object, with a child created
> from XML File? Please help me, i'm in big trouble!
> Thanks in advance,
> Agazzi

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to