Example (CXF example for using the WebServiceProvider API) using SOAPUI client does not return the original message !!

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Example (CXF example for using the WebServiceProvider API) using SOAPUI client does not return the original message !!

Charles Moulliard
Hi,

I try to use an external SOAP client to test the following camel example (http://cwiki.apache.org/CAMEL/cxf-example.html - CXF example for using the WebServiceProvider API).

When I run the code from maven (compile exec:java -PWebServiceProvider), everything works fine

2008-10-03 16:09:11.486::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2008-10-03 16:09:11.518::INFO:  jetty-6.1.11
2008-10-03 16:09:11.643::INFO:  Started SelectChannelConnector@0.0.0.0:9000
03-oct.-2008 16:09:12 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service {http://apache.org/hello_world_soap_http}SOAPService from class org.apache.cxf.jaxws.support.DummyImpl
03-oct.-2008 16:09:12 org.apache.cxf.configuration.spring.ConfigurerImpl getBeanName
INFO: Could not determine bean name for instance of class org.apache.cxf.jaxws.DispatchImpl.
03-oct.-2008 16:09:14 org.apache.camel.impl.converter.DefaultTypeConverter addTypeConverter
ATTENTION: Overriding type converter from: InstanceMethodTypeConverter: public java.lang.String org.apache.camel.converter.jaxp.XmlConverter.toString(javax.xml.transform.Source) throws javax.xml.transform.TransformerException to: StaticMethodTypeConverter: public static java.lang.String org.apache.camel.converter.IOConverter.toString(javax.xml.transform.Source) throws javax.xml.transform.TransformerException,java.io.IOException
03-oct.-2008 16:09:14 org.apache.camel.processor.Logger process
INFO: ID-dell-charles/3041-1223042951888/2-0 -> to(bean:testBean?methodName=processSOAP) , Pattern:InOut , Properties:{class org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo: {http://apache.org/hello_world_soap_http}greetMe]} , Headers:{content-type=text/xml; charset=utf-8, connection=keep-alive, content.type=text/xml; charset=utf-8, operationName=greetMe, Host=localhost:9000, Content-Length=287, SOAPAction="", User-Agent=Java/1.6.0_07, Accept=*, operationNameSpace=http://apache.org/hello_world_soap_http, Cache-Control=no-cache, Pragma=no-cache} , BodyType:org.apache.cxf.message.MessageContentsList , Body:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ns1:greetMe xmlns:ns1="http://apache.org/hello_world_soap_http/types"><requestType>Hello Camel!! How are you ? </requestType></ns1:greetMe></SOAP-ENV:Body></SOAP-ENV:Envelope> 
Hello Camel!! How are you ?
Greetings from Apache Camel!!!! Request was  Hello Camel!! How are you ?


but when I try to disable the call from the client client.invoke of the class (CamelCxfExample) and replace it by an external call using SOAPPUI GUI, the message returned does not include what camel receive.

Here is what SOAPUI sends end receives :

(1) Send

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://apache.org/hello_world_soap_http/types">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:greetMe>
         <typ:requestType>Hello Camel !! How are you ?</typ:requestType>
      </typ:greetMe>
   </soapenv:Body>
</soapenv:Envelope>

(2) Receive

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header/>
   <SOAP-ENV:Body>
      <ns1:greetMeResponse xmlns:ns1="http://apache.org/hello_world_soap_http/types">
         <responseType>Greetings from Apache Camel!!!! Request was</responseType>
      </ns1:greetMeResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and trace on console :

INFO: Creating Service {http://apache.org/hello_world_soap_http}SOAPService from WSDL: wsdl/hello_world.wsdl
03-oct.-2008 15:54:42 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:9000/GreeterContext/SOAPMessageService
2008-10-03 15:54:42.823::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2008-10-03 15:54:42.854::INFO:  jetty-6.1.11
2008-10-03 15:54:42.026::INFO:  Started SelectChannelConnector@0.0.0.0:9000
03-oct.-2008 15:54:51 org.apache.camel.impl.converter.DefaultTypeConverter addTypeConverter
ATTENTION: Overriding type converter from: StaticMethodTypeConverter: public static java.lang.String org.apache.camel.converter.IOConverter.toString(javax.xml.transform.Source) throws javax.xml.transform.TransformerException,java.io.IOException to: InstanceMethodTypeConverter: public java.lang.String org.apache.camel.converter.jaxp.XmlConverter.toString(javax.xml.transform.Source) throws javax.xml.transform.TransformerException
03-oct.-2008 15:54:51 org.apache.camel.processor.Logger process
INFO: ID-dell-charles/2897-1223042082903/2-0 -> to(bean:testBean?methodName=processSOAP) , Pattern:InOut , Properties:{class org.apache.cxf.service.model.BindingOperationInfo=[BindingOperationInfo: {http://apache.org/hello_world_soap_http}greetMe]} , Headers:{content-type=text/xml;charset=UTF-8, content.type=text/xml;charset=UTF-8, operationName=greetMe, Host=localhost:9000, Content-Length=333, SOAPAction="", User-Agent=Jakarta Commons-HttpClient/3.0.1, operationNameSpace=http://apache.org/hello_world_soap_http} , BodyType:org.apache.cxf.message.MessageContentsList , Body:<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://apache.org/hello_world_soap_http/types">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:greetMe>
         <typ:requestType>Hello Camel !! How are you ?</typ:requestType>
      </typ:greetMe>
   </soapenv:Body>
</soapenv:Envelope> 


Another remark is that the response time is very slow ????

Any idea about how to solve this ?

Charles Moulliard
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Email: [hidden email]
Twitter : @cmoulliard, @fusenews
Blog : http://cmoulliard.blogspot.com