You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Gilbert Kwan <gi...@gmail.com> on 2008/05/30 17:36:57 UTC

what should happen if service and binding.ws require different soap version?

I defined a service requires soap.1_2

<component name="BComponentSOAP12">
  <implementation.java class="....BServiceSOAP12Impl"/>
    <service name="BServiceSOAP12">
      <interface.java interface="....BServiceSOAP12"/>
      <binding.ws requires="soap.1_2"/>
    </service>
</component>

and a reference by ws binding which requires soap.1_1

<component name="AComponent15">
  <implementation.java class="....AServiceImpl"/>
    <reference name="b1" target="BComponentSOAP12/BServiceSOAP12">
      <interface.java interface="..BServiceSOAP12"/>
      <binding.ws requires="soap.1_1"
uri="http://localhost:8080/BComponentSOAP12"/>
    </reference>
</component>

I got no warning, error message, or exception. Is it fine?
What is the proper behaviour of this scenario?

Thanks
Gilbert

Re: what should happen if service and binding.ws require different soap version?

Posted by Simon Laws <si...@googlemail.com>.
On Tue, Jun 3, 2008 at 1:12 PM, Mike Edwards <
mike.edwards.inglenook@gmail.com> wrote:

> Simon Laws wrote:
>
>>
>> Hi Mike
>>
>> Sticking a pin in the specs it does say what you are saying. I was
>> thinking
>> "must support" as opposed to "must use" on the service side. Within an SCA
>> domain in Tuscany I believe that the binding matching code will fail to
>> match soap.1_1 and soap.1_2 intents. Crossing the domain boundary what
>> would
>> be the intended action if a soap 1.1 message arrived at a service that is
>> marked as soap 1.2. A response indicating that the message is not
>> understood?
>>
>> Simon
>>
>>  Simon,
>
> The SOAP 1.2 spec itself deals with what happens on a version mismatch of
> this kind and it describes in detail the error response message that must be
> sent under circumstance where the versions do mismatch in exactly this way.
>
>
> Yours,  Mike.
>
> PS Maybe Axis does not follow the SOAP 1.2 spec....
>

Ah, so it does. Thanks for the pointer!

Simon

Re: what should happen if service and binding.ws require different soap version?

Posted by Mike Edwards <mi...@gmail.com>.
Simon Laws wrote:
> 
> Hi Mike
> 
> Sticking a pin in the specs it does say what you are saying. I was thinking
> "must support" as opposed to "must use" on the service side. Within an SCA
> domain in Tuscany I believe that the binding matching code will fail to
> match soap.1_1 and soap.1_2 intents. Crossing the domain boundary what would
> be the intended action if a soap 1.1 message arrived at a service that is
> marked as soap 1.2. A response indicating that the message is not
> understood?
> 
> Simon
> 
Simon,

The SOAP 1.2 spec itself deals with what happens on a version mismatch of this kind and it describes 
in detail the error response message that must be sent under circumstance where the versions do 
mismatch in exactly this way.


Yours,  Mike.

PS Maybe Axis does not follow the SOAP 1.2 spec....

Re: what should happen if service and binding.ws require different soap version?

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Jun 2, 2008 at 9:41 PM, Mike Edwards <
mike.edwards.inglenook@gmail.com> wrote:

> Simon Laws wrote:
>
>>
>> Should we really be restricting the behavior of the service side SOAP
>> stack?
>> If your intent is to support 1_2 does that mean we outlaw 1_1 if the SOAP
>> stack happens to be able to make sense of it?
>>
>> Simon
>>
>>  Simon,
>
> This all depends on what you think is meant when the intent "SOAP.1_2" is
> applied to either a service or to a reference.
>
> The way it was designed is that it says "This service/reference must use
> SOAP encoding at the 1.2 level of the spec".
>
> It does not mean "Use SOAP.1_2 if you can but SOAP.1_1 will do as well".
>
> So strictly, the current Tuscany implementation is in error.  It will use
> SOAP 1.1 encoding even when it has been told to use 1.2.
>
> Take an example (not a good one for SCA, it must be admitted) where the
> server messes with SOAP Headers only defined in SOAP 1.2.  It would
> naturally mark itself as requiring "SOAP.1_2".  If SOAP 1.1 were used
> instead, those extra headers would not be legal SOAP 1.1.
>
> If you want to require SOAP encoding but you don't care about the level,
> just specify "SOAP" as the intent - this permits any level of SOAP encoding.
>
>
> Yours,  Mike.
>

