Thank you for looking at the problem I sent regarding document  web services
returning a Garbled XML Response.  

I found a solution to my problem, using one of the
three other method signature, as described in the Axis User Guide, in 
my web service.

However, I am still interested in more insight on why my original solution
could not be made to work.


Dr. Laurence Leff  Western Illinois University, Macomb IL 61455 ||(309) 298-1315
Stipes 447 Assoc. Prof. of Computer Sci. Pager: 309-367-0787 FAX: 309-298-2302 
________________________________________________________________
public Document method (Document Body)


import javax.xml.parsers.*;
import org.apache.xml.serialize.*;
import org.w3c.dom.*;
import org.xml.sax.*;
import Debug.*;
import javax.xml.soap.*;
public class nine
 {
public Document method (Document body) {

Element D = body.getDocumentElement();
Debug.DumpXML(D);
NodeList nl = D.getChildNodes();
org.w3c.dom.Node TextNode = nl.item(0);
String MyText = TextNode.getNodeValue();

DocumentBuilder parser = null;
DocumentBuilderFactory Factory = DocumentBuilderFactory.newInstance();
try {
  parser = Factory.newDocumentBuilder();
  
Document ReturnThis = parser.newDocument();
Element root = ReturnThis.createElement("xyz");
ReturnThis.insertBefore(root,null);
org.w3c.dom.Text T = 
(org.w3c.dom.Text)ReturnThis.createTextNode("|"+MyText+"|");
root.appendChild(T);



return ReturnThis;
}
catch (ParserConfigurationException pce) {
}
return null;
}
}

_____________________________________________________________________
Here is a transmission as shown fromt he TCP Monitor:

==============


<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soapenv:Body><vehicles>NINE9</vehicles></soapenv:Body></soapenv:Envelope>====
 Response ====
HTTP/1.1 200 OK

Content-Type: text/xml;charset=utf-8

Date: Sat, 27 Oct 2007 18:00:45 GMT

Server: Apache-Coyote/1.1

Connection: close



<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<soapenv:Body><xyz>|NINE9|</xyz></soapenv:Body>
</soapenv:Envelope>

==============


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to