Hi,
I'm using Camel 2.3 and deploying it in a spring container and I'm trying to
create a route that publishes/consumes a SOAP endpoint to a SOAP client.
Here is my test route:
from("cxf:bean:cxfHelloWorld")
.transform(constant("Hi Back"));
and here is how I define the endpoint in camel-context.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:broker="http://activemq.apache.org/schema/core"
xmlns:cxf="http://camel.apache.org/schema/cxf"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://camel.apache.org/schema/cxf
http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<cxf:cxfEndpoint id="cxfHelloWorld" address="http://localhost/HelloWorld"
serviceClass="org.apache.cxf.bindings.SOAP.helloworld.SayHello"
endpointName="s:HelloApp.HelloSOAPPort"
serviceName="s:HelloApp.HelloSOAPService"
wsdlURL="src/main/resources/wsdl/HelloWorld.wsdl"
xmlns:s="http://cxf.apache.org/bindings/corba/idl/HelloWorld">
<cxf:properties>
<entry key="dataFormat" value="POJO"/>
<entry key="loggingFeatureEnabled" value="true"/>
<entry key="wrapped" value="true"/>
</cxf:properties>
</cxf:cxfEndpoint>
And I run this route using "mvn camel:run".
However, when the routebuilder is being built I get the following WARN:
14:12:47,015 5906 INFO [org.apache.camel.spring.Main.main()]
factory.ReflectionServiceFactoryBean - Creating Service
{http://cxf.apache.org/bindings/corba/idl/HelloWorld}HelloApp.HelloSOAPService
from WSDL: src/main/resources/wsdl/HelloWorld.wsdl
14:12:47,031 5922 WARN [org.apache.camel.spring.Main.main()]
factory.ReflectionServiceFactoryBean - Could not find a matching method for
operation {http://cxf.apache.org/bindings/corba/idl/HelloWorld}shutdown.
Operation will be unavailable.
14:12:47,031 5922 WARN [org.apache.camel.spring.Main.main()]
factory.ReflectionServiceFactoryBean - Could not find a matching method for
operation {http://cxf.apache.org/bindings/corba/idl/HelloWorld}greetMe.
Operation will be unavailable.
14:12:47,031 5922 WARN [org.apache.camel.spring.Main.main()]
factory.ReflectionServiceFactoryBean - Could not find a matching method for
operation {http://cxf.apache.org/bindings/corba/idl/HelloWorld}sayHello.
Operation will be unavailable.
14:12:47,031 5922 INFO [org.apache.camel.spring.Main.main()]
endpoint.ServerImpl - Setting the server's publish address to be
http://localhost:80/HelloWorld
As you may guess, If I send a SOAP request to this endpoint, an exception is
thrown:
14:13:53,312 72203 INFO [24011...@qtp-3619676-0]
interceptor.LoggingInInterceptor - Inbound Message
----------------------------
ID: 1
Address: /HelloWorld
Encoding: ISO-8859-1
Content-Type: text/xml
Headers: {Content-Length=[376], Host=[localhost], User-Agent=[XML Spy],
connection=[Keep-Alive], SOAPAction=["urn:#sayHello"],
Content-Type=[text/xml], content-type=[text/xml], Cache-Control=[no-cache]}
Payload: <SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:sayHello
xmlns:m="http://cxf.apache.org/bindings/corba/idl/HelloWorld"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
--------------------------------------
14:13:53,453 72344 WARN [24011...@qtp-3619676-0]
phase.PhaseInterceptorChain - Interceptor for
{http://cxf.apache.org/bindings/corba/idl/HelloWorld}HelloApp.HelloSOAPService
has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Message part
{http://cxf.apache.org/bindings/corba/idl/HelloWorld}sayHello was not
recognized. (Does it exist in service WSDL?)
at
org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:194)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:312)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:276)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
14:13:53,484 72375 INFO [24011...@qtp-3619676-0]
interceptor.LoggingOutInterceptor - Outbound Message
---------------------------
ID: 1
Response-Code: 500
Encoding: ISO-8859-1
Content-Type: text/xml
Headers: {}
Payload: <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Message
part {http://cxf.apache.org/bindings/corba/idl/HelloWorld}sayHello was not
recognized. (Does it exist in service
WSDL?)</faultstring></soap:Fault></soap:Body></soap:Envelope>
--------------------------------------
Please, advise.
Thanks,
--
View this message in context:
http://camel.465427.n5.nabble.com/Operations-are-unavailable-when-defining-for-a-CXF-endpoint-tp2644645p2644645.html
Sent from the Camel - Users mailing list archive at Nabble.com.