Hi Mike

Sticking a pin in the specs it does say what you are saying. I was thinking
"must support" as opposed to "must use" on the service side. Within an SCA
domain in Tuscany I believe that the binding matching code will fail to
match soap.1_1 and soap.1_2 intents. Crossing the domain boundary what would
be the intended action if a soap 1.1 message arrived at a service that is
marked as soap 1.2. A response indicating that the message is not
understood?

Simon

Re: what should happen if service and binding.ws require different soap version?

Posted by Mike Edwards <mi...@gmail.com>.
Simon Laws wrote:
> 
> Should we really be restricting the behavior of the service side SOAP stack?
> If your intent is to support 1_2 does that mean we outlaw 1_1 if the SOAP
> stack happens to be able to make sense of it?
> 
> Simon
> 
Simon,

This all depends on what you think is meant when the intent "SOAP.1_2" is applied to either a 
service or to a reference.

The way it was designed is that it says "This service/reference must use SOAP encoding at the 1.2 
level of the spec".

It does not mean "Use SOAP.1_2 if you can but SOAP.1_1 will do as well".

So strictly, the current Tuscany implementation is in error.  It will use SOAP 1.1 encoding even 
when it has been told to use 1.2.

Take an example (not a good one for SCA, it must be admitted) where the server messes with SOAP 
Headers only defined in SOAP 1.2.  It would naturally mark itself as requiring "SOAP.1_2".  If SOAP 
1.1 were used instead, those extra headers would not be legal SOAP 1.1.

If you want to require SOAP encoding but you don't care about the level, just specify "SOAP" as the 
intent - this permits any level of SOAP encoding.


Yours,  Mike.

Re: what should happen if service and binding.ws require different soap version?

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Jun 2, 2008 at 7:40 PM, Gilbert Kwan <gi...@gmail.com> wrote:

