[JBossWS] - Re: Jbossws Tutorial.
by zeeshan.javeed
I was doing a mistake and it deployed succesfully.
Now , I created consumer.java
| import java.rmi.RemoteException;
|
| import javax.xml.rpc.ServiceException;
| import de.iplabs.*;
|
| public class consumer
| {
| public static void main(String args[])
| {
|
| HelloWorldImplService service = new HelloWorldImplService ();
| HelloWorldImpl user = service.getHelloWorldImplPort();
| System.out.println("Server said: " +user.getName());
| System.out.println("Server said: " +user.getAge());
| }
| }
|
and when i run it, i get this error .....
C:\Office\WebService\complex\Consumer>java consumer
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Canot get target bean instance
at com.sun.xml.internal.ws.encoding.soap.ClientEncoderDecoder.toMessageInfo(Unknown Source)
at com.sun.xml.internal.ws.encoding.soap.client.SOAPXMLDecoder.toMessageInfo(Unknown Source)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.receive(Unknown Source)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(Unknown Source)
at com.sun.xml.internal.ws.protocol.soap.client.SOAPMessageDispatcher.send(Unknown Source)
at com.sun.xml.internal.ws.encoding.soap.internal.DelegateBase.send(Unknown Source)
at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.implementSEIMethod(Unknown Source)
at com.sun.xml.internal.ws.client.EndpointIFInvocationHandler.invoke(Unknown Source)
at $Proxy9.getName(Unknown Source)
at consumer.main(consumer.java:13)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096987#4096987
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096987
16 years, 11 months
[JBossWS] - Re: Jbossws Tutorial.
by zeeshan.javeed
hi,
Anyone have any idea how we can deploy a bit complex structure.
I have one Interface class, HelloWorld and the other file is HelloWorldImpl.
HelloWord. java
| package de.iplabs;
| public interface HelloWorld
| {
|
| public void setName(String name);
| public String getName();
|
| public void setAge(String age);
| public String getAge() ;
|
| }
|
and
HelloWorldImpl.java
| package de.iplabs;
|
|
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
|
| @WebService
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class HelloWorldImpl implements HelloWorld
| {
| public String name, age;
|
| HelloWorldImpl()
| {
| this.name = "default name";
| this.age = "default age";
| }
|
| @WebMethod
| public void setName(String name)
| {
| this.name = name;
| }
|
| @WebMethod
| public String getName()
| {
| return name;
| }
|
| @WebMethod
| public void setAge(String age)
| {
| this.age = age;
| }
|
| @WebMethod
| public String getAge()
| {
| return this.age;
| }
| }
|
where
web.xml file is
| <?xml version="1.0" encoding="UTF-8"?>
|
| <web-app version="2.5"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
| <servlet>
| <servlet-name>HelloWorldService</servlet-name>
| <servlet-class>de.iplabs.HelloWorldImpl</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>HelloWorldService</servlet-name>
| <url-pattern>/*</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
|
|
Now its again not showing the webserive at http://localhost/jbossws/services
and also I do not see any exception at server console.
Any Idea, whats going wrong ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096969#4096969
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4096969
16 years, 11 months