You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Lars-Fredrik Smedberg <it...@gmail.com> on 2015/04/09 23:53:01 UTC

MessageContext.WSDL_SERVICE and WSDL_OPERATION

Hi!

I see in JSR 224 that WSDL_SERVICE and WSDL_OPERATION both are optional.
All services uses a document/literal/wrapped SOAP binding.

We are using WebSphere Liberty Profile Next Beta in development which uses
CXF and WebSphere Full Profile in producetion which uses Axis2

In both cases WSDL_SERVICE contains a value. For CXF we always seem to get
a value for WSDL_OPERATION and for Axis2 we not seem to get a value for
WSDL_OPERATION

Can anyone explain how WSDL_SERVICE and WSDL_OPERATION are populated when
using CXF?

Regards
LF

-- 
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsmeden@gmail.com, and destroy all copies of this
message and any attachments.

Re: MessageContext.WSDL_SERVICE and WSDL_OPERATION

Posted by Daniel Kulp <dk...@apache.org>.
> On Apr 10, 2015, at 4:29 PM, Lars-Fredrik Smedberg <it...@gmail.com> wrote:
> 
> Thanks for the answer Daniel.
> 
> I assume you try the way you describe in 1 before 2?

Yea.

> Some follow upp questions:
> 
> 1. What formats of SOAPAction is allowed and how is it matched? Is both the
> namespace and operation part matched or only the operation? Does it handle
> also WCF style SOAPAction without a #?

No, just what’s in the WSDL.   If the WSDL defines an action for the operation AND we can uniquely identify the operation based on those actions (no two operations have the same action).   It’s literally just a match of what’s there in the wsdl compared to what came in on the wire.

It’s a BIT more complicated with WS-Addressing action matching.  



> 2. Do you have some pointers to the CXF source code that does the
> parsing/matching that I can look at?

Take a look in
rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapActionInInterceptor.java

Dan



> 
> When in production on the WAS using Axis2 we look at the first childnode of
> Element type of the SOAPBody and takes its localname but it would be nice
> to also understand how the matching/parsing of the SOAPAction takes place.
> 
> Thanks
> 
> Lars-Fredrik
> On Apr 10, 2015 7:49 PM, "Daniel Kulp" <dk...@apache.org> wrote:
> 
>> 
>>> On Apr 9, 2015, at 5:53 PM, Lars-Fredrik Smedberg <it...@gmail.com>
>> wrote:
>>> 
>>> I see in JSR 224 that WSDL_SERVICE and WSDL_OPERATION both are optional.
>>> All services uses a document/literal/wrapped SOAP binding.
>>> 
>>> We are using WebSphere Liberty Profile Next Beta in development which
>> uses
>>> CXF and WebSphere Full Profile in producetion which uses Axis2
>>> 
>>> In both cases WSDL_SERVICE contains a value. For CXF we always seem to
>> get
>>> a value for WSDL_OPERATION and for Axis2 we not seem to get a value for
>>> WSDL_OPERATION
>>> 
>>> Can anyone explain how WSDL_SERVICE and WSDL_OPERATION are populated when
>>> using CXF?
>> 
>> There are two ways:
>> 
>> 1) SOAPAction/WS-Actions - if an operation can be matched based on the
>> actions, we use it.
>> 
>> 2) When the SOAP Handler is called, in CXF the “parsing” is at the first
>> element of the body so we take a look at that element name and if it
>> matches a single operations payload, we can use that operation name.
>> 
>> 
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>> 
>> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: MessageContext.WSDL_SERVICE and WSDL_OPERATION

Posted by Lars-Fredrik Smedberg <it...@gmail.com>.
Thanks for the answer Daniel.

I assume you try the way you describe in 1 before 2?

Some follow upp questions:

1. What formats of SOAPAction is allowed and how is it matched? Is both the
namespace and operation part matched or only the operation? Does it handle
also WCF style SOAPAction without a #?

2. Do you have some pointers to the CXF source code that does the
parsing/matching that I can look at?

When in production on the WAS using Axis2 we look at the first childnode of
Element type of the SOAPBody and takes its localname but it would be nice
to also understand how the matching/parsing of the SOAPAction takes place.

