[JBossWS] - Problems getting client to work
by Fugee47
i got a standalone java-client working:
package simpleclient;
import javax.xml.ws.WebServiceRef;
import helloservice.endpoint.HelloService;
import helloservice.endpoint.Hello;
public class HelloClient {
@WebServiceRef(wsdlLocation="http://localhost:8080/helloservice/Hello?wsdl")
static HelloService service = new HelloService();
public static void main(String[] args) {
System.out.println("Retrieving the port from the following service: " + service);
Hello port = service.getHelloPort();
System.out.println("Invoking the sayHello operation on the port.");
String name;
if (args.length > 0) {
name = args[0];
} else {
name = "No Name";
}
String response = port.sayHello(name);
System.out.println(response);
}
}
but when i copy the code into a new function and access it from within a jsp-file, i get errors.
package simpleclient;
import javax.xml.ws.WebServiceRef;
import helloservice.endpoint.HelloService;
import helloservice.endpoint.Hello;
public class HelloClient {
@WebServiceRef(wsdlLocation="http://localhost:8080/helloservice/Hello?wsdl")
static HelloService service = new HelloService();
public static String say(String args) {
Hello port = service.getHelloPort();
String name;
if (args != null) {
name = args;
} else {
name = "No Name";
}
String response = port.sayHello(name);
return response;
}
}
ERROR [ServiceDelegateImpl] Cannot create proxy for SEI helloservice.endpoint.Hello from: vfsfile:/opt/jboss-5.0.0.Beta4/server/default/deploy/
11:51:14,647 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.IllegalArgumentException: helloservice.endpoint.Hello is not an interface
i dont understand this error, since the standalone client does not complain about helloservice.endpoint.Hello being not an interface
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134869#4134869
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134869
16 years, 9 months
[JBossWS] - Problem retrieving service in developing a client
by websfasciomaster
My client code is:
System.out.println("Starting Test Client");
| URL url = new URL("http://localhost:8080/EspertoWS/ServiceBean?wsdl");
| QName qname = new QName("http://ws.server.espertoEnel.nergal.it/","ServiceBean");
| System.out.println("Creating a service Using: \n\t"
| + url + " \n\tand " + qname);
| ServiceFactoryImpl factory = (ServiceFactoryImpl) ServiceFactoryImpl.newInstance();
| System.out.println("Passa! Qname: "+qname.getNamespaceURI());
|
| Service remote = factory.createService(url,qname);
| System.out.println("Obtaining reference to a proxy object. Remote: wsdl location "+remote.getWSDLDocumentLocation()+" Service name:"+remote.getServiceName());
| ServiceLocale proxy = (ServiceLocale) remote.getPort(qname,ServiceLocale.class);
|
and when i run this i obtain this excepition:
Exception in thread "main" org.jboss.ws.metadata.wsdl.WSDLException: javax.wsdl.WSDLException: WSDLException (at /definitions/message[1]/part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'tns:getCurvaAllarmiPicchiResponse'.
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:154)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:321)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:115)
at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:86)
at org.jboss.ws.core.jaxrpc.client.ServiceImpl.(ServiceImpl.java:111)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
at it.nergal.espertoEnel.server.hibernate.test.TestWS.main(TestWS.java:31)
Caused by: javax.wsdl.WSDLException: WSDLException (at /definitions/message[1]/part): faultCode=UNBOUND_PREFIX: Unable to determine namespace of 'tns:getCurvaAllarmiPicchiResponse'.
at com.ibm.wsdl.util.xml.DOMUtils.getQName(DOMUtils.java:309)
at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedAttributeValue(DOMUtils.java:367)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.getQualifiedAttributeValue(JBossWSDLReaderImpl.java:2046)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parsePart(JBossWSDLReaderImpl.java:1305)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseMessage(JBossWSDLReaderImpl.java:1284)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.parseDefinitions(JBossWSDLReaderImpl.java:336)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2293)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2257)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2310)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2331)
at org.jboss.ws.tools.wsdl.JBossWSDLReaderImpl.readWSDL(JBossWSDLReaderImpl.java:2363)
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:127)
... 7 more
My web service class is:
@Stateless
| //@WebService(serviceName="sdsws",portName="sdswsport")
| @WebService(endpointInterface="it.nergal.espertoEnel.server.ws.ServiceLocale",
| serviceName="EspertoWS",portName="ServiceBeanPort",
| targetNamespace="http://localhost:8080/EspertoWS/ServiceBean")
| public class ServiceBean implements ServiceLocale{
| .......
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134636#4134636
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134636
16 years, 9 months
[JBossWS] - Re: SSL and native libraries
by squ1rr3l
"fastbob" wrote : I tried an experiment. I commented out the SSL connector and things worked (except for SSL, of course).
|
| But I found the cause of the problem. I took a closer look at the installed packages on fedora. Tomcat was installed as part of the system packages (probably by me), and as soon as I removed the tomcat-native package, the native library was not loaded. SSL started working.
|
| Bob
Same thing here. Apparently, there is a problem with the native libraries. I have had a lot of problems getting SSL enabled for any Win32 apr-based libraries.
In this case, I had everything working on a Windows 2003 server. Then I applied the native libraries (from http://labs.jboss.org/jbossweb/downloads/jboss-native/?action=a&windowsta...), and SSL died. Same errors that you specified:
10:23:42,564 WARN [Connector] Property strategy not found on the protocol handler.
| 10:23:42,580 WARN [Connector] Property clientAuth not found on the protocol handler.
| 10:23:42,580 WARN [Connector] Property keystoreFile not found on the protocol handler.
| 10:23:42,580 WARN [Connector] Property keystorePass not found on the protocol handler.
| 10:23:42,752 INFO [AprLifecycleListener] Loaded Apache Tomcat Native library 1.1.12.
| 10:23:42,845 INFO [AprLifecycleListener] APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
| 10:23:44,408 INFO [Http11AprProtocol] Initializing Coyote HTTP/1.1 on http-172.25.141.151-8080
| 10:23:44,424 ERROR [Http11AprProtocol] Error initializing endpoint
| java.lang.Exception: No Certificate file specified
| at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
| at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:683)
| at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
| at org.apache.catalina.connector.Connector.initialize(Connector.java:1073)
| ....
|
I have had similar issues trying to get LDAP over SSL working in Windows using the Apache ldap modules, which also rely on APR and APRUtils Win32 binaries. I've posted messages to the APR-dev mailing list, but they sent me to the Apache-dev list, and the issue was pretty much just ignored there.
I imagine there is somebody that knows what's going on with this, but I can't figure it out.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134608#4134608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134608
16 years, 9 months