You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Rashmi Hunt <ra...@gmail.com> on 2011/11/11 01:03:18 UTC

WebServiceBindingProcessor validation rules & SOAP over JMS

I like to understand in oasis, why user can not specify both wsdlElement
and uri for binding.ws?

For e.g to support SOAP over JMS, the reference binding could be defined as

 <reference name="accountServiceTopic">
            <interface.wsdl interface="
http://www.mybank.com/account#wsdl.interface(AccountServiceTopic)"/>
             <binding.ws  wsdlElement="
http://www.mybank.com/account#wsdl.port(AccountServiceTopic/AccountServiceTopic
)"
  uri="jms:jndi:jms/MyBankTopic_Request?jndiConnectionFactoryName=jms/MyBankTopic_CF&amp;targetService=AccountServiceTopic/AccountServiceTopic"/>
      </reference>

This reference fails in WebServiceBindingProcessor class since the code
checks for validation
rule BWS20019 from WebService Binding spec. The exception is
"[BWS20019] with binding.ws you can only specify one of url,
wsa:EndpointReference, #wsdl.service or #wsdl.port.
The following were found [uri, #wsdl.port]"

at line

 error(monitor, "MultipleEndpointsSpecified", reader,
endpointSpecifications.toString() );

I looked through WS Binding spec, specifically section 2.2 and there is no
mention of
SOAP over JMS uri and wsdlElement.

Industry standard JMS uri for SOAP over JMS follows this pattern
jms:jndi:<destination-jndi-name>?<property>=<value>&<property>=<value>&...

I tried removing wsdlElement attribute in above example and with just "uri"
defined, to avoid BWS20019 validation error,
I hit different validation exception in Tuscany, which is ASM60033

[ASM60033] No targets for reference: Composite = {
http://docs.oasis-open.org/ns/opencsa/sca/200912} Reference = accountService

Any pointers?

Regards
Rashmi

Re: WebServiceBindingProcessor validation rules & SOAP over JMS

Posted by Rashmi Hunt <ra...@gmail.com>.
Thanks for the pointers.

1) Using either wsdlElement/wsdl#wsdl.port or URI should pass this spec
validation. If
wsdlElement/wsdl#wsdl.port is used soap/jms endpoint uri can be defined in
wsdl port
address location.
2) I will try wsdlElement/wsdl.binding and uri instead of
wsdlElement/wsdl.port
and uri as you suggested.
3) For the Assembly validation issue, ASM60033,  I took a second look at
the service impl
and composite file. ServiceImpl class had additional reference which was
missing in
composite. That fixed this validation issue.

Regards
Rashmi

On Mon, Nov 14, 2011 at 4:50 AM, Simon Nash <na...@apache.org> wrote:

