You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Andrew123 <In...@ukr.net> on 2008/11/21 12:19:59 UTC
XFire Migration
Hi all,
I want to move my application from xfire to CXF. But I have few questions.
1. Before calling web service I set some parameters to request header. I use
handlers in xfire for this purposes. As I know, in CXF handlers were changed
to interceptors. But I can't find, how add headers in interceptor. Can I set
some value to header in inteceptor?
2. Does CXF support this xfire construction:
<property key="com.somepackage.SomeClassImpl.implementation">
com.somepackage.SomeClass </property>?
--
View this message in context: http://www.nabble.com/XFire-Migration-tp20619183p20619183.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: XFire Migration
Posted by "Andrew.K" <In...@ukr.net>.
I tried this. But, I can't get them in server inInterceptor. Method
message.getHeaders() doesn't return them. There is server inInterceptor
code:
public class ServerInInterceptor extends AbstractSoapInterceptor {
static final Log log = LogFactory.getLog(ServerInInterceptor.class);
public ServerInInterceptor() {
super(Phase.USER_PROTOCOL);
}
public void handleMessage(SoapMessage message) {
System.out.println("Headers");
for (Header h : message.getHeaders())
System.out.println(h.getName());
}
}
dkulp wrote:
>
> On Friday 21 November 2008 6:19:59 am Andrew123 wrote:
>> Hi all,
>>
>> I want to move my application from xfire to CXF. But I have few
>> questions.
>>
>> 1. Before calling web service I set some parameters to request header. I
>> use handlers in xfire for this purposes. As I know, in CXF handlers were
>> changed to interceptors. But I can't find, how add headers in
>> interceptor.
>> Can I set some value to header in inteceptor?
>
> Yes. If the Message is a "SoapMessage", then just call
> message.getHeaders()
> and add them to the returned list.
>
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
>
>
--
View this message in context: http://www.nabble.com/XFire-Migration-tp20619183p20623939.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: XFire Migration
Posted by Daniel Kulp <dk...@apache.org>.
On Friday 21 November 2008 6:19:59 am Andrew123 wrote:
> Hi all,
>
> I want to move my application from xfire to CXF. But I have few questions.
>
> 1. Before calling web service I set some parameters to request header. I
> use handlers in xfire for this purposes. As I know, in CXF handlers were
> changed to interceptors. But I can't find, how add headers in interceptor.
> Can I set some value to header in inteceptor?
Yes. If the Message is a "SoapMessage", then just call message.getHeaders()
and add them to the returned list.
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Re: XFire Migration
Posted by Benson Margulies <bi...@gmail.com>.
I'm reasonably certain that this works, but I'm not the guy who can
tell you the recipe.
On Fri, Nov 21, 2008 at 8:32 AM, Andrew123 <In...@ukr.net> wrote:
>
> Yes, it is associating a class with an interface, thanks. What about adding
> header in interceptor? I found, how add header to soap mesage, but I need
> BindingProvider. Can I get it from interceptor?
>
>
> Benson Margulies-4 wrote:
>>
>> I don't have enough context here to answer #2. If this is the feature
>> of associating a class with an interface, then the answer is yes, but
>> the configuration process is different. Please read the Aegis doc.
>>
>> On Fri, Nov 21, 2008 at 6:19 AM, Andrew123 <In...@ukr.net> wrote:
>>>
>>> Hi all,
>>>
>>> I want to move my application from xfire to CXF. But I have few
>>> questions.
>>>
>>> 1. Before calling web service I set some parameters to request header. I
>>> use
>>> handlers in xfire for this purposes. As I know, in CXF handlers were
>>> changed
>>> to interceptors. But I can't find, how add headers in interceptor. Can I
>>> set
>>> some value to header in inteceptor?
>>>
>>> 2. Does CXF support this xfire construction:
>>> <property key="com.somepackage.SomeClassImpl.implementation">
>>> com.somepackage.SomeClass </property>?
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/XFire-Migration-tp20619183p20619183.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/XFire-Migration-tp20619183p20621086.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
Re: XFire Migration
Posted by "Andrew.K" <In...@ukr.net>.
I need to set some values in SOAP request before sending it on server. In
xfire I used handlers for this purposes. Now, I think, I must use
interceptors. But I can't find, how set some values to header in
interceptor. Could you please provide sample code? I think, it helps me.
ammulder wrote:
>
> I know you can set SOAP headers from a JAX-WS handler (I could provide
> sample code if that would help -- I just worked this out myself
> yesterday). I'm not sure about from a CXF interceptor.
>
> Thanks,
> Aaron
>
> On Fri, Nov 21, 2008 at 8:32 AM, Andrew123 <In...@ukr.net> wrote:
>>
>> Yes, it is associating a class with an interface, thanks. What about
>> adding
>> header in interceptor? I found, how add header to soap mesage, but I need
>> BindingProvider. Can I get it from interceptor?
>>
>>
>> Benson Margulies-4 wrote:
>>>
>>> I don't have enough context here to answer #2. If this is the feature
>>> of associating a class with an interface, then the answer is yes, but
>>> the configuration process is different. Please read the Aegis doc.
>>>
>>> On Fri, Nov 21, 2008 at 6:19 AM, Andrew123 <In...@ukr.net> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> I want to move my application from xfire to CXF. But I have few
>>>> questions.
>>>>
>>>> 1. Before calling web service I set some parameters to request header.
>>>> I
>>>> use
>>>> handlers in xfire for this purposes. As I know, in CXF handlers were
>>>> changed
>>>> to interceptors. But I can't find, how add headers in interceptor. Can
>>>> I
>>>> set
>>>> some value to header in inteceptor?
>>>>
>>>> 2. Does CXF support this xfire construction:
>>>> <property key="com.somepackage.SomeClassImpl.implementation">
>>>> com.somepackage.SomeClass </property>?
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/XFire-Migration-tp20619183p20619183.html
>>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/XFire-Migration-tp20619183p20621086.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/XFire-Migration-tp20619183p20623829.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: XFire Migration
Posted by Aaron Mulder <am...@alumni.princeton.edu>.
I know you can set SOAP headers from a JAX-WS handler (I could provide
sample code if that would help -- I just worked this out myself
yesterday). I'm not sure about from a CXF interceptor.
Thanks,
Aaron
On Fri, Nov 21, 2008 at 8:32 AM, Andrew123 <In...@ukr.net> wrote:
>
> Yes, it is associating a class with an interface, thanks. What about adding
> header in interceptor? I found, how add header to soap mesage, but I need
> BindingProvider. Can I get it from interceptor?
>
>
> Benson Margulies-4 wrote:
>>
>> I don't have enough context here to answer #2. If this is the feature
>> of associating a class with an interface, then the answer is yes, but
>> the configuration process is different. Please read the Aegis doc.
>>
>> On Fri, Nov 21, 2008 at 6:19 AM, Andrew123 <In...@ukr.net> wrote:
>>>
>>> Hi all,
>>>
>>> I want to move my application from xfire to CXF. But I have few
>>> questions.
>>>
>>> 1. Before calling web service I set some parameters to request header. I
>>> use
>>> handlers in xfire for this purposes. As I know, in CXF handlers were
>>> changed
>>> to interceptors. But I can't find, how add headers in interceptor. Can I
>>> set
>>> some value to header in inteceptor?
>>>
>>> 2. Does CXF support this xfire construction:
>>> <property key="com.somepackage.SomeClassImpl.implementation">
>>> com.somepackage.SomeClass </property>?
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/XFire-Migration-tp20619183p20619183.html
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/XFire-Migration-tp20619183p20621086.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
Re: XFire Migration
Posted by Andrew123 <In...@ukr.net>.
Yes, it is associating a class with an interface, thanks. What about adding
header in interceptor? I found, how add header to soap mesage, but I need
BindingProvider. Can I get it from interceptor?
Benson Margulies-4 wrote:
>
> I don't have enough context here to answer #2. If this is the feature
> of associating a class with an interface, then the answer is yes, but
> the configuration process is different. Please read the Aegis doc.
>
> On Fri, Nov 21, 2008 at 6:19 AM, Andrew123 <In...@ukr.net> wrote:
>>
>> Hi all,
>>
>> I want to move my application from xfire to CXF. But I have few
>> questions.
>>
>> 1. Before calling web service I set some parameters to request header. I
>> use
>> handlers in xfire for this purposes. As I know, in CXF handlers were
>> changed
>> to interceptors. But I can't find, how add headers in interceptor. Can I
>> set
>> some value to header in inteceptor?
>>
>> 2. Does CXF support this xfire construction:
>> <property key="com.somepackage.SomeClassImpl.implementation">
>> com.somepackage.SomeClass </property>?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/XFire-Migration-tp20619183p20619183.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/XFire-Migration-tp20619183p20621086.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: XFire Migration
Posted by Benson Margulies <bi...@gmail.com>.
I don't have enough context here to answer #2. If this is the feature
of associating a class with an interface, then the answer is yes, but
the configuration process is different. Please read the Aegis doc.
On Fri, Nov 21, 2008 at 6:19 AM, Andrew123 <In...@ukr.net> wrote:
>
> Hi all,
>
> I want to move my application from xfire to CXF. But I have few questions.
>
> 1. Before calling web service I set some parameters to request header. I use
> handlers in xfire for this purposes. As I know, in CXF handlers were changed
> to interceptors. But I can't find, how add headers in interceptor. Can I set
> some value to header in inteceptor?
>
> 2. Does CXF support this xfire construction:
> <property key="com.somepackage.SomeClassImpl.implementation">
> com.somepackage.SomeClass </property>?
>
> --
> View this message in context: http://www.nabble.com/XFire-Migration-tp20619183p20619183.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>