You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by rameshbabu <ra...@gmail.com> on 2013/12/04 12:45:15 UTC

Consuming SOAP web service using Camel

 Hi,

I am trying to consuming the soap web service using camel.

 <route id="smsc_to_queue_and_database">
<from uri="jms:queue:Request" />
<bean ref="WorkOrder_Request" /> // I am preparing request Object
<transform>
	<simple>
	 &lt;soapenv:Envelope
                   
xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
                   
xmlns:ser=&quot;http://www.sstdomain.com/service/&quot;&gt;
                    &lt;soapenv:Header/&gt;
                    &lt;soapenv:Body&gt;

                    ${in.body};
                    &lt;/soapenv:Body&gt;
                    &lt;/soapenv:Envelope&gt;
&lt;/soapenv:Envelope&gt;
      </simple>
	</transform> 
				
<to uri="cxf:bean:SendNotificationService" /> 
<to uri="jms:queue:Response" />


 I am facing the following  issue.


 org.apache.camel.RuntimeCamelException:
org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML" element. You
must send a SOAP request.
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1157)[88:org.apache.camel.camel-core:2.8.0.fuse-07-15]
	at
org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:184)[93:org.apache.camel.camel-jms:2.8.0.fuse-07-15]
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:110)[93:org.apache.camel.camel-jms:2.8.0.fuse-07-15]
	at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)[94:org.springframework.jms:3.0.5.RELEASE]
	at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)[94:org.springframework.jms:3.0.5.RELEASE]
	at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)[94:org.springframework.jms:3.0.5.RELEASE]
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[94:org.springframework.jms:3.0.5.RELEASE]
	at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[94:org.springframework.jms:3.0.5.RELEASE]
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)[94:org.springframework.jms:3.0.5.RELEASE]
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)[94:org.springframework.jms:3.0.5.RELEASE]
	at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)[94:org.springframework.jms:3.0.5.RELEASE]
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)[:1.6.0_27]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.6.0_27]
	at java.lang.Thread.run(Thread.java:679)[:1.6.0_27]
Caused by: org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML"
element. You must send a SOAP request.
	at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:109)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
	at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
	at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
	at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:780)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1678)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1521)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
	at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:372)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
	... 3 more




  







--
View this message in context: http://camel.465427.n5.nabble.com/Consuming-SOAP-web-service-using-Camel-tp5744305.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Consuming SOAP web service using Camel

Posted by rameshbabu <ra...@gmail.com>.
Hi,

{in.body} is java object which is the parameter to the web service method I
am going to consume.



--
View this message in context: http://camel.465427.n5.nabble.com/Consuming-SOAP-web-service-using-Camel-tp5744305p5744771.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Consuming SOAP web service using Camel

Posted by Christian Posta <ch...@gmail.com>.
what ends up being in the body (in.body)?

On Wed, Dec 4, 2013 at 3:45 AM, rameshbabu <ra...@gmail.com> wrote:
>  Hi,
>
> I am trying to consuming the soap web service using camel.
>
>  <route id="smsc_to_queue_and_database">
> <from uri="jms:queue:Request" />
> <bean ref="WorkOrder_Request" /> // I am preparing request Object
> <transform>
>         <simple>
>          &lt;soapenv:Envelope
>
> xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
>
> xmlns:ser=&quot;http://www.sstdomain.com/service/&quot;&gt;
>                     &lt;soapenv:Header/&gt;
>                     &lt;soapenv:Body&gt;
>
>                     ${in.body};
>                     &lt;/soapenv:Body&gt;
>                     &lt;/soapenv:Envelope&gt;
> &lt;/soapenv:Envelope&gt;
>       </simple>
>         </transform>
>
> <to uri="cxf:bean:SendNotificationService" />
> <to uri="jms:queue:Response" />
>
>
>  I am facing the following  issue.
>
>
>  org.apache.camel.RuntimeCamelException:
> org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML" element. You
> must send a SOAP request.
>         at
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1157)[88:org.apache.camel.camel-core:2.8.0.fuse-07-15]
>         at
> org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:184)[93:org.apache.camel.camel-jms:2.8.0.fuse-07-15]
>         at
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:110)[93:org.apache.camel.camel-jms:2.8.0.fuse-07-15]
>         at
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)[:1.6.0_27]
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.6.0_27]
>         at java.lang.Thread.run(Thread.java:679)[:1.6.0_27]
> Caused by: org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML"
> element. You must send a SOAP request.
>         at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:109)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:780)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1678)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1521)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:372)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         ... 3 more
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Consuming-SOAP-web-service-using-Camel-tp5744305.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Re: Consuming SOAP web service using Camel

Posted by rameshbabu <ra...@gmail.com>.
Hi,

I am using POJO dataformat.



--
View this message in context: http://camel.465427.n5.nabble.com/Consuming-SOAP-web-service-using-Camel-tp5744305p5744770.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Consuming SOAP web service using Camel

Posted by Willem Jiang <wi...@gmail.com>.
What kind of CXF data format do you use?
I doubt you may put a <HTML> tag there.


Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem


On Wed, Dec 4, 2013 at 7:45 PM, rameshbabu <ra...@gmail.com>wrote:

>  Hi,
>
> I am trying to consuming the soap web service using camel.
>
>  <route id="smsc_to_queue_and_database">
> <from uri="jms:queue:Request" />
> <bean ref="WorkOrder_Request" /> // I am preparing request Object
> <transform>
>         <simple>
>          &lt;soapenv:Envelope
>
> xmlns:soapenv=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
>
> xmlns:ser=&quot;http://www.sstdomain.com/service/&quot;&gt;
>                     &lt;soapenv:Header/&gt;
>                     &lt;soapenv:Body&gt;
>
>                     ${in.body};
>                     &lt;/soapenv:Body&gt;
>                     &lt;/soapenv:Envelope&gt;
> &lt;/soapenv:Envelope&gt;
>       </simple>
>         </transform>
>
> <to uri="cxf:bean:SendNotificationService" />
> <to uri="jms:queue:Response" />
>
>
>  I am facing the following  issue.
>
>
>  org.apache.camel.RuntimeCamelException:
> org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML" element. You
> must send a SOAP request.
>         at
>
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1157)[88:org.apache.camel.camel-core:2.8.0.fuse-07-15]
>         at
>
> org.apache.camel.component.jms.EndpointMessageListener$EndpointMessageListenerAsyncCallback.done(EndpointMessageListener.java:184)[93:org.apache.camel.camel-jms:2.8.0.fuse-07-15]
>         at
>
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:110)[93:org.apache.camel.camel-jms:2.8.0.fuse-07-15]
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
>
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
>
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)[94:org.springframework.jms:3.0.5.RELEASE]
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)[:1.6.0_27]
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.6.0_27]
>         at java.lang.Thread.run(Thread.java:679)[:1.6.0_27]
> Caused by: org.apache.cxf.binding.soap.SoapFault: No namespace on "HTML"
> element. You must send a SOAP request.
>         at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:109)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
>
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
>
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:780)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1678)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1521)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         at
>
> org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:372)[128:org.apache.cxf.bundle:2.4.3.fuse-04-15]
>         ... 3 more
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Consuming-SOAP-web-service-using-Camel-tp5744305.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>