Hi James,

I agree, let's implement a simple demo first.
I am just trying to create CxfConumser(holds a reference of CXF server) and CxfProducer (holds a reference of CXF client) with the CXF simple front endpoint , it is much close now .

Now I have a question about the spring configuration file. Can we put the Spring context into the endpoint ? So I can easily get the server and client from the spring context.

Here is  my other question:
When the CXFProducer get the response message, how can this response message can be process by Camel ? I just saw the CxfBinding storeCxfResponse. I guess there need a process somewhere.

BTW, I saw a note in the CxfBinding.createCxfMessage(CxfExchange exchange), there a note 'Is InputStream the best type to give to CXF?' in the code.

Here is my answer for that.
CXF uses the stax which is based on the stream API to parser the XML, so the CXF transport is also based on the stream API. And the interceptors are also based on the stream API, so we still need to use the InputStream to hold the CXF on wire message.


Willem.

James Strachan wrote:
On 8/8/07, Willem Jiang <[EMAIL PROTECTED]> wrote:
Hi

In the single jvm we could use local transport to send/receive the Camel
message, but we just need other transport the send/receive the Camel
message for separate jvms communication .

I have same idea we should just wrap the transport factory in the CXF,
and Camel not need to touch it. I am also working on it to make a simple
demo work.

For the CXFEndpoint part, I don't think the orginal design of CXF
endpointInfo with adress is enough,
It should hold enough information which we need to setup a CXF server or
client, such as sei class name , wsdl url etc.
The URI could be
cxf://http://localhost:1234/test?wsdl=file://local/helloworld.wsdl&serviceName=.....

But I don't think we can hold so many information in a single URI
string. eg. we just want to pass a service implementor's reference to
the ServiceFactoryBean.
James: Is there a way to use spring to wire up the endpoint information
for CXF?
In CXF we could use a jaxws syntax to setup the CXF server and client

  <jaxws:server id="inlineSoapBinding"
    serviceClass="org.apache.cxf.jaxws.service.Hello"
    address="http://localhost:8080/test";>
     <jaxws:serviceBean>
      <bean ref="#helloworld"/>
    </jaxws:serviceBean>
    <jaxws:binding>
      <soap:soapBinding mtomEnabled="true" version="1.2"/>
    </jaxws:binding>
  </jaxws:server>
   ....
 <jaxws:client id="wsdlLocation"
    serviceClass="org.apache.hello_world_soap_http.Greeter"
    serviceName="s:SOAPService"
    xmlns:s="http://apache.org/hello_world_soap_http";
    address="http://localhost:8080/simpleWithAddress";
    wsdlLocation="wsdl/hello_world.wsdl"/>

If there's a ton of configuration then we could always configure this
stuff using the normal CXF way in spring.xml - then just refer to it
by name (spring id/name) from Camel.


As you know CXF has two front end that we could use , one is simple
front end and the other is jaxws front end.
May be we need to do some work to auto discover which front end we need
to create the right CXF server or client.

BTW , we still need to set up the CXF interceptors for the CXF consumer
and CXF producer, which we can handler different message mode such as
POJO mode, Payload mode and Message mode :)
Now I am not clear about howto configure it :( and I don't think we can
do it in endpoint's URL.

OK. Lets start with the easy stuff and gradually get more complex.

So how about for now we assume CXF client or servers are configured in
spring outside of camel; then we try write a camel
endpoint/producer/consumer so we can consume camel messages and send
them to the CXF service, or we can get a CXF client to send to a camel
producer?

(We can worry about things like POJO v Payload v Message mode later on)


Reply via email to