when  i develope session bean ws, i encountered the following problem:

Exception in thread "main" java.lang.IllegalArgumentException: Cannot obtain 
wsdl service: {http://stateless.session.examples}ejb3test
        at 
org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaDataInternal(JAXWSClientMetaDataBuilder.java:126)
        at 
org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:80)
        at 
org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.(ServiceDelegateImpl.java:109)
        at 
org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:61)
        at javax.xml.ws.Service.(Unknown Source)
        at javax.xml.ws.Service.create(Unknown Source)
        at examples.session.ws.JAXWSClient.main(JAXWSClient.java:36)

package examples.session.ws;
  | 
  | import java.net.URL;
  | import javax.xml.namespace.QName;
  | import javax.xml.ws.Service;
  | 
  | import examples.session.stateless.HelloBean;
  | 
  | 
  | 
  | /**
  |  * This is an example of a standalone JAX-WS client. To compile, it requires
  |  * some XML artifacts to be generated from the service?s WSDL. This is done 
in
  |  * the build file.
  |  * 
  |  * The mapped XML classes used here are 1. the HelloBean port type class 
(this
  |  * is NOT the bean impl. class!) 2. the Greeter service class
  |  */
  | public class JAXWSClient {
  |     static String host = "localhost";
  | 
  |     static String portType = "HelloBean";
  | 
  |     static String serviceName = "ejb3test";
  | 
  |     static String serviceEndpointAddress = "http://"; + host + ":8080/"
  |                     + serviceName;
  | 
  |     static String nameSpace = "http://stateless.session.examples";;
  | 
  |     public static void main(String[] args) throws Exception {
  |             URL wsdlLocation = new URL(serviceEndpointAddress + "/" + 
portType
  |                             + "?WSDL");
  |             QName serviceNameQ = new QName(nameSpace, serviceName);
  |             // dynamic service usage
  |             Service service = Service.create(wsdlLocation, serviceNameQ);
  |             HelloBean firstGreeterPort = service.getPort(HelloBean.class);
  |             System.out.println("1: " + firstGreeterPort.hello());
  |             // static service usage
  | //          Greeter greeter = new Greeter();
  | //          HelloBean secondGreeterPort = greeter.getGreeterPort();
  | //          System.out.println("2: " + secondGreeterPort.hello());
  |     }
  | }

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035581#4035581

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035581
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to