ClientImpl - creates a new message ????

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ClientImpl - creates a new message ????

edelln
Hi,
 
I am trying to port Yoko over from celtix to use cxf.
 
In this use case, a Web services client talks to a Web services server
through the IIOP protocol. Both the client and the server are
implemented using cxf
and the IIOP protocol is enabled by installing the Yoko CORBA binding
into cxf.
 
The request is sent from the client to the server and the server has got
the result and sent
it back to the client.
 
The problem here is in the CorbaConduit we have a CorbaMessage once I
call
OnMessage on the incomingObserver - In the clientImpl in Cxf it creates
a new message so I end up
with a CorbaMessage within a CorbaMessage which then contains the
MessageImpl. My first CorbaMessage
had a destination etc set which the new message doesn't so I loose all
this information I need.
 
Is it possible to make the creation of the new Message optional ?
 
thanks, Edell.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: ClientImpl - creates a new message ????

Willem2
Hi Edell,

I can't fully get what you said,  but  I can  tell you how the  JMS
conduit does in  CXF.
In your case , request is send from the conduit and couduit also need to
handle the server's response.
Current CXF's conduit is the client side sender, the response is handled
by the stream which set in the conduit send method close method, and the
outMessage and inMessage's relationship is maintained by exchange.
You can see from JMSOutputStream.handleResponse() for receiving the
response in the
trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java.
The incomingObserver is used to deal with  WS-Address things,  I think
it you need to implement the request and response first and then work on it.

Here is URL for CXF architecture guide
http://cwiki.apache.org/CXF/architecture-guide.html

Cheers,

Willem.

 

Nolan, Edell wrote:

>Hi,
>
>I am trying to port Yoko over from celtix to use cxf.
>
>In this use case, a Web services client talks to a Web services server
>through the IIOP protocol. Both the client and the server are
>implemented using cxf
>and the IIOP protocol is enabled by installing the Yoko CORBA binding
>into cxf.
>
>The request is sent from the client to the server and the server has got
>the result and sent
>it back to the client.
>
>The problem here is in the CorbaConduit we have a CorbaMessage once I
>call
>OnMessage on the incomingObserver - In the clientImpl in Cxf it creates
>a new message so I end up
>with a CorbaMessage within a CorbaMessage which then contains the
>MessageImpl. My first CorbaMessage
>had a destination etc set which the new message doesn't so I loose all
>this information I need.
>
>Is it possible to make the creation of the new Message optional ?
>
>thanks, Edell.
>
>
>
>  
>

Reply | Threaded
Open this post in threaded view
|

RE: ClientImpl - creates a new message ????

Eoghan Glynn-2
In reply to this post by edelln

Edell,

The purpose of the Binding.createMessage() call in
ClientImpl.onMessage() is to *wrap* the generic message provided by the
transport layer with a binding-specific message.

Thus for say SOAP over HTTP, the HTTPConduit creates a generic Message
for the incoming payload, which is then wrapped by a SoapMessage created
by the SoapBinding.

This allows for a clean separation between binding and transport in the
incoming dispatch path.

However, things are slightly different for CORBA, as the binding and
transport are one and the same. So why not just implement
CORBABinding.createMessage() as follows:

    public Message createMessage(Message message) {
        // no wrapping required
        return message;
    }

Cheers,
Eoghan

> -----Original Message-----
> From: Nolan, Edell [mailto:[hidden email]]
> Sent: 17 November 2006 16:22
> To: [hidden email]
> Subject: ClientImpl - creates a new message ????
>
> Hi,
>  
> I am trying to port Yoko over from celtix to use cxf.
>  
> In this use case, a Web services client talks to a Web
> services server through the IIOP protocol. Both the client
> and the server are implemented using cxf and the IIOP
> protocol is enabled by installing the Yoko CORBA binding into cxf.
>  
> The request is sent from the client to the server and the
> server has got the result and sent it back to the client.
>  
> The problem here is in the CorbaConduit we have a
> CorbaMessage once I call OnMessage on the incomingObserver -
> In the clientImpl in Cxf it creates a new message so I end up
> with a CorbaMessage within a CorbaMessage which then contains
> the MessageImpl. My first CorbaMessage had a destination etc
> set which the new message doesn't so I loose all this
> information I need.
>  
> Is it possible to make the creation of the new Message optional ?
>  
> thanks, Edell.
>  
>  
>