You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Dan Becker <da...@gmail.com> on 2009/01/13 21:25:54 UTC
WSDL Binding validation scenario
I'm looking into Jira TUSCANY-2754
(https://issues.apache.org/jira/browse/TUSCANY-2754), and I seem to be
drawing a blank on a good user scenario to recreate the problem.
(Perhaps not enough coffee today.)
The reporter is stating that any errors in a composite binding.ws
wsdlElement value (either namespace, service, port, or binding name)
should be validated and flagged if misspelled.
I see Tuscany has a binding-ws-wsdlgen test case which will generate
WSDL from a Java interface, and I also see Tuscany has binding-ws-xml
read and write test cases to read to and from a composite XML with
embedded binding.ws elements. However neither of these demonstrate
validating a composite wited to a known WSDL service or reference. Can
someone point me to one of the Tuscany samples or test cases that show
validating the composite binding.ws elements?
--
Thanks, Dan Becker
Re: WSDL Binding validation scenario
Posted by Dan Becker <da...@gmail.com>.
Excellent! Just what I was looking for. Thanks.
Raymond Feng wrote:
> There is a validation framework that reports issue through the Monitor.
> See the org.apache.tuscany.sca.assembly.builder.impl.BaseBuilderImpl in
> assembly module. For example,
>
> protected void warning(Monitor monitor, String message, Object model,
> String... messageParameters) {
> if (monitor != null) {
> Problem problem =
> monitor.createProblem(this.getClass().getName(),
> "assembly-validation-messages", Severity.WARNING, model, message,
> (Object[])messageParameters);
> monitor.problem(problem);
> }
> }
>
> Thanks,
> Raymond
> --------------------------------------------------
> From: "Dan Becker" <da...@gmail.com>
> Sent: Tuesday, January 13, 2009 2:11 PM
> To: <de...@tuscany.apache.org>
> Subject: Re: WSDL Binding validation scenario
>
>> Raymond Feng wrote:
>>> binding.ws allows the configuration of @wsdlElement to point to the
>>> above models in the WSDL using QNames. I think the JIRA complains
>>> that if the QName cannot be resolved a model defintion in the WSDL,
>>> we should have meaningful messages to report that. For example, if we
>>> have:
>>>
>>> <binding.ws wsdlElement="http://ns1#wsdl.port(service1/port1)"/>
>>>
>>> If there is no WSDL defines a port "port1" under a service "service1"
>>> with "http://ns1" namespace, we should report the problem instead of
>>> NPE.
>>
>>
>> Agreed. Do any of the components or their test cases demonstrate
>> validation of a wsdlElement? I see various method calls for reading or
>> writing a composite to/from XML, do you recall any methods for
>> validating? (I guess my question is, does the existing code have a
>> validation framework, and perhaps this wsdlElement validation is
>> missing from the framework, or does a validation framework currently
>> not exist?)
>> --
>> Thanks, Dan Becker
>
>
--
Thanks, Dan Becker
Re: WSDL Binding validation scenario
Posted by Raymond Feng <en...@gmail.com>.
Hi,
There is a validation framework that reports issue through the Monitor. See
the org.apache.tuscany.sca.assembly.builder.impl.BaseBuilderImpl in assembly
module. For example,
protected void warning(Monitor monitor, String message, Object model,
String... messageParameters) {
if (monitor != null) {
Problem problem =
monitor.createProblem(this.getClass().getName(),
"assembly-validation-messages", Severity.WARNING, model, message,
(Object[])messageParameters);
monitor.problem(problem);
}
}
Thanks,
Raymond
--------------------------------------------------
From: "Dan Becker" <da...@gmail.com>
Sent: Tuesday, January 13, 2009 2:11 PM
To: <de...@tuscany.apache.org>
Subject: Re: WSDL Binding validation scenario
> Raymond Feng wrote:
>> binding.ws allows the configuration of @wsdlElement to point to the above
>> models in the WSDL using QNames. I think the JIRA complains that if the
>> QName cannot be resolved a model defintion in the WSDL, we should have
>> meaningful messages to report that. For example, if we have:
>>
>> <binding.ws wsdlElement="http://ns1#wsdl.port(service1/port1)"/>
>>
>> If there is no WSDL defines a port "port1" under a service "service1"
>> with "http://ns1" namespace, we should report the problem instead of NPE.
>
>
> Agreed. Do any of the components or their test cases demonstrate
> validation of a wsdlElement? I see various method calls for reading or
> writing a composite to/from XML, do you recall any methods for validating?
> (I guess my question is, does the existing code have a validation
> framework, and perhaps this wsdlElement validation is missing from the
> framework, or does a validation framework currently not exist?)
> --
> Thanks, Dan Becker
Re: WSDL Binding validation scenario
Posted by Dan Becker <da...@gmail.com>.
Raymond Feng wrote:
> binding.ws allows the configuration of @wsdlElement to point to the
> above models in the WSDL using QNames. I think the JIRA complains that
> if the QName cannot be resolved a model defintion in the WSDL, we should
> have meaningful messages to report that. For example, if we have:
>
> <binding.ws wsdlElement="http://ns1#wsdl.port(service1/port1)"/>
>
> If there is no WSDL defines a port "port1" under a service "service1"
> with "http://ns1" namespace, we should report the problem instead of NPE.
Agreed. Do any of the components or their test cases demonstrate
validation of a wsdlElement? I see various method calls for reading or
writing a composite to/from XML, do you recall any methods for
validating? (I guess my question is, does the existing code have a
validation framework, and perhaps this wsdlElement validation is missing
from the framework, or does a validation framework currently not exist?)
--
Thanks, Dan Becker
Re: WSDL Binding validation scenario
Posted by Raymond Feng <en...@gmail.com>.
In WSDL 1.1, there are a few concepts in the model:
1) portType: defines the interface/operation
2) binding: defines the communication protocol and message format
3) service/port: defines the endpoint (address, binding) where the service
is published
binding.ws allows the configuration of @wsdlElement to point to the above
models in the WSDL using QNames. I think the JIRA complains that if the
QName cannot be resolved a model defintion in the WSDL, we should have
meaningful messages to report that. For example, if we have:
<binding.ws wsdlElement="http://ns1#wsdl.port(service1/port1)"/>
If there is no WSDL defines a port "port1" under a service "service1" with
"http://ns1" namespace, we should report the problem instead of NPE.
Thanks,
Raymond
--------------------------------------------------
From: "Dan Becker" <da...@gmail.com>
Sent: Tuesday, January 13, 2009 12:25 PM
To: <de...@tuscany.apache.org>
Subject: WSDL Binding validation scenario
> I'm looking into Jira TUSCANY-2754
> (https://issues.apache.org/jira/browse/TUSCANY-2754), and I seem to be
> drawing a blank on a good user scenario to recreate the problem. (Perhaps
> not enough coffee today.)
>
> The reporter is stating that any errors in a composite binding.ws
> wsdlElement value (either namespace, service, port, or binding name)
> should be validated and flagged if misspelled.
>
> I see Tuscany has a binding-ws-wsdlgen test case which will generate WSDL
> from a Java interface, and I also see Tuscany has binding-ws-xml read and
> write test cases to read to and from a composite XML with embedded
> binding.ws elements. However neither of these demonstrate validating a
> composite wited to a known WSDL service or reference. Can someone point me
> to one of the Tuscany samples or test cases that show validating the
> composite binding.ws elements?
>
> --
> Thanks, Dan Becker