You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2008/05/26 21:00:29 UTC

Invalid WSDLs

Watchers of checkins can see that I'm inventing a WSDL validation maven plugin.

First catch:

INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
from baseURI: jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common-schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/schemas/wsdl/http.xsd,
namespace: http://schemas.xmlsoap.org/wsdl/
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Non unique body parts, operation [ greetMe ] and  operation [
testTriPart ] have the same body block
{http://apache.org/hello_world_xml_http/bare/types}requestType

Re: Invalid WSDLs

Posted by Benson Margulies <bi...@gmail.com>.
One more note here, please have a look at:

http://wiki.eclipse.org/index.php/Using_the_WSDL_Validator_Outside_of_Eclipse

The eclipse validator finds errors that our validator does not. And
ignores things, like the issue under discussion here, that ours
complains of.

On Mon, May 26, 2008 at 4:42 PM, Benson Margulies <bi...@gmail.com> wrote:
> However, now we get the question of what me mean by 'validate' in our tool.
>
> Our validator rejects the wsdl we call hello_world_xml_bare.wsdl with
> the below error, because one operation has a single input part of
> element type 'x', and another operation has three inputs parts, the
> first of which is also 'x'.
>
> Is this, in fact, unacceptable? Should I change the wsdl to make the
> elements distinct? Or is the validator wrong?
>
> On Mon, May 26, 2008 at 4:39 PM, Benson Margulies <bi...@gmail.com> wrote:
>> What I'm doing is reflecting the existing command line into maven.
>>
>> On Mon, May 26, 2008 at 3:54 PM, Glen Mazza <gl...@verizon.net> wrote:
>>> I believe we have something like this already on the command-line
>>> (-validate option[1]).  Perhaps it would be better to build on this, so
>>> command-line/Maven/Ant users can use it as well.
>>>
>>> Glen
>>>
>>> [1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>>>
>>> 2008-05-26 Benson Margulies wrote:
>>>> Watchers of checkins can see that I'm inventing a WSDL validation maven plugin.
>>>>
>>>> First catch:
>>>>
>>>> INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
>>>> from baseURI: jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common-schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/schemas/wsdl/http.xsd,
>>>> namespace: http://schemas.xmlsoap.org/wsdl/
>>>> [INFO] ------------------------------------------------------------------------
>>>> [ERROR] BUILD ERROR
>>>> [INFO] ------------------------------------------------------------------------
>>>> [INFO] Non unique body parts, operation [ greetMe ] and  operation [
>>>> testTriPart ] have the same body block
>>>> {http://apache.org/hello_world_xml_http/bare/types}requestType
>>>
>>>
>>
>

Re: Invalid WSDLs

Posted by Benson Margulies <bi...@gmail.com>.
My goal here is to catch inadvertently busted WSDL files when we check them
in. So, using our validator, I'd at least have to exclude some cases that
are supposed to fail.



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

>
> On May 26, 2008, at 5:32 PM, Benson Margulies wrote:
>
>  Yes. I'm also very curious as to whether Dan can shed light as to the
>> intention: should the CXF wsdl validator *only* worry about CXF-specific
>> issues, leaving general validation to generic tools, or does it ambit to
>> cover all of the ground?
>>
>
> This is kind of a loaded question.   I guess the answer is that it should
> catch and wsdl issues that CXF users care about.   Seriously, it currently
> tackles validation for many of the "common" issues that users have hit.
> That includes issues hit by some of IONA's customers since they are CXF
> "users" as well.   There are a bunch of checks for WSI-BP compliance as well
> since CXF SHOULD be generating (and consuming) WSI-BP compliant wsdl
> whenever possible.
>
> I'd be careful about changing too many wsdl's.   Many wsdl's in the CXF
> tree are actually there to test some of these "bad" cases.   For example,
> the hello_world_xml_bare.wsdl issue you mentioned....    That definitely is
> an issue in many cases.   Currently, if the first parts match, CXF cannot
> dispatch it correctly.   However, if the soap-actions are unique, it CAN.
> There is also a bug logged about it:
> https://issues.apache.org/jira/browse/CXF-1073
> There may be tests related to it.   I'm not really sure.
>
>
> Dan
>
>
>
>
>
>>
>> On Mon, May 26, 2008 at 5:14 PM, Glen Mazza <gl...@verizon.net>
>> wrote:
>>
>>> For specific validity questions, you might want to run against Metro and
>>> see what it says.  Although not perfectly reliable, similiar error
>>> messages (or lack thereof) to CXF's might help determine what is not
>>> allowed with WSDL in general compared to what just CXF doesn't like.
>>>
>>> Glen
>>>
>>>
>>> 2008-05-26 Benson Margulies wrote:
>>>
>>>> However, now we get the question of what me mean by 'validate' in our
>>>>
>>> tool.
>>
>>>
>>>> Our validator rejects the wsdl we call hello_world_xml_bare.wsdl with
>>>> the below error, because one operation has a single input part of
>>>> element type 'x', and another operation has three inputs parts, the
>>>> first of which is also 'x'.
>>>>
>>>> Is this, in fact, unacceptable? Should I change the wsdl to make the
>>>> elements distinct? Or is the validator wrong?
>>>>
>>>> On Mon, May 26, 2008 at 4:39 PM, Benson Margulies <
>>>> bimargulies@gmail.com>
>>>>
>>> wrote:
>>
>>> What I'm doing is reflecting the existing command line into maven.
>>>>>
>>>>> On Mon, May 26, 2008 at 3:54 PM, Glen Mazza <gl...@verizon.net>
>>>>>
>>>> wrote:
>>
>>> I believe we have something like this already on the command-line
>>>>>> (-validate option[1]).  Perhaps it would be better to build on this,
>>>>>>
>>>>> so
>>
>>> command-line/Maven/Ant users can use it as well.
>>>>>>
>>>>>> Glen
>>>>>>
>>>>>> [1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>>>>>>
>>>>>> 2008-05-26 Benson Margulies wrote:
>>>>>>
>>>>>>> Watchers of checkins can see that I'm inventing a WSDL validation
>>>>>>>
>>>>>> maven plugin.
>>
>>>
>>>>>>> First catch:
>>>>>>>
>>>>>>> INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
>>>>>>> from baseURI:
>>>>>>>
>>>>>>
>> jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common-schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/schemas/wsdl/http.xsd,
>>
>>> namespace: http://schemas.xmlsoap.org/wsdl/
>>>>>>> [INFO]
>>>>>>>
>>>>>>
>> ------------------------------------------------------------------------
>>
>>> [ERROR] BUILD ERROR
>>>>>>> [INFO]
>>>>>>>
>>>>>>
>> ------------------------------------------------------------------------
>>
>>> [INFO] Non unique body parts, operation [ greetMe ] and  operation [
>>>>>>> testTriPart ] have the same body block
>>>>>>> {http://apache.org/hello_world_xml_http/bare/types}requestType<http://apache.org/hello_world_xml_http/bare/types%7DrequestType>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>>>
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
>
>
>
>

Re: Invalid WSDLs

Posted by Daniel Kulp <dk...@apache.org>.
On May 26, 2008, at 5:32 PM, Benson Margulies wrote:

> Yes. I'm also very curious as to whether Dan can shed light as to the
> intention: should the CXF wsdl validator *only* worry about CXF- 
> specific
> issues, leaving general validation to generic tools, or does it  
> ambit to
> cover all of the ground?

This is kind of a loaded question.   I guess the answer is that it  
should catch and wsdl issues that CXF users care about.   Seriously,  
it currently tackles validation for many of the "common" issues that  
users have hit.   That includes issues hit by some of IONA's customers  
since they are CXF "users" as well.   There are a bunch of checks for  
WSI-BP compliance as well since CXF SHOULD be generating (and  
consuming) WSI-BP compliant wsdl whenever possible.

I'd be careful about changing too many wsdl's.   Many wsdl's in the  
CXF tree are actually there to test some of these "bad" cases.   For  
example, the hello_world_xml_bare.wsdl issue you mentioned....    That  
definitely is an issue in many cases.   Currently, if the first parts  
match, CXF cannot dispatch it correctly.   However, if the soap- 
actions are unique, it CAN.   There is also a bug logged about it:  https://issues.apache.org/jira/browse/CXF-1073
There may be tests related to it.   I'm not really sure.


Dan



>
>
> On Mon, May 26, 2008 at 5:14 PM, Glen Mazza <gl...@verizon.net>  
> wrote:
>> For specific validity questions, you might want to run against  
>> Metro and
>> see what it says.  Although not perfectly reliable, similiar error
>> messages (or lack thereof) to CXF's might help determine what is not
>> allowed with WSDL in general compared to what just CXF doesn't like.
>>
>> Glen
>>
>>
>> 2008-05-26 Benson Margulies wrote:
>>> However, now we get the question of what me mean by 'validate' in  
>>> our
> tool.
>>>
>>> Our validator rejects the wsdl we call hello_world_xml_bare.wsdl  
>>> with
>>> the below error, because one operation has a single input part of
>>> element type 'x', and another operation has three inputs parts, the
>>> first of which is also 'x'.
>>>
>>> Is this, in fact, unacceptable? Should I change the wsdl to make the
>>> elements distinct? Or is the validator wrong?
>>>
>>> On Mon, May 26, 2008 at 4:39 PM, Benson Margulies <bimargulies@gmail.com 
>>> >
> wrote:
>>>> What I'm doing is reflecting the existing command line into maven.
>>>>
>>>> On Mon, May 26, 2008 at 3:54 PM, Glen Mazza  
>>>> <gl...@verizon.net>
> wrote:
>>>>> I believe we have something like this already on the command-line
>>>>> (-validate option[1]).  Perhaps it would be better to build on  
>>>>> this,
> so
>>>>> command-line/Maven/Ant users can use it as well.
>>>>>
>>>>> Glen
>>>>>
>>>>> [1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>>>>>
>>>>> 2008-05-26 Benson Margulies wrote:
>>>>>> Watchers of checkins can see that I'm inventing a WSDL validation
> maven plugin.
>>>>>>
>>>>>> First catch:
>>>>>>
>>>>>> INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
>>>>>> from baseURI:
> jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common- 
> schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/ 
> schemas/wsdl/http.xsd,
>>>>>> namespace: http://schemas.xmlsoap.org/wsdl/
>>>>>> [INFO]
> ------------------------------------------------------------------------
>>>>>> [ERROR] BUILD ERROR
>>>>>> [INFO]
> ------------------------------------------------------------------------
>>>>>> [INFO] Non unique body parts, operation [ greetMe ] and   
>>>>>> operation [
>>>>>> testTriPart ] have the same body block
>>>>>> {http://apache.org/hello_world_xml_http/bare/types}requestType
>>>>>
>>>>>
>>>>
>>
>>

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





Re: Invalid WSDLs

Posted by Benson Margulies <bi...@gmail.com>.
Yes. I'm also very curious as to whether Dan can shed light as to the
intention: should the CXF wsdl validator *only* worry about CXF-specific
issues, leaving general validation to generic tools, or does it ambit to
cover all of the ground?

On Mon, May 26, 2008 at 5:14 PM, Glen Mazza <gl...@verizon.net> wrote:
> For specific validity questions, you might want to run against Metro and
> see what it says.  Although not perfectly reliable, similiar error
> messages (or lack thereof) to CXF's might help determine what is not
> allowed with WSDL in general compared to what just CXF doesn't like.
>
> Glen
>
>
> 2008-05-26 Benson Margulies wrote:
>> However, now we get the question of what me mean by 'validate' in our
tool.
>>
>> Our validator rejects the wsdl we call hello_world_xml_bare.wsdl with
>> the below error, because one operation has a single input part of
>> element type 'x', and another operation has three inputs parts, the
>> first of which is also 'x'.
>>
>> Is this, in fact, unacceptable? Should I change the wsdl to make the
>> elements distinct? Or is the validator wrong?
>>
>> On Mon, May 26, 2008 at 4:39 PM, Benson Margulies <bi...@gmail.com>
wrote:
>> > What I'm doing is reflecting the existing command line into maven.
>> >
>> > On Mon, May 26, 2008 at 3:54 PM, Glen Mazza <gl...@verizon.net>
wrote:
>> >> I believe we have something like this already on the command-line
>> >> (-validate option[1]).  Perhaps it would be better to build on this,
so
>> >> command-line/Maven/Ant users can use it as well.
>> >>
>> >> Glen
>> >>
>> >> [1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>> >>
>> >> 2008-05-26 Benson Margulies wrote:
>> >>> Watchers of checkins can see that I'm inventing a WSDL validation
maven plugin.
>> >>>
>> >>> First catch:
>> >>>
>> >>> INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
>> >>> from baseURI:
jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common-schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/schemas/wsdl/http.xsd,
>> >>> namespace: http://schemas.xmlsoap.org/wsdl/
>> >>> [INFO]
------------------------------------------------------------------------
>> >>> [ERROR] BUILD ERROR
>> >>> [INFO]
------------------------------------------------------------------------
>> >>> [INFO] Non unique body parts, operation [ greetMe ] and  operation [
>> >>> testTriPart ] have the same body block
>> >>> {http://apache.org/hello_world_xml_http/bare/types}requestType
>> >>
>> >>
>> >
>
>

Re: Invalid WSDLs

Posted by Glen Mazza <gl...@verizon.net>.
For specific validity questions, you might want to run against Metro and
see what it says.  Although not perfectly reliable, similiar error
messages (or lack thereof) to CXF's might help determine what is not
allowed with WSDL in general compared to what just CXF doesn't like.

Glen


2008-05-26 Benson Margulies wrote:
> However, now we get the question of what me mean by 'validate' in our tool.
> 
> Our validator rejects the wsdl we call hello_world_xml_bare.wsdl with
> the below error, because one operation has a single input part of
> element type 'x', and another operation has three inputs parts, the
> first of which is also 'x'.
> 
> Is this, in fact, unacceptable? Should I change the wsdl to make the
> elements distinct? Or is the validator wrong?
> 
> On Mon, May 26, 2008 at 4:39 PM, Benson Margulies <bi...@gmail.com> wrote:
> > What I'm doing is reflecting the existing command line into maven.
> >
> > On Mon, May 26, 2008 at 3:54 PM, Glen Mazza <gl...@verizon.net> wrote:
> >> I believe we have something like this already on the command-line
> >> (-validate option[1]).  Perhaps it would be better to build on this, so
> >> command-line/Maven/Ant users can use it as well.
> >>
> >> Glen
> >>
> >> [1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
> >>
> >> 2008-05-26 Benson Margulies wrote:
> >>> Watchers of checkins can see that I'm inventing a WSDL validation maven plugin.
> >>>
> >>> First catch:
> >>>
> >>> INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
> >>> from baseURI: jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common-schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/schemas/wsdl/http.xsd,
> >>> namespace: http://schemas.xmlsoap.org/wsdl/
> >>> [INFO] ------------------------------------------------------------------------
> >>> [ERROR] BUILD ERROR
> >>> [INFO] ------------------------------------------------------------------------
> >>> [INFO] Non unique body parts, operation [ greetMe ] and  operation [
> >>> testTriPart ] have the same body block
> >>> {http://apache.org/hello_world_xml_http/bare/types}requestType
> >>
> >>
> >


Re: Invalid WSDLs

Posted by Benson Margulies <bi...@gmail.com>.
However, now we get the question of what me mean by 'validate' in our tool.

Our validator rejects the wsdl we call hello_world_xml_bare.wsdl with
the below error, because one operation has a single input part of
element type 'x', and another operation has three inputs parts, the
first of which is also 'x'.

Is this, in fact, unacceptable? Should I change the wsdl to make the
elements distinct? Or is the validator wrong?

On Mon, May 26, 2008 at 4:39 PM, Benson Margulies <bi...@gmail.com> wrote:
> What I'm doing is reflecting the existing command line into maven.
>
> On Mon, May 26, 2008 at 3:54 PM, Glen Mazza <gl...@verizon.net> wrote:
>> I believe we have something like this already on the command-line
>> (-validate option[1]).  Perhaps it would be better to build on this, so
>> command-line/Maven/Ant users can use it as well.
>>
>> Glen
>>
>> [1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>>
>> 2008-05-26 Benson Margulies wrote:
>>> Watchers of checkins can see that I'm inventing a WSDL validation maven plugin.
>>>
>>> First catch:
>>>
>>> INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
>>> from baseURI: jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common-schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/schemas/wsdl/http.xsd,
>>> namespace: http://schemas.xmlsoap.org/wsdl/
>>> [INFO] ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] Non unique body parts, operation [ greetMe ] and  operation [
>>> testTriPart ] have the same body block
>>> {http://apache.org/hello_world_xml_http/bare/types}requestType
>>
>>
>

Re: Invalid WSDLs

Posted by Benson Margulies <bi...@gmail.com>.
What I'm doing is reflecting the existing command line into maven.

On Mon, May 26, 2008 at 3:54 PM, Glen Mazza <gl...@verizon.net> wrote:
> I believe we have something like this already on the command-line
> (-validate option[1]).  Perhaps it would be better to build on this, so
> command-line/Maven/Ant users can use it as well.
>
> Glen
>
> [1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html
>
> 2008-05-26 Benson Margulies wrote:
>> Watchers of checkins can see that I'm inventing a WSDL validation maven plugin.
>>
>> First catch:
>>
>> INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
>> from baseURI: jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common-schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/schemas/wsdl/http.xsd,
>> namespace: http://schemas.xmlsoap.org/wsdl/
>> [INFO] ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO] ------------------------------------------------------------------------
>> [INFO] Non unique body parts, operation [ greetMe ] and  operation [
>> testTriPart ] have the same body block
>> {http://apache.org/hello_world_xml_http/bare/types}requestType
>
>

Re: Invalid WSDLs

Posted by Glen Mazza <gl...@verizon.net>.
I believe we have something like this already on the command-line
(-validate option[1]).  Perhaps it would be better to build on this, so
command-line/Maven/Ant users can use it as well.

Glen

[1] http://cwiki.apache.org/CXF20DOC/wsdl-to-java.html

2008-05-26 Benson Margulies wrote:
> Watchers of checkins can see that I'm inventing a WSDL validation maven plugin.
> 
> First catch:
> 
> INFO: Resolve schema http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd
> from baseURI: jar:file:/home/benson/.m2/repository/org/apache/cxf/cxf-common-schemas/2.1.1-SNAPSHOT/cxf-common-schemas-2.1.1-SNAPSHOT.jar!/schemas/wsdl/http.xsd,
> namespace: http://schemas.xmlsoap.org/wsdl/
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Non unique body parts, operation [ greetMe ] and  operation [
> testTriPart ] have the same body block
> {http://apache.org/hello_world_xml_http/bare/types}requestType