You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Fullocto <br...@fr.thalesgroup.com> on 2008/05/06 13:32:20 UTC
Parsing an out message
Hi all,
I am currently working in my POJO (in fact it is in a method in my class
used for implementing a CXF service).
I want to use servicemix client to access a BC provider, I use sendsync to
send the in response.
But how can I handle the incoming out message?
It will contain the response of a web service (calculator) and I want to
catch the element (result/arg0). Can I use an XML parser ? JAXB?JAXP?SAX? or
is the only solution to use String Class and its methods.
TY for your help
Brice (facing numerous issues :/)
--
View this message in context: http://www.nabble.com/Parsing-an-out-message-tp17080766p17080766.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: Parsing an out message
Posted by Freeman Fang <fr...@gmail.com>.
Fullocto wrote:
>
> Freeman Fang wrote:
>
>> comment inline
>>
>> Freeman
>> Fullocto wrote:
>>
>>> bsnyder wrote:
>>>
>>>
>>>> If you're invoking a web service that is external to the ESB, then why
>>>> not use the servicemix-cxf-bc to invoke it and simplify the matter?
>>>>
>>>>
>>>>
>>>>
>>> It looks idiot, I know ;)
>>> Actually, I am practising and my further goal is to understand how to
>>> invoke
>>> an internal service.
>>>
>>> I've already succeeded:
>>> -to call an external provider (with a chain of BC consumer + BC provider)
>>> -to call the external provider using a CXF proxy in a CXF SE service.
>>> -to call a CXF SE service in anoter CXF SE service (using CXF-PROXY)
>>>
>>> But I like to be able to call it "manually" to do as if I have to call a
>>> POJO service in service mix (without using a proxy even if maybe it is
>>> the
>>> best way).
>>> I tried to find how the message is handeld in the source code of CXF SE
>>> and
>>> how the XML element are extracted but this operation seems to be managed
>>> by
>>> org.apache.cxf.jaxws library
>>> (endpoint.publish(jbi://+ID_GENERATOR.generateSanitizedId());
>>>
>>> I do not know where to search to understand how the jbi messages are
>>> parsed
>>> CXF, jaxws sources ? or samples/examples with SE beans?
>>>
>>>
>> you may need take a look at the jbi binding and jbi transport which host
>> in apache cxf code base, [1] and [2] for more details, also there is a
>> wiki [3] how cxf integrate with servicemix may help
>>
>> [1]http://svn.apache.org/repos/asf/cxf/trunk/rt/bindings/jbi/
>> [2]http://svn.apache.org/repos/asf/cxf/trunk/rt/transports/jbi/
>> [3]http://servicemix.apache.org/integrate-cxf-with-servicemix.html
>>
>>
>>
>
> Thank you for the clue
> I found it is using the class XMLStreamReader and according what i found
> googling and verifying in the javabean it is related to the parser StAx (XML
> API "fusing" the advantages of DOM with the advantages of SAX) so I'm gonna
> learn a new tech :) -or at least see how I can use it-
>
Yes, cxf use stax to parse xml for higher performance
Freeman
Re: Parsing an out message
Posted by Fullocto <br...@fr.thalesgroup.com>.
Freeman Fang wrote:
>
> comment inline
>
> Freeman
> Fullocto wrote:
>>
>> bsnyder wrote:
>>
>>> If you're invoking a web service that is external to the ESB, then why
>>> not use the servicemix-cxf-bc to invoke it and simplify the matter?
>>>
>>>
>>>
>>
>> It looks idiot, I know ;)
>> Actually, I am practising and my further goal is to understand how to
>> invoke
>> an internal service.
>>
>> I've already succeeded:
>> -to call an external provider (with a chain of BC consumer + BC provider)
>> -to call the external provider using a CXF proxy in a CXF SE service.
>> -to call a CXF SE service in anoter CXF SE service (using CXF-PROXY)
>>
>> But I like to be able to call it "manually" to do as if I have to call a
>> POJO service in service mix (without using a proxy even if maybe it is
>> the
>> best way).
>> I tried to find how the message is handeld in the source code of CXF SE
>> and
>> how the XML element are extracted but this operation seems to be managed
>> by
>> org.apache.cxf.jaxws library
>> (endpoint.publish(jbi://+ID_GENERATOR.generateSanitizedId());
>>
>> I do not know where to search to understand how the jbi messages are
>> parsed
>> CXF, jaxws sources ? or samples/examples with SE beans?
>>
> you may need take a look at the jbi binding and jbi transport which host
> in apache cxf code base, [1] and [2] for more details, also there is a
> wiki [3] how cxf integrate with servicemix may help
>
> [1]http://svn.apache.org/repos/asf/cxf/trunk/rt/bindings/jbi/
> [2]http://svn.apache.org/repos/asf/cxf/trunk/rt/transports/jbi/
> [3]http://servicemix.apache.org/integrate-cxf-with-servicemix.html
>
>
Thank you for the clue
I found it is using the class XMLStreamReader and according what i found
googling and verifying in the javabean it is related to the parser StAx (XML
API "fusing" the advantages of DOM with the advantages of SAX) so I'm gonna
learn a new tech :) -or at least see how I can use it-
--
View this message in context: http://www.nabble.com/Parsing-an-out-message-tp17080766p17103721.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: Parsing an out message
Posted by Freeman Fang <fr...@gmail.com>.
comment inline
Freeman
Fullocto wrote:
>
> bsnyder wrote:
>
>> If you're invoking a web service that is external to the ESB, then why
>> not use the servicemix-cxf-bc to invoke it and simplify the matter?
>>
>>
>>
>
> It looks idiot, I know ;)
> Actually, I am practising and my further goal is to understand how to invoke
> an internal service.
>
> I've already succeeded:
> -to call an external provider (with a chain of BC consumer + BC provider)
> -to call the external provider using a CXF proxy in a CXF SE service.
> -to call a CXF SE service in anoter CXF SE service (using CXF-PROXY)
>
> But I like to be able to call it "manually" to do as if I have to call a
> POJO service in service mix (without using a proxy even if maybe it is the
> best way).
> I tried to find how the message is handeld in the source code of CXF SE and
> how the XML element are extracted but this operation seems to be managed by
> org.apache.cxf.jaxws library
> (endpoint.publish(jbi://+ID_GENERATOR.generateSanitizedId());
>
> I do not know where to search to understand how the jbi messages are parsed
> CXF, jaxws sources ? or samples/examples with SE beans?
>
you may need take a look at the jbi binding and jbi transport which host
in apache cxf code base, [1] and [2] for more details, also there is a
wiki [3] how cxf integrate with servicemix may help
[1]http://svn.apache.org/repos/asf/cxf/trunk/rt/bindings/jbi/
[2]http://svn.apache.org/repos/asf/cxf/trunk/rt/transports/jbi/
[3]http://servicemix.apache.org/integrate-cxf-with-servicemix.html
>
>
>
Re: Parsing an out message
Posted by Fullocto <br...@fr.thalesgroup.com>.
bsnyder wrote:
>
>
> If you're invoking a web service that is external to the ESB, then why
> not use the servicemix-cxf-bc to invoke it and simplify the matter?
>
>
It looks idiot, I know ;)
Actually, I am practising and my further goal is to understand how to invoke
an internal service.
I've already succeeded:
-to call an external provider (with a chain of BC consumer + BC provider)
-to call the external provider using a CXF proxy in a CXF SE service.
-to call a CXF SE service in anoter CXF SE service (using CXF-PROXY)
But I like to be able to call it "manually" to do as if I have to call a
POJO service in service mix (without using a proxy even if maybe it is the
best way).
I tried to find how the message is handeld in the source code of CXF SE and
how the XML element are extracted but this operation seems to be managed by
org.apache.cxf.jaxws library
(endpoint.publish(jbi://+ID_GENERATOR.generateSanitizedId());
I do not know where to search to understand how the jbi messages are parsed
CXF, jaxws sources ? or samples/examples with SE beans?
--
View this message in context: http://www.nabble.com/Parsing-an-out-message-tp17080766p17103167.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.
Re: Parsing an out message
Posted by Bruce Snyder <br...@gmail.com>.
On Tue, May 6, 2008 at 4:32 AM, Fullocto <br...@fr.thalesgroup.com> wrote:
>
> Hi all,
>
> I am currently working in my POJO (in fact it is in a method in my class
> used for implementing a CXF service).
> I want to use servicemix client to access a BC provider, I use sendsync to
> send the in response.
>
> But how can I handle the incoming out message?
> It will contain the response of a web service (calculator) and I want to
> catch the element (result/arg0). Can I use an XML parser ? JAXB?JAXP?SAX? or
> is the only solution to use String Class and its methods.
If you're invoking a web service that is external to the ESB, then why
not use the servicemix-cxf-bc to invoke it and simplify the matter?
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Blog: http://bruceblog.org/