Update:

I was able to get this working.  Instead of using an http:soap-provider I
used a <cxfbc:provider> endpoint instead.  I also had to change my XSLT's
template body not to use the <soap:Envelope> wrapper because servicemix
expects the message to have the <jbi:message>.

so my modified xslt body now looks like:

<jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper";
version="1.0">
       <jbi:part>
         <rem:getXMLFeed xmlns:rem="http://remote.service.com";>
           <rem:userName><xsl:value-of select="//username"/></rem:userName>
         </rem:getXMLFeed>
       </jbi:part>
     </jbi:message>


I don't understand why the http:soap-provider did not work though so
explainations would be appreciated.  During my attempts to use the
http:soap-provider I used a <jbi:message> template body as well however the
"operation not bound on this message" error keeps appearing.

I guess this entire approach is a good way to proxy an external SOAP service
as a RESTful service from within the ESB.  The only thing left to do is to
remove any jbi wrappers that gets sent back in the XML response.



angeloNZ wrote:
> 
> Hi,
> 
> This is my current use case:
> 
> client -> http consumer -> http consumer marshaler -> saxon -> http soap
> provider -> external soap service
> 
> 1.  The client initiates a GET request passing in a username in the query
> string
> 2.  A consumer marshaler receives the request and creates an adhoc xml
> body containing the username.  The xml is constructed as a string and set
> as the content of the NormalizedMessage inside createExchange().  
> 3.  the http consumer's target service is a camel pipeline which has 2
> endpoints defined: (according to order)
>           - saxon service
>           - http soap provider
> 4.  the saxon service applies xslt on the adhoc xml body and creates a
> SOAP request containing the passed in username:
> 
> XSLT:
> 
> <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
> version='1.0'>
>   <xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/>
>   <xsl:template match="/">
> 
>     <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:rem="http://remote.service.com";>
>       <soapenv:Header/>
>       <soapenv:Body>
>         <rem:getXMLFeed>
>           <rem:userName><xsl:value-of select="//username"/></rem:userName>
>         </rem:getXMLFeed>
>       </soapenv:Body>
>    </soapenv:Envelope>
>   </xsl:template>
>         
> </xsl:stylesheet>
>      
> 5.  the http soap provider is then called, but here is where the error
> occurs.  Here's a log of the error:
> 
> org.apache.servicemix.soap.api.Fault: Operation not bound on this message
> at
> org.apache.servicemix.soap.interceptors.jbi.JbiOutWsdl1Interceptor.getOperation(JbiOutWsdl1Interceptor.java:225)
> at
> org.apache.servicemix.soap.interceptors.jbi.JbiOutWsdl1Interceptor.handleMessage(JbiOutWsdl1Interceptor.java:73)
> at
> org.apache.servicemix.soap.core.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:85)
> at
> org.apache.servicemix.http.endpoints.HttpSoapProviderMarshaler.createRequest(HttpSoapProviderMarshaler.java:98)
> at
> org.apache.servicemix.http.endpoints.HttpProviderEndpoint.process(HttpProviderEndpoint.java:202)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:600)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:554)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.onMessageExchange(AsyncBaseLifeCycle.java:510)
> at
> org.apache.servicemix.common.SyncLifeCycleWrapper.onMessageExchange(SyncLifeCycleWrapper.java:60)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:620)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
> at
> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> at java.lang.Thread.run(Thread.java:595)
> 
> --------------------------------------------------
> 
> To verify that my http:soap-provider endpoint was configured correctly I
> tried creating a http:soap-consumer that directly calls the soap-provider
> without any other components in between and the result was Ok.  Any
> thoughts on what I could be missing here?  The soap message I defined in
> the xslt body is exactly what I used when sending requests to the
> http:soap-consumer I created.  
> 
> I verified that HttpSoapProviderMarshaler uses POST to create the request. 
> I also tried implementing my own soapprovidermarshaler which only added
> log.debug() statements to get an idea of the message body and noticed that
> if I send a POST request through the soap:consumer the message body
> arriving at the provider marshaler is a StaxSource instance something
> like:  
>    <?xml version="1.0" encoding="UTF-8"?>    
>       <jbi:message ...
>          <jbi:part>
>            .... { same as my soap request body }
>          </jbi:part>
>       </jbi:message>
> 
> whereas a DomSource instance is generated if I go through my original use
> case.
> 
> Any help is highly appreciated. 
> 

-- 
View this message in context: 
http://www.nabble.com/Operation-not-bound-on-this-message-error-tp22341199p22363516.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to