[jboss-user] [JBossWS] - Deploying WebServices JBoss 4.0.5 + JDK 1.5
goodvin
do-not-reply at jboss.com
Fri Aug 3 18:56:07 EDT 2007
I have been trying to make a simple web service work for a while with different errors. I follow examples I found on the web. Can someone tell me what am I doing wrong?
I use JBoss 4.0.5 with JDK 1.5 as it's the latest officially supported version by JBoss.
My test client returns:
[Fatal Error] :-1:-1: Premature end of file.
Receiving: null
And the error I get in the JBoss console executing my test web service is:
ERROR -> [[HelloBean]] Servlet.service() for servlet HelloBean threw exception
java.lang.AbstractMethodError: org.jboss.ws.soap.SOAPMessageImpl.setProperty(Ljava/lang/String;Ljava/lang/Object;)V
at org.jboss.ws.soap.SOAPMessageImpl.(SOAPMessageImpl.java:65)
at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:209)
at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:142)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:190)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
................................................................
The files below is what I use for testing.
Hello.java:
package test;
import java.rmi.Remote;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService
@SOAPBinding(style=Style.RPC)
public interface Hello extends Remote {
String sayHello(String name);
}
HelloBean.java:
package test;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.jws.WebService;
@Stateless
@WebService(endpointInterface = "test.Hello")
@Remote(Hello.class)
public class HelloBean implements Hello {
public String sayHello(String name) {
return "Hello " + name;
}
}
And my test client HelloClient:
package test;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
public class HelloClient {
public static void main(String[] args) throws Exception {
System.out.println("Starting Test Client");
URL url = new URL("http://rad-mobile1:8080/test/HelloBean?wsdl");
QName qname = new QName("http://test/jaws", "HelloService");
System.out.println("Creating a service Using: \n\t" + url + " \n\tand " + qname);
ServiceFactory factory = ServiceFactory.newInstance();
Service remote = factory.createService(url, qname);
System.out.println("Obtaining reference to a proxy object");
Hello proxy = (Hello) remote.getPort(Hello.class);
System.out.println("Accessed local proxy: " + proxy);
String name = "John";
System.out.println("Sending: name=" + name);
System.out.println("Receiving: " + proxy.sayHello("John"));
}
}
Any help is greatly appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070817#4070817
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070817
More information about the jboss-user
mailing list