> Currently, Tuscany does not generate any error for both cases (marked
> as "Error").
> I will open a Jira to log this down as Mike suggested
>
> Gilbert
>
>
>
> On Mon, Jun 2, 2008 at 1:09 PM, ant elder <an...@gmail.com> wrote:
> > I think right now our binding.ws services (or Axis2 services) will work
> with
> > either SOAP 1.1 or 1.2, and the response from the service will use the
> same
> > soap version as the request. Thats the default Axis2 behaviour, not sure
> if
> > its possible to change to restrict that. So right now the Tuscany code
> only
> > uses the soap intent for references. So those two marked as "Error" below
> > will actually just work with the current Tuscany code.
> >
> >   ...ant
> >
> > On Mon, Jun 2, 2008 at 5:01 PM, Gilbert Kwan <gi...@gmail.com>
> wrote:
> >
> >> The following table shows all combinations:
> >>
> >> Service Require vs Reference Require:
> >> ============================
> >> None vs None:  OK
> >> None vs soap: OK
> >> None vs soap.1_1: OK
> >> None vs soap.1_2: OK
> >> soap vs None: OK
> >> soap vs soap: OK
> >> soap vs soap.1_1: OK
> >> soap vs soap.1_2: OK
> >> soap.1_1 vs None: OK
> >> soap.1_1 vs soap: OK
> >> soap.1_1 vs soap.1_1: OK
> >> soap.1_1 vs soap.1_2: Error
> >> soap.1_2 vs None: OK
> >> soap.1_2 vs soap: OK
> >> soap.1_2 vs soap.1_1: Error
> >> soap.1_2 vs soap.1_2: OK
> >>
> >> I guess there are only 2 scenarios should generate error. Right?
> >>
> >> Thanks
> >> Gilbert
> >>
> >>
> >>
> >>
> >> On Mon, Jun 2, 2008 at 6:17 AM, Mike Edwards
> >> <mi...@gmail.com> wrote:
> >> > Gilbert Kwan wrote:
> >> >>
> >> >> I defined a service requires soap.1_2
> >> >>
> >> >> <component name="BComponentSOAP12">
> >> >>  <implementation.java class="....BServiceSOAP12Impl"/>
> >> >>    <service name="BServiceSOAP12">
> >> >>      <interface.java interface="....BServiceSOAP12"/>
> >> >>      <binding.ws requires="soap.1_2"/>
> >> >>    </service>
> >> >> </component>
> >> >>
> >> >> and a reference by ws binding which requires soap.1_1
> >> >>
> >> >> <component name="AComponent15">
> >> >>  <implementation.java class="....AServiceImpl"/>
> >> >>    <reference name="b1" target="BComponentSOAP12/BServiceSOAP12">
> >> >>      <interface.java interface="..BServiceSOAP12"/>
> >> >>      <binding.ws requires="soap.1_1"
> >> >> uri="http://localhost:8080/BComponentSOAP12"/>
> >> >>    </reference>
> >> >> </component>
> >> >>
> >> >> I got no warning, error message, or exception. Is it fine?
> >> >> What is the proper behaviour of this scenario?
> >> >>
> >> >> Thanks
> >> >> Gilbert
> >> >>
> >> > Gilbert,
> >> >
> >> > That looks like an error to me.  Both sides need to be using the same
> >> SOAP
> >> > level.
> >> >
> >> > Looks like a failure of the policy matching between the two ends - I
> >> suggest
> >> > raising a JIRA for this one.
> >> >
> >> >
> >> > Yours, Mike.
> >> >
> >>
> >
>

Should we really be restricting the behavior of the service side SOAP stack?
If your intent is to support 1_2 does that mean we outlaw 1_1 if the SOAP
stack happens to be able to make sense of it?

Simon

Re: what should happen if service and binding.ws require different soap version?

Posted by Gilbert Kwan <gi...@gmail.com>.
Currently, Tuscany does not generate any error for both cases (marked
as "Error").
I will open a Jira to log this down as Mike suggested

Gilbert



On Mon, Jun 2, 2008 at 1:09 PM, ant elder <an...@gmail.com> wrote:
> I think right now our binding.ws services (or Axis2 services) will work with
> either SOAP 1.1 or 1.2, and the response from the service will use the same
> soap version as the request. Thats the default Axis2 behaviour, not sure if
> its possible to change to restrict that. So right now the Tuscany code only
> uses the soap intent for references. So those two marked as "Error" below
> will actually just work with the current Tuscany code.
>
>   ...ant
>
> On Mon, Jun 2, 2008 at 5:01 PM, Gilbert Kwan <gi...@gmail.com> wrote:
>
>> The following table shows all combinations:
>>
>> Service Require vs Reference Require:
>> ============================
>> None vs None:  OK
>> None vs soap: OK
>> None vs soap.1_1: OK
>> None vs soap.1_2: OK
>> soap vs None: OK
>> soap vs soap: OK
>> soap vs soap.1_1: OK
>> soap vs soap.1_2: OK
>> soap.1_1 vs None: OK
>> soap.1_1 vs soap: OK
>> soap.1_1 vs soap.1_1: OK
>> soap.1_1 vs soap.1_2: Error
>> soap.1_2 vs None: OK
>> soap.1_2 vs soap: OK
>> soap.1_2 vs soap.1_1: Error
>> soap.1_2 vs soap.1_2: OK
>>
>> I guess there are only 2 scenarios should generate error. Right?
>>
>> Thanks
>> Gilbert
>>
>>
>>
>>
>> On Mon, Jun 2, 2008 at 6:17 AM, Mike Edwards
>> <mi...@gmail.com> wrote:
>> > Gilbert Kwan wrote:
>> >>
>> >> I defined a service requires soap.1_2
>> >>
>> >> <component name="BComponentSOAP12">
>> >>  <implementation.java class="....BServiceSOAP12Impl"/>
>> >>    <service name="BServiceSOAP12">
>> >>      <interface.java interface="....BServiceSOAP12"/>
>> >>      <binding.ws requires="soap.1_2"/>
>> >>    </service>
>> >> </component>
>> >>
>> >> and a reference by ws binding which requires soap.1_1
>> >>
>> >> <component name="AComponent15">
>> >>  <implementation.java class="....AServiceImpl"/>
>> >>    <reference name="b1" target="BComponentSOAP12/BServiceSOAP12">
>> >>      <interface.java interface="..BServiceSOAP12"/>
>> >>      <binding.ws requires="soap.1_1"
>> >> uri="http://localhost:8080/BComponentSOAP12"/>
>> >>    </reference>
>> >> </component>
>> >>
>> >> I got no warning, error message, or exception. Is it fine?
>> >> What is the proper behaviour of this scenario?
>> >>
>> >> Thanks
>> >> Gilbert
>> >>
>> > Gilbert,
>> >
>> > That looks like an error to me.  Both sides need to be using the same
>> SOAP
>> > level.
>> >
>> > Looks like a failure of the policy matching between the two ends - I
>> suggest
>> > raising a JIRA for this one.
>> >
>> >
>> > Yours, Mike.
>> >
>>
>

