-
1. Re: Newbie question: Just a first webservice client
thomas.diesler Sep 4, 2006 2:10 PM (in response to nautilusiii)http://jira.jboss.org/jira/browse/JBWS-1156
Note, it is scheduled for jbossws-2.0
Have a look how the clients in the sample download do it. -
2. Re: Newbie question: Just a first webservice client
dirkschmitz Sep 6, 2006 5:35 AM (in response to nautilusiii)Hi!
i have a similar problem with my webservice test client using the dynamic invocation interface (DII). When I try to run the client within Eclipse I get the following Exception
Exception in thread "main" javax.xml.rpc.ServiceException: Provider com.sun.xml.rpc.client.ServiceFactoryImpl not found
at javax.xml.rpc.FactoryFinder.newInstance(FactoryFinder.java:44)
at javax.xml.rpc.FactoryFinder.find(FactoryFinder.java:137)
at javax.xml.rpc.ServiceFactory.newInstance(ServiceFactory.java:58)
at de.mtag.ws.samples.client.WebServiceClient.main(WebServiceClient.java:29)
The classpath of the webservice testclient contains the following JBoss-Client-Jars
activation.jar
commons-logging.jar
javaassist.jar
jbossall-client.jar
jbossws-client.jar
log4j.jar
mail.jar
Web Service Test Clientpublic class WebServiceClient { /** * @param args */ public static void main(String[] args) throws Exception { String urlstr = args[0]; String argument = args[1]; System.out.println("Contacting webservice at " + urlstr); URL url = new URL(urlstr); String ns = "http://xx.xxx.ws.samples.services/simple"; QName qname = new QName(ns, "SimpleWS"); QName port = new QName(ns, "SimpleService"); QName operation = new QName(ns, "echo"); ServiceFactory factory = ServiceFactory.newInstance(); Service service = factory.createService(url, qname); Call call = service.createCall(port, operation); System.out.println("SimpleService.echo(" + argument + ")"); System.out.println("output:" + call.invoke(new Object[] {argument})); } }
Service Endpoint Interfacepublic interface SimpleService { public String echo(String echo); }
Service Endpoint Implementation@WebService( name = "SimpleWS", targetNamespace = "http://xx.xxx.ws.samples.services/simple", serviceName = "SimpleWS" ) @SOAPBinding(style = SOAPBinding.Style.RPC) public class SimpleEndpoint implements SimpleService { @WebMethod public String echo(String theEcho) { return theEcho; } }
-
3. Re: Newbie question: Just a first webservice client
dirkschmitz Sep 7, 2006 3:42 AM (in response to nautilusiii)Hi all,
i found out what the problem was. You have to set the following jars of the Java Webservice Development Pack into the classpath.
jaxrpc-impl.jar
saaj-impl.jar
FastInfoset.jar
Then it works!