Either create a JBI message or set JBIWrapper to false on the binding
component.
On Sep 28, 2009, at 5:36 PM, jweathers777 wrote:
I'm using ServiceMix 3.2.3 and am trying to send test messages from
a file
into a web service and then ultimately (after getting past my current
hurdles) back out into another file.
I've written the web service as a service assembly that uses a cxf-se
endpoint to provide a simple HelloWorld POJO as a web service and a
cxf-bc
consumer endpoint to expose the web service to the outside world via
consuming HTTP+SOAP request.
The whole thing is essentially the product of following this tutorial:
http://servicemix.apache.org/4-beginner-web-services-with-servicemix-and-cxf.html
See this tutorial for the wsdl definition.
This part works fine for me. I've tested sending messages to it via
SoapUI
as well as via a Ruby SOAP client.
I noted in the following info in the ServiceMix log file:
ServiceMix: broadcasting info for:
org
.apache
.servicemix.jbi.event.EndpointEvent[source=ServiceEndpoint[service={http://example.com
}HelloService,endpoint=HelloImplPort]]
And later when it successfully handles incoming messages from
SoapUI, I see:
interface: {http://example.com}Hello
service: {http://example.com}HelloService
endpoint: HelloImplPort
operation: {http://example.com}SayHello
Then, I wrote a service assembly that has a file poller endpoint that
monitors a directory for files containing an example SOAP message
that I
generated via SoapUI. The file poller is supposed to then send the
message
to my web service. To that end, I've set up a cxf-bc provider
endpoint that
I've configured to reference the above web service.
However, every configuration combination that I've tried has
resulted in
problems.
Currently, I have the provider configured as follows:
<cxfbc:provider wsdl="http://localhost:8193/HelloService/?wsdl"
service="hello:HelloService"
endpoint="HelloSOAPBinding" />
where hello="http://example.com" and the file poller is configured
like
this:
<file:poller service="mock:TestMessageService"
endpoint="FilePoller"
targetService="hello:HelloService"
targetEndpoint="HelloSOAPBinding"
file="/temp/inbound" />
where mock="http://example.com/mock" and hello="http://example.com"
When I copy a file containing the following text into the folder
/temp/inbound:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://example.com/types">
<soapenv:Header/>
<soapenv:Body>
<typ:SayHello>
<typ:name>World</typ:name>
</typ:SayHello>
</soapenv:Body>
</soapenv:Envelope>
I get the following error:
status: Active
role: provider
service: {http://example.com}HelloService
endpoint: HelloSOAPBinding
in: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://example.com/types">
<soapenv:Header/> <soapenv:Body> <typ:SayHello>
<typ:name>World</typ:name></typ:SayHello>
</soapenv:Body></soapenv:Envelope>
]17:26:22,733 | INFO | pool-flow.seda.servicemix-cxf-bc-thread-1 |
PhaseInterceptorChain |
he.cxf.common.logging.LogUtils 345 | Interceptor has thrown
exception,
unwinding
noworg.apache.cxf.interceptor.Fault: Message wrapper element is
'{http://schemas.xmlsoap.org/soap/envelope/}Envelope' but expected
'{http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper}message' at
org
.apache
.servicemix
.cxfbc
.interceptors
.JbiOutWsdl1Interceptor.handleMessage(JbiOutWsdl1Interceptor.java:97)
I also noticed:
Endpoint
ServiceEndpoint[service={http://
example.com}HelloService,endpoint=HelloSOAPBinding]
has a service description, but no matching endpoint found in [soap]
when ServiceMix tries to load the cxf-bc su with the provider
endpoint that
references the web service.
That suggests to me that it's not pointing at the correct endpoint,
but if I
change it from HelloSOAPBinding to HelloImplPort then when I try to
deploy
to ServiceMix, it fails with:
javax.jbi.JBIException: An internal endpoint for service
{http://example.com}HelloService and endpoint HelloImplPort is already
registered.
Any help on how to properly configure what I'm trying to achieve
would be
appreciated.
Thanks!
--
View this message in context:
http://www.nabble.com/Sending-messages-via-a-file-poller-into-a-cxf-bc-provider-endpoint-tp25654650p25654650.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Johan Edstrom
[email protected]
They that can give up essential liberty to purchase a little temporary
safety, deserve neither liberty nor safety.
Benjamin Franklin, Historical Review of Pennsylvania, 1759