Re: what should happen if service and binding.ws require different soap version?

Posted by ant elder <an...@gmail.com>.
I think right now our binding.ws services (or Axis2 services) will work with
either SOAP 1.1 or 1.2, and the response from the service will use the same
soap version as the request. Thats the default Axis2 behaviour, not sure if
its possible to change to restrict that. So right now the Tuscany code only
uses the soap intent for references. So those two marked as "Error" below
will actually just work with the current Tuscany code.

   ...ant

On Mon, Jun 2, 2008 at 5:01 PM, Gilbert Kwan <gi...@gmail.com> wrote:

> The following table shows all combinations:
>
> Service Require vs Reference Require:
> ============================
> None vs None:  OK
> None vs soap: OK
> None vs soap.1_1: OK
> None vs soap.1_2: OK
> soap vs None: OK
> soap vs soap: OK
> soap vs soap.1_1: OK
> soap vs soap.1_2: OK
> soap.1_1 vs None: OK
> soap.1_1 vs soap: OK
> soap.1_1 vs soap.1_1: OK
> soap.1_1 vs soap.1_2: Error
> soap.1_2 vs None: OK
> soap.1_2 vs soap: OK
> soap.1_2 vs soap.1_1: Error
> soap.1_2 vs soap.1_2: OK
>
> I guess there are only 2 scenarios should generate error. Right?
>
> Thanks
> Gilbert
>
>
>
>
> On Mon, Jun 2, 2008 at 6:17 AM, Mike Edwards
> <mi...@gmail.com> wrote:
> > Gilbert Kwan wrote:
> >>
> >> I defined a service requires soap.1_2
> >>
> >> <component name="BComponentSOAP12">
> >>  <implementation.java class="....BServiceSOAP12Impl"/>
> >>    <service name="BServiceSOAP12">
> >>      <interface.java interface="....BServiceSOAP12"/>
> >>      <binding.ws requires="soap.1_2"/>
> >>    </service>
> >> </component>
> >>
> >> and a reference by ws binding which requires soap.1_1
> >>
> >> <component name="AComponent15">
> >>  <implementation.java class="....AServiceImpl"/>
> >>    <reference name="b1" target="BComponentSOAP12/BServiceSOAP12">
> >>      <interface.java interface="..BServiceSOAP12"/>
> >>      <binding.ws requires="soap.1_1"
> >> uri="http://localhost:8080/BComponentSOAP12"/>
> >>    </reference>
> >> </component>
> >>
> >> I got no warning, error message, or exception. Is it fine?
> >> What is the proper behaviour of this scenario?
> >>
> >> Thanks
> >> Gilbert
> >>
> > Gilbert,
> >
> > That looks like an error to me.  Both sides need to be using the same
> SOAP
> > level.
> >
> > Looks like a failure of the policy matching between the two ends - I
> suggest
> > raising a JIRA for this one.
> >
> >
> > Yours, Mike.
> >
>