Thanks

Lars-Fredrik
On Apr 10, 2015 7:49 PM, "Daniel Kulp" <dk...@apache.org> wrote:

>
> > On Apr 9, 2015, at 5:53 PM, Lars-Fredrik Smedberg <it...@gmail.com>
> wrote:
> >
> > I see in JSR 224 that WSDL_SERVICE and WSDL_OPERATION both are optional.
> > All services uses a document/literal/wrapped SOAP binding.
> >
> > We are using WebSphere Liberty Profile Next Beta in development which
> uses
> > CXF and WebSphere Full Profile in producetion which uses Axis2
> >
> > In both cases WSDL_SERVICE contains a value. For CXF we always seem to
> get
> > a value for WSDL_OPERATION and for Axis2 we not seem to get a value for
> > WSDL_OPERATION
> >
> > Can anyone explain how WSDL_SERVICE and WSDL_OPERATION are populated when
> > using CXF?
>
> There are two ways:
>
> 1) SOAPAction/WS-Actions - if an operation can be matched based on the
> actions, we use it.
>
> 2) When the SOAP Handler is called, in CXF the “parsing” is at the first
> element of the body so we take a look at that element name and if it
> matches a single operations payload, we can use that operation name.
>
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>

Re: MessageContext.WSDL_SERVICE and WSDL_OPERATION

Posted by Daniel Kulp <dk...@apache.org>.
> On Apr 9, 2015, at 5:53 PM, Lars-Fredrik Smedberg <it...@gmail.com> wrote:
> 
> I see in JSR 224 that WSDL_SERVICE and WSDL_OPERATION both are optional.
> All services uses a document/literal/wrapped SOAP binding.
> 
> We are using WebSphere Liberty Profile Next Beta in development which uses
> CXF and WebSphere Full Profile in producetion which uses Axis2
> 
> In both cases WSDL_SERVICE contains a value. For CXF we always seem to get
> a value for WSDL_OPERATION and for Axis2 we not seem to get a value for
> WSDL_OPERATION
> 
> Can anyone explain how WSDL_SERVICE and WSDL_OPERATION are populated when
> using CXF?

There are two ways:

1) SOAPAction/WS-Actions - if an operation can be matched based on the actions, we use it.

2) When the SOAP Handler is called, in CXF the “parsing” is at the first element of the body so we take a look at that element name and if it matches a single operations payload, we can use that operation name.  


-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: MessageContext.WSDL_SERVICE and WSDL_OPERATION

Posted by Lars-Fredrik Smedberg <it...@gmail.com>.
Sorry forgot to mention:

We try accessing the MessageContext.WSDL_OPERATION in a SOAPHandler's
handleMessage method when the MESSAGE_OUTBOUND_PROPERTY property is false
(INBOUND)

Regards
LF

On Thu, Apr 9, 2015 at 11:53 PM, Lars-Fredrik Smedberg <it...@gmail.com>
wrote:

> Hi!
>
> I see in JSR 224 that WSDL_SERVICE and WSDL_OPERATION both are optional.
> All services uses a document/literal/wrapped SOAP binding.
>
> We are using WebSphere Liberty Profile Next Beta in development which uses
> CXF and WebSphere Full Profile in producetion which uses Axis2
>
> In both cases WSDL_SERVICE contains a value. For CXF we always seem to get
> a value for WSDL_OPERATION and for Axis2 we not seem to get a value for
> WSDL_OPERATION
>
> Can anyone explain how WSDL_SERVICE and WSDL_OPERATION are populated when
> using CXF?
>
> Regards
> LF
>
> --
> Med vänlig hälsning / Best regards
>
> Lars-Fredrik Smedberg
>
> STATEMENT OF CONFIDENTIALITY:
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> address(es) and may contain confidential or privileged information. If
> you are not the intended recipient, please notify Lars-Fredrik Smedberg
> immediately at itsmeden@gmail.com, and destroy all copies of this
> message and any attachments.
>



-- 
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at itsmeden@gmail.com, and destroy all copies of this
message and any attachments.