Hi,

I can't see the log or the demo.
Can you show me your route configure and error log ?

On 6/30/11 7:31 PM, Paul Lowry wrote:
Hi all,

I seem to have encountered a bug in Camel-XCF when running in Tomcat (as
described in http://camel.apache.org/cxf-tomcat-example )

I am using a wsdl-first approach, whereas the demo is java-first; but I
don't think this makes any difference.

The problem is: I can invoke any methods in my SEI which have one
parameter; but if I define a method with two or more parameters, only
the first one is processed by Camel; the others are all null.

My WSDL is valid wrapped-doc-literal:
<types>
  <schema>
   <element name="handleTwoArgs">
    <complexType>
     <sequence>
      <element name="input1" type="xsd:string"/>
      <element name="input2" type="xsd:int"/>
     </sequence>
    </complexType>
   </element>
   ...
<message name="handleTwoArgs">
  <part name="request" element="tns:handleTwoArgs"/>
</message>
....
<portType name="TestPort">
  <operation name="handleTwoArgs">
   <input name="handleTwoArgs" message="tns:handleTwoArgs"/>
   ...
<binding name="TestBinding" type="tns:TestPort">
  <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
style="document"/>
   <operation name="handleTwoArgs">
    <soap:operation soapAction="" style="document"/>
     <input name="handleTwoArgs">
      <soap:body use="literal" />
     </input>
     ...

But as the trace logs show, only the first input parameter is being
processed by Camel-CXF:
TRACE component.bean.MethodInfo  ->>>>  invoking: public
java.lang.String
com.test.webservice.TestWebServiceImpl.handleTwoArgs(java.lang.String,int) on 
bean: com.test.webservice.TestWebServiceImpl@7e05c4 with arguments: {foo, null} 
for exchange: Exchange[Message: [foo, 1]]

The problem appears to be in one of these classes:
org.apache.camel.impl.converter.DefaultTypeConverter
org.apache.camel.component.cxf.converter.CxfConverter

The above classes are responsible for converting an incoming message
(type=org.apache.cxf.message.MessageContentsList) into another message
type.

In my example, Camel sending the message to a bean processor, so
CxfConverter should be converting the MessageContentsList into
BeanInvocation. But the same problem occurs when I use a file producer
instead of a bean, so I reckon the problem is in the CxfConverter code,
or the handling of type MessageContentsList, rather than the mapping to
type BeanInvocation.

The attached tar file contains:
- a demo which reproduces the problem
- log files from running the demo (see handleTwoArgs.log)

I tried upgrading from Camel 2.6.0 to 2.7.3-SNAPSHOT, and from CXF 2.3.2
to 2.3.6-SNAPSHOT, but the behaviour did not change.

I could work around the problem by nesting all data in one complex
parameter; but this approach is not suitable, because the client is
already in production and I am integrating with it, so I cannot modify
its wsdl.

I might be able to pre-process the message exchange, converting the
MessageContentsList to a suitable type; but I would need help doing
this, and it's a bit of a hack, so...

Is there any (better) solution?

Kind Regards,

Paul

STRICTLY PRIVATE, CONFIDENTIAL AND PRIVILEGED COMMUNICATION.

This message (including attachments) may contain information that is
privileged, confidential or protected from disclosure. They are intended
solely for the use of the intended recipient. If you are not the
intended recipient, you are hereby notified that dissemination,
disclosure, copying, distribution, printing, transmission or use of this
message or any information contained in it is strictly prohibited. If
you have received this message from NewBay Software in error, please
immediately notify the sender by reply email and delete this message
from your computer. The content of this e-mail, and any files
transmitted with it, may have been changed or altered without the
consent of the author. Although we have taken steps to ensure that this
email and attachments are free from any virus, we advise that in keeping
with good computing practice the recipient should ensure they are
actually virus free.


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Reply via email to