Hi
Thanks for your reply.
The standalone java program is:
import org.w3c.dom.*;
import javax.xml.parsers.*;
import java.io.*;
public class DOMTest {
public static void main(String[] args) throws Exception {
DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document doc = db.parse(new File("data.xml"));
System.out.println(doc.getDocumentElement());
}
}
It prints the XML on the console.
The Message Service using Axis:
import java.io.*;
import org.w3c.dom.*;
import javax.xml.parsers.*;
public class TVMessage {
public Document tvMessage(Document doc) {
try {
System.out.prinyln(doc.getDocumentElement());
} catch (Exception ex) {
System.out.println(ex);
}
return doc;
}
}
I will get back the proper SOAP but doesnt print the doc on console just the first element follwing with null.
I did not create wsdl and axis generated it for me.
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl
efinitions targetNamespace="http://localhost:8080/jboss-net/services/TVMessageService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/jboss-net/services/TVMessageService" xmlns:intf="http://localhost:8080/jboss-net/services/TVMessageService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types />
<wsdl:message name="tvMessageRequest" />
- <wsdl:message name="tvMessageResponse">
<wsdl
art name="tvMessageReturn" type="xsd:anyType" />
</wsdl:message>
- <wsdl
ortType name="TVMessage">
- <wsdl
peration name="tvMessage">
<wsdl:input message="impl:tvMessageRequest" name="tvMessageRequest" />
<wsdl
utput message="impl:tvMessageResponse" name="tvMessageResponse" />
</wsdl
peration>
</wsdl
ortType>
- <wsdl:binding name="TVMessageServiceSoapBinding" type="impl:TVMessage">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl
peration name="tvMessage">
<wsdlsoap
peration soapAction="" />
- <wsdl:input name="tvMessageRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/jboss-net/services/TVMessageService" use="encoded" />
</wsdl:input>
- <wsdl
utput name="tvMessageResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/jboss-net/services/TVMessageService" use="encoded" />
</wsdl
utput>
</wsdl
peration>
</wsdl:binding>
- <wsdl:service name="TVMessageService">
- <wsdl
ort binding="impl:TVMessageServiceSoapBinding" name="TVMessageService">
<wsdlsoap:address location="http://localhost:8080/jboss-net/services/TVMessageService" />
</wsdl
ort>
</wsdl:service>
</wsdl
efinitions>
Thanks for your help.
Arash