Re: what should happen if service and binding.ws require different soap version?

Posted by Gilbert Kwan <gi...@gmail.com>.
The following table shows all combinations:

Service Require vs Reference Require:
============================
None vs None:  OK
None vs soap: OK
None vs soap.1_1: OK
None vs soap.1_2: OK
soap vs None: OK
soap vs soap: OK
soap vs soap.1_1: OK
soap vs soap.1_2: OK
soap.1_1 vs None: OK
soap.1_1 vs soap: OK
soap.1_1 vs soap.1_1: OK
soap.1_1 vs soap.1_2: Error
soap.1_2 vs None: OK
soap.1_2 vs soap: OK
soap.1_2 vs soap.1_1: Error
soap.1_2 vs soap.1_2: OK

I guess there are only 2 scenarios should generate error. Right?

Thanks
Gilbert




On Mon, Jun 2, 2008 at 6:17 AM, Mike Edwards
<mi...@gmail.com> wrote:
> Gilbert Kwan wrote:
>>
>> I defined a service requires soap.1_2
>>
>> <component name="BComponentSOAP12">
>>  <implementation.java class="....BServiceSOAP12Impl"/>
>>    <service name="BServiceSOAP12">
>>      <interface.java interface="....BServiceSOAP12"/>
>>      <binding.ws requires="soap.1_2"/>
>>    </service>
>> </component>
>>
>> and a reference by ws binding which requires soap.1_1
>>
>> <component name="AComponent15">
>>  <implementation.java class="....AServiceImpl"/>
>>    <reference name="b1" target="BComponentSOAP12/BServiceSOAP12">
>>      <interface.java interface="..BServiceSOAP12"/>
>>      <binding.ws requires="soap.1_1"
>> uri="http://localhost:8080/BComponentSOAP12"/>
>>    </reference>
>> </component>
>>
>> I got no warning, error message, or exception. Is it fine?
>> What is the proper behaviour of this scenario?
>>
>> Thanks
>> Gilbert
>>
> Gilbert,
>
> That looks like an error to me.  Both sides need to be using the same SOAP
> level.
>
> Looks like a failure of the policy matching between the two ends - I suggest
> raising a JIRA for this one.
>
>
> Yours, Mike.
>

Re: what should happen if service and binding.ws require different soap version?

Posted by Mike Edwards <mi...@gmail.com>.
Gilbert Kwan wrote:
> I defined a service requires soap.1_2
> 
> <component name="BComponentSOAP12">
>   <implementation.java class="....BServiceSOAP12Impl"/>
>     <service name="BServiceSOAP12">
>       <interface.java interface="....BServiceSOAP12"/>
>       <binding.ws requires="soap.1_2"/>
>     </service>
> </component>
> 
> and a reference by ws binding which requires soap.1_1
> 
> <component name="AComponent15">
>   <implementation.java class="....AServiceImpl"/>
>     <reference name="b1" target="BComponentSOAP12/BServiceSOAP12">
>       <interface.java interface="..BServiceSOAP12"/>
>       <binding.ws requires="soap.1_1"
> uri="http://localhost:8080/BComponentSOAP12"/>
>     </reference>
> </component>
> 
> I got no warning, error message, or exception. Is it fine?
> What is the proper behaviour of this scenario?
> 
> Thanks
> Gilbert
> 
Gilbert,

That looks like an error to me.  Both sides need to be using the same SOAP level.

Looks like a failure of the policy matching between the two ends - I suggest raising a JIRA for this 
one.


Yours, Mike.