[JBossWS] - JBOSS-5.1.0.GA web service client doesn't work ( runtime mod
by rangalo
I have a simple hello-world EJB3 successfully deployed as web service. I can check it with url: http://localhost:8080/jbossws/services
Following is the client which works for Glassfish but doesn't work for JBOSS
| package com.hardik.mejb;
|
| import java.net.MalformedURLException;
| import java.net.URL;
| import javax.xml.namespace.QName;
| import javax.xml.ws.Service;
|
| public class JAXWSClient {
|
| private static String host = "localhost";
| private static String portType = "HelloBean";
| private static String serviceName = "Greeter";
| private static String serviceName_jboss = "hello-ws-hello-ws";
|
| // works for glassfish
| // private static String serviceEndpointAddress = "http://"+ host+ ":8080/" + serviceName;
|
| // should work for jboss
| private static String serviceEndpointAddress = "http://"+ host+ ":8080/" + serviceName_jboss;
|
| private static String namespace = "http://mejb.hardik.com/";
|
| public static void main(String[] args) {
|
| URL wsdlLocation = null;
| try {
| String urlstr = serviceEndpointAddress + "/" + portType + "?WSDL";
| System.out.println(urlstr);
| wsdlLocation = new URL(urlstr);
| } catch (MalformedURLException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
|
| QName serviceNameQ = new QName(namespace,serviceName);
| // dynamic service usage
| Service service = Service.create(wsdlLocation, serviceNameQ);
| Hello firstGreeterPort = service.getPort(Hello.class);
|
| // Object beans[] = service.getPorts();
| System.out.println("1: "+ firstGreeterPort.hello());
| }
| }
|
Here is how I execute the client and the error I get:
wsrunclient.sh -cp "lib/*:dist/hello-client.jar:jboss-generated/*" com.hardik.mejb.JAXWSClient
| http://localhost:8080/hello-ws-hello-ws/HelloBean?WSDL
| Exception in thread "main" com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class com.hardik.mejb.jaxws.Hello is not found. Have you run APT to generate them?
| at com.sun.xml.internal.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:256)
| at com.sun.xml.internal.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:567)
| at com.sun.xml.internal.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:514)
| at com.sun.xml.internal.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:341)
| at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:227)
| at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:588)
| at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:291)
| at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:274)
| at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:302)
| at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:306)
| at javax.xml.ws.Service.getPort(Service.java:161)
| at com.hardik.mejb.JAXWSClient.main(Unknown Source)
|
Do I need to generate something ? Am I missing some jar file(s) ?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240025#4240025
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240025
16 years, 10 months
[Microcontainer] - Re: Deployers Ordering
by alesj
"richard.opalka(a)jboss.com" wrote : Example of use case that shold fail but won't:
|
| Deployer1:
| - stage: PRE_REAL
| - inputs: output1
| Deployer2:
| - stage: REAL
| - outputs: output1
|
| PRE_REAL is before REAL. Current domino sorting algorithm will not detect it.
The only reasonable thing here might be that we check any previous stages for inputs,
and potentially break (throw an exception) if some deployer requires an input from later output.
But this should be properly discussed first on MC dev forum,
as I'm still not convinced this is something we should do.
e.g. we might just call it lazy deployer developer, as (s)he didn't bother to properly check previous deployers via statistics
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239969#4239969
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239969
16 years, 10 months