users@jax-rpc.java.net

Re: Creating a SOAPElement instance from an XML file ??

From: Pretorian Mihnea <mihnea.pretorian_at_WIRECARD.COM>
Date: Mon, 14 Jul 2003 10:30:22 +0200

Actually you don't need to create a SOAPElement. You can create a Document and add it to SOAPBody with addDocument method.

Mihnea

-----Original Message-----
From: Mark D. Hansen [mailto:khookguy_at_YAHOO.COM]
Sent: Saturday, July 12, 2003 12:25 AM
To: JAXRPC-INTEREST_at_JAVA.SUN.COM
Subject: Creating a SOAPElement instance from an XML file ??


I've got a purchase order file - po.xml. I want to create a SOAPElement instance from it (SAAJ 1.2). I can use SOAPFactory to create a SOAPElement - but it is an empty element, and I want to create one from my file. It doesn't look like I can use DocumentBuilder.parse() to create a SOAPElement either - it still just produces org.w3c.Element instances.

What is the best way to do this? Shouldn't there be a SOAPFactory method with a signature like:

public SOAPElement createElement(javax.xml.transform.Source src) ???

Thanks,

Mark