Hi,

so the service is up and running, I can put breakpoint into its implementation so next step is to invoke it. I took samples/java_first_pojo client as start but when I invoked my service, it died with NPE. I found that the method is invoked but all parameters are null. So I published HelloWorldImpl too, invoked it but it had null parameter too.

@WebService
public interface HelloWorld {
    String sayHi(String text);
}

@WebService(endpointInterface = "demo.hw.server.HelloWorld", serviceName = "hello")
public class HelloWorldImpl implements HelloWorld {
    public String sayHi(String text) {
        return "Hello " + text;
    }
}

    <servlet-mapping>
        <servlet-name>CXFServlet</servlet-name>
        <url-pattern>/services/*</url-pattern>
    </servlet-mapping>

Endpoint.publish("/hello", new HelloWorldImpl());

ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(HelloWorld.class);
factory.setAddress("http://localhost:8080/services/hello";);
HelloWorld client = (HelloWorld)factory.create(); System.out.println(client.sayHi(System.getProperty("user.name")));

It is cxf 2.0.5 standard jar with removed JMS and Jetty transports and their configuration. These jars are located in my web application:

activation.jar dom4j.jar neethi.jar commons-collections.jar freemarker.jar jaxb-api.jar log4j.jar proxool.jar wsdl4j.jar commons-fileupload.jar geronimo-annotation.jar jaxb-impl.jar lucene-highlighter.jar regexp.jar wstx-asl.jar commons-logging.jar geronimo-stax-api.jar jaxen.jar lucene.jar rome.jar xml-resolver.jar concurrent.jar geronimo-ws-metadata.jar jaxws-api.jar mail.jar saaj-api.jar XmlSchema.jar cxf.jar htmlparser.jar jdom.jar mysql-connector.jar saaj-impl.jar

Any idea, where is the issue? Thanks

Leos

Reply via email to