Arash A

Greenhorn
+ Follow
since Dec 20, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Arash A

Sorry, I forgot the wsdd

<!-- Example Web Service Descriptor -->

<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

<service name="TVMessageService" style="message" >
<parameter name="className" value="TVMessage"/>
<parameter name="allowedMethods" value="tvMessage"/>
</service>

</deployment>

Thanks.
Arash
19 years ago
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
19 years ago
Hi

I appreciate if anybody can help me.

I wrote a message service using this method on the server side using Axis:

public Document method (Document body)

In a standalone java program when I have a Document object I can simply convert it to String. (String str = doc.getDocumentElement())

Here it does not work! Why?!?! How I can convert this Documnet to a String?

Thanks for any help.
Arash
19 years ago
Hi

I appreciate if anybody can help me. I wrote a message style
19 years ago
Thanks to all who saved my time.
I had the same problem. I changed everything in the program. Used three different computers and ...... really mad after 3 days.
So now I can go forward.