Hi! I´m new to JBoss and also my experience with developing Web Services are reduced to some auto-generating stuff in Netweaver. So I had a look at some internet-pages and found the new features of ejb3 and JBossWS. So I tried to start with a simple HelloWorld EJB + WebService:
HelloWorldBean: | @Stateless | @WebService( | name="EndpointInterface", | targetNamespace="http://facade.charon/jaws", | serviceName="HelloWorldService") | | @SOAPBinding(style = SOAPBinding.Style.RPC) | @Remote(HelloWorldRemoteInterface.class) | public class HelloWorldBean implements HelloWorldRemoteInterface { | public static final String RemoteJNDIName = HelloWorldBean.class | .getSimpleName() | + "/remote"; | | @WebMethod | public String getHello() { | return "HelloWorld"; | } | } | HelloWorldRemoteInterface: | public interface HelloWorldRemoteInterface { | @WebMethod | public String getHello(); | } | Client: | ... | URL url = new URL("http://localhost:8080/hello/HelloWorldBean?wsdl"); | QName qname = new QName("http://facade.charon/jaws", | "HelloWorldService"); | | ServiceFactory factory = ServiceFactory.newInstance(); | Service service = factory.createService(url, qname); | | HelloWorldRemoteInterface hw = (HelloWorldRemoteInterface) service | .getPort(HelloWorldRemoteInterface.class); | System.out.println(hw.getHello()); | ... | Compiling and deploying works fine, JBoss says WebService started. But when I try to connect via client code, I get following exception within JBoss: | 10:20:40,960 ERROR [SOAPFaultExceptionHelper] SOAP request exception | javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://facade.charon/jaws}EndpointInterfacePort does not contain operation meta data for: {http://schemas.xmlsoap.org/soap/envelope/}Envelope | on Client side this results to: | Exception in thread "main" java.lang.ClassCastException: org.jboss.ws.soap.SOAPMessageImpl | The exeption is thrown in following line: System.out.println(hw.getHello()); Can somebody help me? Maybe somebody can give me a link to a tutorial which contains such an example? Thx, Ernie View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3941184#3941184 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3941184 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