>  Simon Laws wrote:
>
>> Hi Rashmi
>>
>> comments  in-line...
>>
>> On Fri, Nov 11, 2011 at 12:03 AM, Rashmi Hunt <ra...@gmail.com>
>> wrote:
>>
>>> I like to understand in oasis, why user can not specify both wsdlElement
>>> and uri for binding.ws?
>>>
>>> For e.g to support SOAP over JMS, the reference binding could be defined
>>> as
>>>
>>>  <reference name="accountServiceTopic">
>>>            <interface.wsdl
>>> interface="http://www.mybank.**com/account#wsdl.interface(**
>>> AccountServiceTopic)<http://www.mybank.com/account#wsdl.interface(AccountServiceTopic)>
>>> "/>
>>>             <binding.ws
>>> wsdlElement="http://www.**mybank.com/account#wsdl.port(**
>>> AccountServiceTopic/**AccountServiceTopic)<http://www.mybank.com/account#wsdl.port(AccountServiceTopic/AccountServiceTopic)>
>>> "
>>>  uri="jms:jndi:jms/MyBankTopic_**Request?**
>>> jndiConnectionFactoryName=jms/**MyBankTopic_CF&amp;**targetService=**
>>> AccountServiceTopic/**AccountServiceTopic"/>
>>>      </reference>
>>>
>>> This reference fails in WebServiceBindingProcessor class since the code
>>> checks for validation
>>> rule BWS20019 from WebService Binding spec. The exception is
>>>
>>> "[BWS20019] with binding.ws you can only specify one of url,
>>> wsa:EndpointReference, #wsdl.service or #wsdl.port.
>>> The following were found [uri, #wsdl.port]"
>>>
>>> at line
>>>
>>>  error(monitor, "MultipleEndpointsSpecified", reader,
>>> endpointSpecifications.**toString() );
>>>
>>
>> As you say. This is an explicit rule in the spec.
>>
>> I looked through WS Binding spec, specifically section 2.2 and there is no
>>> mention of
>>> SOAP over JMS uri and wsdlElement.
>>>
>>> Industry standard JMS uri for SOAP over JMS follows this pattern
>>> jms:jndi:<destination-jndi-**name>?<property>=<value>&<**
>>> property>=<value>&...
>>>
>>> I tried removing wsdlElement attribute in above example and with just
>>> "uri"
>>> defined, to avoid BWS20019 validation error,
>>> I hit different validation exception in Tuscany, which is ASM60033
>>>
>>> [ASM60033] No targets for reference: Composite =
>>> {http://docs.oasis-open.org/**ns/opencsa/sca/200912<http://docs.oasis-open.org/ns/opencsa/sca/200912>}
>>> Reference =
>>> accountService
>>>
>>> Any pointers?
>>>
>>
>> There seems to be something odd about the rest case as this is
>> reporting and error on reference "accountService" while the above SCDl
>> only includes configuration for reference "accountServiceTopic"
>>
>>> Regards
>>> Rashmi
>>>
>>
>> Simon
>>
>> Hi Rashmi,
> Can you use wsdlElement/wsdl.binding and uri instead of
> wsdlElement/wsdl.port
> and uri?  Is there some information in your wsdl.port that can't be
> provided
> within the uri?
>
>  Simon
>
>

Re: WebServiceBindingProcessor validation rules & SOAP over JMS

Posted by Simon Nash <na...@apache.org>.
Simon Laws wrote:
> Hi Rashmi
> 
> comments  in-line...
> 
> On Fri, Nov 11, 2011 at 12:03 AM, Rashmi Hunt <ra...@gmail.com> wrote:
>> I like to understand in oasis, why user can not specify both wsdlElement
>> and uri for binding.ws?
>>
>> For e.g to support SOAP over JMS, the reference binding could be defined as
>>
>>  <reference name="accountServiceTopic">
>>             <interface.wsdl
>> interface="http://www.mybank.com/account#wsdl.interface(AccountServiceTopic)"/>
>>              <binding.ws
>> wsdlElement="http://www.mybank.com/account#wsdl.port(AccountServiceTopic/AccountServiceTopic)"
>>   uri="jms:jndi:jms/MyBankTopic_Request?jndiConnectionFactoryName=jms/MyBankTopic_CF&amp;targetService=AccountServiceTopic/AccountServiceTopic"/>
>>       </reference>
>>
>> This reference fails in WebServiceBindingProcessor class since the code
>> checks for validation
>> rule BWS20019 from WebService Binding spec. The exception is
>>
>> "[BWS20019] with binding.ws you can only specify one of url,
>> wsa:EndpointReference, #wsdl.service or #wsdl.port.
>> The following were found [uri, #wsdl.port]"
>>
>> at line
>>
>>  error(monitor, "MultipleEndpointsSpecified", reader,
>> endpointSpecifications.toString() );
> 
> As you say. This is an explicit rule in the spec.
> 
>> I looked through WS Binding spec, specifically section 2.2 and there is no
>> mention of
>> SOAP over JMS uri and wsdlElement.
>>
>> Industry standard JMS uri for SOAP over JMS follows this pattern
>> jms:jndi:<destination-jndi-name>?<property>=<value>&<property>=<value>&...
>>
>> I tried removing wsdlElement attribute in above example and with just "uri"
>> defined, to avoid BWS20019 validation error,
>> I hit different validation exception in Tuscany, which is ASM60033
>>
>> [ASM60033] No targets for reference: Composite =
>> {http://docs.oasis-open.org/ns/opencsa/sca/200912} Reference =
>> accountService
>>
>> Any pointers?
> 
> There seems to be something odd about the rest case as this is
> reporting and error on reference "accountService" while the above SCDl
> only includes configuration for reference "accountServiceTopic"
>> Regards
>> Rashmi
> 
> Simon
>
Hi Rashmi,
Can you use wsdlElement/wsdl.binding and uri instead of wsdlElement/wsdl.port
and uri?  Is there some information in your wsdl.port that can't be provided
within the uri?

   Simon


Re: WebServiceBindingProcessor validation rules & SOAP over JMS

Posted by Simon Laws <si...@googlemail.com>.
Hi Rashmi

comments  in-line...

On Fri, Nov 11, 2011 at 12:03 AM, Rashmi Hunt <ra...@gmail.com> wrote:
> I like to understand in oasis, why user can not specify both wsdlElement
> and uri for binding.ws?
>
> For e.g to support SOAP over JMS, the reference binding could be defined as
>
>  <reference name="accountServiceTopic">
>             <interface.wsdl
> interface="http://www.mybank.com/account#wsdl.interface(AccountServiceTopic)"/>
>              <binding.ws
> wsdlElement="http://www.mybank.com/account#wsdl.port(AccountServiceTopic/AccountServiceTopic)"
>   uri="jms:jndi:jms/MyBankTopic_Request?jndiConnectionFactoryName=jms/MyBankTopic_CF&amp;targetService=AccountServiceTopic/AccountServiceTopic"/>
>       </reference>
>
> This reference fails in WebServiceBindingProcessor class since the code
> checks for validation
> rule BWS20019 from WebService Binding spec. The exception is
>
> "[BWS20019] with binding.ws you can only specify one of url,
> wsa:EndpointReference, #wsdl.service or #wsdl.port.
> The following were found [uri, #wsdl.port]"
>
> at line
>
>  error(monitor, "MultipleEndpointsSpecified", reader,
> endpointSpecifications.toString() );

As you say. This is an explicit rule in the spec.

>
> I looked through WS Binding spec, specifically section 2.2 and there is no
> mention of
> SOAP over JMS uri and wsdlElement.
>
> Industry standard JMS uri for SOAP over JMS follows this pattern
> jms:jndi:<destination-jndi-name>?<property>=<value>&<property>=<value>&...
>
> I tried removing wsdlElement attribute in above example and with just "uri"
> defined, to avoid BWS20019 validation error,
> I hit different validation exception in Tuscany, which is ASM60033
>
> [ASM60033] No targets for reference: Composite =
> {http://docs.oasis-open.org/ns/opencsa/sca/200912} Reference =
> accountService
>
> Any pointers?

There seems to be something odd about the rest case as this is
reporting and error on reference "accountService" while the above SCDl
only includes configuration for reference "accountServiceTopic"
>
> Regards
> Rashmi

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com