I think that will work.

 

 

Vijai Mohan

Software Design Engineer

SensorLogicM2M made easy.

972-934-7375 x 2111

972-934-7376 (fax)

[EMAIL PROTECTED]

www.Sensorlogic.com

 

 

-----Original Message-----
From: Marc Boorshtein [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 01, 2004 1:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Going from Text Based XML to a SOAPBody?

 

Thanks for the tip, but this is a bit simple for what I'm looking to do. I'd like to build a provider that will let me take the XML in the request's body, perform some tasks to extract the information into an object model and then pass that information into a dynamic content generation system to generate some XML and add it to the SOAPBody. From the looks of it, I can serialize the XML into Document as you showed below, and then create an RPCElement and add it to the body as it's done in RPCProvider. Is this correct?

--------------------------------------------------------------------------------------------------
Marc Boorshtein
Sr. Software Engineer, Octet String
[EMAIL PROTECTED]
On Aug 1, 2004, at 12:41 PM, Vijai Mohan wrote:



Create a simple webservice and use this snippet to return a xml document
from an xml file.
Axis automatically converts the Document in to the soap body .


public static Document getXMLDocument(){
DocumentBuilderFactory domFactory = DocumentBuilderFactory
.newInstance();
DocumentBuilder domBuilder = null;
try {
domBuilder = domFactory.newDocumentBuilder();

Document doc = domBuilder.parse("c:\\XMLFILE.xml");

return doc;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}

Vijai Mohan
Software Design Engineer
SensorLogicM2M made easy.
972-934-7375 x 2111
972-934-7376 (fax)
[EMAIL PROTECTED]
www.Sensorlogic.com



-----Original Message-----
From: Marc Boorshtein [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 01, 2004 12:11 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Going from Text Based XML to a SOAPBody?

Hello,

I am working on implementing a document service in which I want to take
text representation of XML and add it to a SOAPBody. From the looks of
it, it appears that I have to use an XML Parser to go from
XML->SOAPElement in a similar way that I would parse XML into a DOM
Tree. The only problem is that I can't find this "parsing" class. I
found SOAPFactory, but it doesn't seem to be a parser. Am I missing
something?

Thanks!

------------------------------------------------------------------------
--------------------------
Marc Boorshtein
Sr. Software Engineer, Octet String
[EMAIL PROTECTED]

<<image001.gif>>

Reply via email to