You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by MDF <h....@dzbw.de> on 2017/05/23 07:08:58 UTC

Simple SOAP Webservice

Hello,
I am new to Camel. I have to work in a project which uses Camel 2.18.3 and
cxf
3.1.10 on Tomcat 8.5. 
I need to implement a Soap Webservice which is not used within Camel Routing
(it implements a simple synchronous method call).

For testing I have tried this very simple example

package de.dzbw.soap.test;

import javax.jws.WebService;

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

package de.dzbw.soap.test;

import javax.jws.WebService;

@WebService(endpointInterface = "de.dzbw.soap.test.HelloWorld")
public class HelloWorldImpl implements HelloWorld {

    @Override
    public String sayHi(String text) {
        return "Hello " + text;
    }
}

I have added the following to camel-config.xml

  <cxf:cxfEndpoint id="customerEndpoint"
address="http://localhost:8080/ikfz2/webservices/Hello"
            wsdlURL="http://localhost:8080/ikfz2/webservices/Hello?wsdl"
            serviceClass="de.dzbw.soap.test.HelloWorld"
            endpointName="ws:HelloServicePort"
            serviceName="ws:HelloService"
        xmlns:ws="http://com.sample.customer.endpoint" />

From web.xml:

<servlet>
	<servlet-name>CXFServlet</servlet-name>
	<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
	<load-on-startup>1</load-on-startup>
</servlet>


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

I cannot see my Webservice on
http://localhost:8080/ikfz2/webservices/

And after requesting 
http://localhost:8080/ikfz2/webservices/Hello?wsdl

I get the following in the server log
2017-05-23 08:53:47,030 [nio-8080-exec-1] WARN  ServletController             
- Can't find the the request for
http://localhost:8080/ikfz2/webservices/Hello's Observer

Any help would be greatly appreciated.




--
View this message in context: http://camel.465427.n5.nabble.com/Simple-SOAP-Webservice-tp5800045.html
Sent from the Camel - Users mailing list archive at Nabble.com.