You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Iman Rahmatizadeh <im...@gmail.com> on 2008/08/04 23:07:28 UTC

SoapActionOutInterceptor vs SoapPreProtocolOutInterceptor

Hi,
As I'm playing with cxf to understand its internals, After calling a
service(foreign non cxf) , It gives me an exception which tells me I need to
supply the soapAction in my header. Digging & debugging through code I see
SoapActionOutInterceptor setting it in one place and later on
SoapPreProtocolOutInterceptor resetting to the previous value, removing the
soapAction from request headers. Something tells me I'm missing something
big, anyone could shed some light ?

Iman

Re: SoapActionOutInterceptor vs SoapPreProtocolOutInterceptor

Posted by Iman Rahmatizadeh <im...@gmail.com>.
Done.
https://issues.apache.org/jira/browse/CXF-1733

Iman

On Tue, Aug 5, 2008 at 9:44 PM, Daniel Kulp <dk...@apache.org> wrote:

>
> Oh, yea.  Soap 1.2 puts it there.   Shoot.   OK.  Definitely need to fix
> it.
> Can you log a bug?
>
> Dan
>
>
> On Tuesday 05 August 2008 1:54:55 pm Iman Rahmatizadeh wrote:
> > No it doesn't. You see the SoapActionOutInterceptor appends
> > ";action=blaBla" to the content-type header :
> >
> >             String ct = (String) message.get(Message.CONTENT_TYPE);
> >
> >             if (ct.indexOf("action=\"") == -1) {
> >                 ct = new StringBuilder().append(ct)
> >                     .append("; action=").append(action).toString();
> >                 message.put(Message.CONTENT_TYPE, ct);
> >             }
> >
> > where after that SoapPreProtocolOutInterceptor resets it to the string
> > without the action :
> >
> >         message.put(Message.CONTENT_TYPE, soapVersion.getContentType());
> >
> > On Tue, Aug 5, 2008 at 6:16 PM, Daniel Kulp <dk...@apache.org> wrote:
> > > On Monday 04 August 2008 5:07:28 pm Iman Rahmatizadeh wrote:
> > > > Hi,
> > > > As I'm playing with cxf to understand its internals, After calling a
> > > > service(foreign non cxf) , It gives me an exception which tells me I
> > > > need to supply the soapAction in my header. Digging & debugging
> through
> > > > code I see SoapActionOutInterceptor setting it in one place and later
> > > > on SoapPreProtocolOutInterceptor resetting to the previous value,
> > > > removing
> > >
> > > the
> > >
> > > > soapAction from request headers. Something tells me I'm missing
> > > > something big, anyone could shed some light ?
> > > >
> > > > Iman
> > >
> > > I don't see the SoapPreProtocolOutInterceptor setting any sort of
> > > SOAPAction.....
> > >
> > > That said, I'm not sure why those two are separated out.   They
> probably
> > > could/should be combined into a single interceptor.
> > >
> > >
> > > --
> > > Daniel Kulp
> > > dkulp@apache.org
> > > http://www.dankulp.com/blog
>
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>

Re: SoapActionOutInterceptor vs SoapPreProtocolOutInterceptor

Posted by Daniel Kulp <dk...@apache.org>.
Oh, yea.  Soap 1.2 puts it there.   Shoot.   OK.  Definitely need to fix it.   
Can you log a bug?

Dan


On Tuesday 05 August 2008 1:54:55 pm Iman Rahmatizadeh wrote:
> No it doesn't. You see the SoapActionOutInterceptor appends
> ";action=blaBla" to the content-type header :
>
>             String ct = (String) message.get(Message.CONTENT_TYPE);
>
>             if (ct.indexOf("action=\"") == -1) {
>                 ct = new StringBuilder().append(ct)
>                     .append("; action=").append(action).toString();
>                 message.put(Message.CONTENT_TYPE, ct);
>             }
>
> where after that SoapPreProtocolOutInterceptor resets it to the string
> without the action :
>
>         message.put(Message.CONTENT_TYPE, soapVersion.getContentType());
>
> On Tue, Aug 5, 2008 at 6:16 PM, Daniel Kulp <dk...@apache.org> wrote:
> > On Monday 04 August 2008 5:07:28 pm Iman Rahmatizadeh wrote:
> > > Hi,
> > > As I'm playing with cxf to understand its internals, After calling a
> > > service(foreign non cxf) , It gives me an exception which tells me I
> > > need to supply the soapAction in my header. Digging & debugging through
> > > code I see SoapActionOutInterceptor setting it in one place and later
> > > on SoapPreProtocolOutInterceptor resetting to the previous value,
> > > removing
> >
> > the
> >
> > > soapAction from request headers. Something tells me I'm missing
> > > something big, anyone could shed some light ?
> > >
> > > Iman
> >
> > I don't see the SoapPreProtocolOutInterceptor setting any sort of
> > SOAPAction.....
> >
> > That said, I'm not sure why those two are separated out.   They probably
> > could/should be combined into a single interceptor.
> >
> >
> > --
> > Daniel Kulp
> > dkulp@apache.org
> > http://www.dankulp.com/blog



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: SoapActionOutInterceptor vs SoapPreProtocolOutInterceptor

Posted by Iman Rahmatizadeh <im...@gmail.com>.
No it doesn't. You see the SoapActionOutInterceptor appends ";action=blaBla"
to the content-type header :

            String ct = (String) message.get(Message.CONTENT_TYPE);

            if (ct.indexOf("action=\"") == -1) {
                ct = new StringBuilder().append(ct)
                    .append("; action=").append(action).toString();
                message.put(Message.CONTENT_TYPE, ct);
            }

where after that SoapPreProtocolOutInterceptor resets it to the string
without the action :

        message.put(Message.CONTENT_TYPE, soapVersion.getContentType());




On Tue, Aug 5, 2008 at 6:16 PM, Daniel Kulp <dk...@apache.org> wrote:

> On Monday 04 August 2008 5:07:28 pm Iman Rahmatizadeh wrote:
> > Hi,
> > As I'm playing with cxf to understand its internals, After calling a
> > service(foreign non cxf) , It gives me an exception which tells me I need
> > to supply the soapAction in my header. Digging & debugging through code I
> > see SoapActionOutInterceptor setting it in one place and later on
> > SoapPreProtocolOutInterceptor resetting to the previous value, removing
> the
> > soapAction from request headers. Something tells me I'm missing something
> > big, anyone could shed some light ?
> >
> > Iman
>
>
> I don't see the SoapPreProtocolOutInterceptor setting any sort of
> SOAPAction.....
>
> That said, I'm not sure why those two are separated out.   They probably
> could/should be combined into a single interceptor.
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>

Re: SoapActionOutInterceptor vs SoapPreProtocolOutInterceptor

Posted by Daniel Kulp <dk...@apache.org>.
On Monday 04 August 2008 5:07:28 pm Iman Rahmatizadeh wrote:
> Hi,
> As I'm playing with cxf to understand its internals, After calling a
> service(foreign non cxf) , It gives me an exception which tells me I need
> to supply the soapAction in my header. Digging & debugging through code I
> see SoapActionOutInterceptor setting it in one place and later on
> SoapPreProtocolOutInterceptor resetting to the previous value, removing the
> soapAction from request headers. Something tells me I'm missing something
> big, anyone could shed some light ?
>
> Iman


I don't see the SoapPreProtocolOutInterceptor setting any sort of 
SOAPAction.....

That said, I'm not sure why those two are separated out.   They probably 
could/should be combined into a single interceptor.


-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog