Hi again,
Once again I am trying to follow the tutorial in jboss4guide (chapter 12). I
have successfuly (i think) deployed a simple webservice, and tried to create a
client to test it. Here is the code i'm using for the client:
package com.ialock.client;
|
| import com.ialock.simpleWebService.*;
|
| import javax.xml.rpc.Service;
| import javax.xml.rpc.ServiceFactory;
|
| import javax.xml.namespace.QName;
|
| import java.net.URL;
|
| /**
| * @author Owner
| *
| * TODO To change the template for this generated type comment go to
| * Window - Preferences - Java - Code Style - Code Templates
| */
| public class SimpleClient {
|
| public static void main(String[] args) throws Exception{
|
| String urlstr = "http://localhost:8080/SimpleWebService";
| String argument = "This is my test :)";
|
|
| System.out.println("Contacting webservice at " + urlstr);
|
| URL url = new URL(urlstr);
|
| QName qname = new QName("http://simpleWebService.ialock.com/",
| "Simple");
| ServiceFactory factory = null;
| factory = ServiceFactory.newInstance();
|
| Service service = factory.createService(url, qname);
|
| SimpleInterface simple = (SimpleInterface)
service.getPort(SimpleInterface.class);
|
| System.out.println("simple.getHelloWorld(" + argument + ")");
| System.out.println("output:" + simple.getHelloWorld(argument));
| }
| }
|
When I run the client, i get the following exception:
Contacting webservice at http://localhost:8080/SimpleWebService
| javax.xml.rpc.ServiceException
| at javax.xml.rpc.ServiceFactory.newInstance(ServiceFactory.java:69)
| at com.ialock.client.SimpleClient.main(SimpleClient.java:39)
| Exception in thread "main"
What's strange about this exception is that is caused by the following line:
factory = ServiceFactory.newInstance();
I don't even give any arguments to this static method. Why would this be
throwing an exception?
Sal
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869960#3869960
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3869960
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user