You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Ramnarine, Michael" <Mi...@iona.com> on 2008/05/12 03:47:59 UTC

Default input/output names in port types not honored

According to Section 2.4.5 of WSDL 1.1
(http://www.w3.org/TR/wsdl#_names), the name attribute of input and
output elements does not have to be specified; and if not provided will
default to the name of the operation with "Request" or "Response"
appended, for request-response operations.  Unfortunately, CXF does not
like it when the WSDL uses unnamed (defaulted) input and output elements
in the portType operations, but at the same time has explicit name
attributes in the binding, even though the names in the binding match
the default naming specified in section 2.4.5.  The sample defaults.wsdl
at the end of this message is an example of this, and when run through
CXF 2.0.6 or 2.1 wsdlvalidator, errors are reported for the portType
(see the "Sample wsdlvalidator output" below).  

 

Is this a bug in CXF?  

 

P.S.  When the input and output names are made consistent for both
portType and binding, wsdlvalidator is happy.   More interestingly,
reversing the example, and using unnamed (defaulted) input and output
elements in the binding, and using input and output elements with
explicit names which match the default naming in the portType, that
validates OK too.

 

-- Sample wsdlvalidator output --

C:\Ramnarine\dev\ART-10018>C:\apache-cxf-2.1\bin\wsdlvalidator.bat
defaults.wsdl

WSDLValidator Error :

 Summary:  Failures: 2, Warnings: 0

 

 <<< ERROR!

file:/C:/Ramnarine/dev/ART-10018/defaults.wsdl:[44,13]

 Caused by
{http://www.iona.com/artix/defaults}[portType:TestPortType][operation:Te
st][output:TestResponse] not exist.

file:/C:/Ramnarine/dev/ART-10018/defaults.wsdl:[40,13]

 Caused by
{http://www.iona.com/artix/defaults}[portType:TestPortType][operation:Te
st][input:TestRequest] not exist.

 

 

-- Example: defaults.wsdl --

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="defaults.wsdl" 

    targetNamespace="http://www.iona.com/artix/defaults" 

    xmlns="http://schemas.xmlsoap.org/wsdl/" 

    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 

    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 

    xmlns:tns="http://www.iona.com/artix/defaults" 

    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 

    xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <types>

        <xsd:schema targetNamespace="http://www.iona.com/artix/defaults"


            xmlns="http://www.iona.com/artix/defaults" 

            xmlns:xsd="http://www.w3.org/2001/XMLSchema">

            <xsd:complexType name="TestType">

                <xsd:sequence>

                    <xsd:element maxOccurs="1" minOccurs="1" name="msg"
type="xsd:string"/>

                    <xsd:element maxOccurs="1" minOccurs="1" name="num"
type="xsd:int"/>

                </xsd:sequence>

            </xsd:complexType>

            <xsd:element name="Test" type="TestType"/>

        </xsd:schema>

    </types>

 

    <message name="TestMessage">

        <part element="tns:Test" name="params"/>

    </message>

 

    <portType name="TestPortType">

        <operation name="Test">

            <input message="tns:TestMessage"/>

            <output message="tns:TestMessage"/>

        </operation>

    </portType>

 

    <binding name="TestPortTypeDefaults" type="tns:TestPortType">

        <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

        <operation name="Test">

            <soap:operation soapAction="" style="document"/>

 

            <input name="TestRequest">

                <soap:body use="literal"/>

            </input>

 

            <output name="TestResponse">

                <soap:body use="literal"/>

            </output>

 

        </operation>

    </binding>

 

    <service name="TestService">

        <port binding="tns:TestPortTypeDefaults" name="TestPort">

            <soap:address location="http://localhost:9100/TestService"/>

        </port>

    </service>

 

</definitions>

 


RE: Default input/output names in port types not honored

Posted by "Ramnarine, Michael" <Mi...@iona.com>.
Outstanding!  And I see you're putting the fix in both trunk (2.1) and
2.0.x-fixes.  Thanks Dan!  -Mike

> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, May 12, 2008 2:57 PM
> To: users@cxf.apache.org
> Subject: Re: Default input/output names in port types not honored
> 
> 
> 
> I have a fix for that as well.   It's a very small change.   Much
> easier than the tooling changes at least (but that may be because I'm
> much more familiar with the runtime code than the tooling).
> 
> Dan
> 
> 
> On May 12, 2008, at 2:39 PM, Ramnarine, Michael wrote:
> 
> > Dan,
> >
> > Thanks for the quick fix for the code generation problem I outlined!
> > We were hoping it would also fix the problem Paul mentions below.
> >
> > One bug down, one to go.  Please let us know if we can provide any
> > further information.
> >
> > -Mike
> >
> >> -----Original Message-----
> >> From: Daniel Kulp [mailto:dkulp@apache.org]
> >> Sent: Monday, May 12, 2008 1:18 PM
> >> To: users@cxf.apache.org
> >> Subject: Re: Default input/output names in port types not honored
> >>
> >>
> >>
> >> Hmm..   Ok.  No.   I just fixed the code generation stuff
(wsdl2java
> >> and validator) that was preventing it from even generating the
client
> >> code.   Didn't actually try running it.
> >>
> >> Ick. That's a whole different problem.  :-(
> >>
> >> Dan
> >>
> >>
> >>
> >> On May 12, 2008, at 12:53 PM, Taylor, Paul wrote:
> >>
> >>>
> >>> Hi Dan
> >>>
> >>> The context for this bug was attempting to create a client (using
> > the
> >>> ReflectionServiceFactoryBean) and not being able to find any
> >>> operations
> >>> since because of the mismatch in the names between the port-type
and
> >>> the
> >>> binding.  Will the fix also address this problem or is it only
> > related
> >>> to the validator?
> >>>
> >>>
> >>> Paul
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Daniel Kulp [mailto:dkulp@apache.org]
> >>>> Sent: 12 May 2008 17:43
> >>>> To: users@cxf.apache.org
> >>>> Subject: Re: Default input/output names in port types not honored
> >>>>
> >>>>
> >>>> Michael,
> >>>>
> >>>> This is definitely a bug in the CXF validator.   The xpaths that
> > the
> >>>> validator are using don't take the "defaults" into account for
> > this.
> >>>> I'm testing a fix for it now.
> >>>>
> >>>> Dan
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

Re: Default input/output names in port types not honored

Posted by Daniel Kulp <dk...@apache.org>.

I have a fix for that as well.   It's a very small change.   Much  
easier than the tooling changes at least (but that may be because I'm  
much more familiar with the runtime code than the tooling).

Dan


On May 12, 2008, at 2:39 PM, Ramnarine, Michael wrote:

> Dan,
>
> Thanks for the quick fix for the code generation problem I outlined!
> We were hoping it would also fix the problem Paul mentions below.
>
> One bug down, one to go.  Please let us know if we can provide any
> further information.
>
> -Mike
>
>> -----Original Message-----
>> From: Daniel Kulp [mailto:dkulp@apache.org]
>> Sent: Monday, May 12, 2008 1:18 PM
>> To: users@cxf.apache.org
>> Subject: Re: Default input/output names in port types not honored
>>
>>
>>
>> Hmm..   Ok.  No.   I just fixed the code generation stuff (wsdl2java
>> and validator) that was preventing it from even generating the client
>> code.   Didn't actually try running it.
>>
>> Ick. That's a whole different problem.  :-(
>>
>> Dan
>>
>>
>>
>> On May 12, 2008, at 12:53 PM, Taylor, Paul wrote:
>>
>>>
>>> Hi Dan
>>>
>>> The context for this bug was attempting to create a client (using
> the
>>> ReflectionServiceFactoryBean) and not being able to find any
>>> operations
>>> since because of the mismatch in the names between the port-type and
>>> the
>>> binding.  Will the fix also address this problem or is it only
> related
>>> to the validator?
>>>
>>>
>>> Paul
>>>
>>>
>>>> -----Original Message-----
>>>> From: Daniel Kulp [mailto:dkulp@apache.org]
>>>> Sent: 12 May 2008 17:43
>>>> To: users@cxf.apache.org
>>>> Subject: Re: Default input/output names in port types not honored
>>>>
>>>>
>>>> Michael,
>>>>
>>>> This is definitely a bug in the CXF validator.   The xpaths that
> the
>>>> validator are using don't take the "defaults" into account for
> this.
>>>> I'm testing a fix for it now.
>>>>
>>>> Dan

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





RE: Default input/output names in port types not honored

Posted by "Ramnarine, Michael" <Mi...@iona.com>.
Dan,

Thanks for the quick fix for the code generation problem I outlined!
We were hoping it would also fix the problem Paul mentions below.  

One bug down, one to go.  Please let us know if we can provide any
further information.

-Mike

> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: Monday, May 12, 2008 1:18 PM
> To: users@cxf.apache.org
> Subject: Re: Default input/output names in port types not honored
> 
> 
> 
> Hmm..   Ok.  No.   I just fixed the code generation stuff (wsdl2java
> and validator) that was preventing it from even generating the client
> code.   Didn't actually try running it.
> 
> Ick. That's a whole different problem.  :-(
> 
> Dan
> 
> 
> 
> On May 12, 2008, at 12:53 PM, Taylor, Paul wrote:
> 
> >
> > Hi Dan
> >
> > The context for this bug was attempting to create a client (using
the
> > ReflectionServiceFactoryBean) and not being able to find any
> > operations
> > since because of the mismatch in the names between the port-type and
> > the
> > binding.  Will the fix also address this problem or is it only
related
> > to the validator?
> >
> >
> > Paul
> >
> >
> >> -----Original Message-----
> >> From: Daniel Kulp [mailto:dkulp@apache.org]
> >> Sent: 12 May 2008 17:43
> >> To: users@cxf.apache.org
> >> Subject: Re: Default input/output names in port types not honored
> >>
> >>
> >> Michael,
> >>
> >> This is definitely a bug in the CXF validator.   The xpaths that
the
> >> validator are using don't take the "defaults" into account for
this.
> >> I'm testing a fix for it now.
> >>
> >> Dan

Re: Default input/output names in port types not honored

Posted by Daniel Kulp <dk...@apache.org>.

Hmm..   Ok.  No.   I just fixed the code generation stuff (wsdl2java  
and validator) that was preventing it from even generating the client  
code.   Didn't actually try running it.

Ick. That's a whole different problem.  :-(

Dan



On May 12, 2008, at 12:53 PM, Taylor, Paul wrote:

>
> Hi Dan
>
> The context for this bug was attempting to create a client (using the
> ReflectionServiceFactoryBean) and not being able to find any  
> operations
> since because of the mismatch in the names between the port-type and  
> the
> binding.  Will the fix also address this problem or is it only related
> to the validator?
>
>
> Paul
>
>
>> -----Original Message-----
>> From: Daniel Kulp [mailto:dkulp@apache.org]
>> Sent: 12 May 2008 17:43
>> To: users@cxf.apache.org
>> Subject: Re: Default input/output names in port types not honored
>>
>>
>> Michael,
>>
>> This is definitely a bug in the CXF validator.   The xpaths that the
>> validator are using don't take the "defaults" into account for this.
>> I'm testing a fix for it now.
>>
>> Dan
>>
>>
>> On May 11, 2008, at 9:47 PM, Ramnarine, Michael wrote:
>>
>>> According to Section 2.4.5 of WSDL 1.1
>>> (http://www.w3.org/TR/wsdl#_names), the name attribute of input and
>>> output elements does not have to be specified; and if not provided
>>> will
>>> default to the name of the operation with "Request" or "Response"
>>> appended, for request-response operations.  Unfortunately, CXF does
>>> not
>>> like it when the WSDL uses unnamed (defaulted) input and output
>>> elements
>>> in the portType operations, but at the same time has explicit name
>>> attributes in the binding, even though the names in the binding
> match
>>> the default naming specified in section 2.4.5.  The sample
>>> defaults.wsdl
>>> at the end of this message is an example of this, and when run
> through
>>> CXF 2.0.6 or 2.1 wsdlvalidator, errors are reported for the portType
>>> (see the "Sample wsdlvalidator output" below).
>>>
>>>
>>>
>>> Is this a bug in CXF?
>>>
>>>
>>>
>>> P.S.  When the input and output names are made consistent for both
>>> portType and binding, wsdlvalidator is happy.   More interestingly,
>>> reversing the example, and using unnamed (defaulted) input and
> output
>>> elements in the binding, and using input and output elements with
>>> explicit names which match the default naming in the portType, that
>>> validates OK too.
>>>
>>>
>>>
>>> -- Sample wsdlvalidator output --
>>>
>>> C:\Ramnarine\dev\ART-10018>C:\apache-cxf-2.1\bin\wsdlvalidator.bat
>>> defaults.wsdl
>>>
>>> WSDLValidator Error :
>>>
>>> Summary:  Failures: 2, Warnings: 0
>>>
>>>
>>>
>>> <<< ERROR!
>>>
>>> file:/C:/Ramnarine/dev/ART-10018/defaults.wsdl:[44,13]
>>>
>>> Caused by
>>> {http://www.iona.com/artix/defaults}[portType:TestPortType]
>>> [operation:Te
>>> st][output:TestResponse] not exist.
>>>
>>> file:/C:/Ramnarine/dev/ART-10018/defaults.wsdl:[40,13]
>>>
>>> Caused by
>>> {http://www.iona.com/artix/defaults}[portType:TestPortType]
>>> [operation:Te
>>> st][input:TestRequest] not exist.
>>>
>>>
>>>
>>>
>>>
>>> -- Example: defaults.wsdl --
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <definitions name="defaults.wsdl"
>>>
>>>   targetNamespace="http://www.iona.com/artix/defaults"
>>>
>>>   xmlns="http://schemas.xmlsoap.org/wsdl/"
>>>
>>>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>
>>>   xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>>>
>>>   xmlns:tns="http://www.iona.com/artix/defaults"
>>>
>>>   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>
>>>   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>
>>>   <types>
>>>
>>>       <xsd:schema targetNamespace="http://www.iona.com/artix/
>>> defaults"
>>>
>>>
>>>           xmlns="http://www.iona.com/artix/defaults"
>>>
>>>           xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>
>>>           <xsd:complexType name="TestType">
>>>
>>>               <xsd:sequence>
>>>
>>>                   <xsd:element maxOccurs="1" minOccurs="1"
> name="msg"
>>> type="xsd:string"/>
>>>
>>>                   <xsd:element maxOccurs="1" minOccurs="1"
> name="num"
>>> type="xsd:int"/>
>>>
>>>               </xsd:sequence>
>>>
>>>           </xsd:complexType>
>>>
>>>           <xsd:element name="Test" type="TestType"/>
>>>
>>>       </xsd:schema>
>>>
>>>   </types>
>>>
>>>
>>>
>>>   <message name="TestMessage">
>>>
>>>       <part element="tns:Test" name="params"/>
>>>
>>>   </message>
>>>
>>>
>>>
>>>   <portType name="TestPortType">
>>>
>>>       <operation name="Test">
>>>
>>>           <input message="tns:TestMessage"/>
>>>
>>>           <output message="tns:TestMessage"/>
>>>
>>>       </operation>
>>>
>>>   </portType>
>>>
>>>
>>>
>>>   <binding name="TestPortTypeDefaults" type="tns:TestPortType">
>>>
>>>       <soap:binding style="document"
>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>>
>>>       <operation name="Test">
>>>
>>>           <soap:operation soapAction="" style="document"/>
>>>
>>>
>>>
>>>           <input name="TestRequest">
>>>
>>>               <soap:body use="literal"/>
>>>
>>>           </input>
>>>
>>>
>>>
>>>           <output name="TestResponse">
>>>
>>>               <soap:body use="literal"/>
>>>
>>>           </output>
>>>
>>>
>>>
>>>       </operation>
>>>
>>>   </binding>
>>>
>>>
>>>
>>>   <service name="TestService">
>>>
>>>       <port binding="tns:TestPortTypeDefaults" name="TestPort">
>>>
>>>           <soap:address location="http://localhost:9100/
>>> TestService"/>
>>>
>>>       </port>
>>>
>>>   </service>
>>>
>>>
>>>
>>> </definitions>
>>>
>>>
>>>
>>
>> ---
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>>
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4,  
> Ireland

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





RE: Default input/output names in port types not honored

Posted by "Taylor, Paul" <Pa...@iona.com>.
Hi Dan

The context for this bug was attempting to create a client (using the
ReflectionServiceFactoryBean) and not being able to find any operations
since because of the mismatch in the names between the port-type and the
binding.  Will the fix also address this problem or is it only related
to the validator?


Paul


> -----Original Message-----
> From: Daniel Kulp [mailto:dkulp@apache.org]
> Sent: 12 May 2008 17:43
> To: users@cxf.apache.org
> Subject: Re: Default input/output names in port types not honored
> 
> 
> Michael,
> 
> This is definitely a bug in the CXF validator.   The xpaths that the
> validator are using don't take the "defaults" into account for this.
> I'm testing a fix for it now.
> 
> Dan
> 
> 
> On May 11, 2008, at 9:47 PM, Ramnarine, Michael wrote:
> 
> > According to Section 2.4.5 of WSDL 1.1
> > (http://www.w3.org/TR/wsdl#_names), the name attribute of input and
> > output elements does not have to be specified; and if not provided
> > will
> > default to the name of the operation with "Request" or "Response"
> > appended, for request-response operations.  Unfortunately, CXF does
> > not
> > like it when the WSDL uses unnamed (defaulted) input and output
> > elements
> > in the portType operations, but at the same time has explicit name
> > attributes in the binding, even though the names in the binding
match
> > the default naming specified in section 2.4.5.  The sample
> > defaults.wsdl
> > at the end of this message is an example of this, and when run
through
> > CXF 2.0.6 or 2.1 wsdlvalidator, errors are reported for the portType
> > (see the "Sample wsdlvalidator output" below).
> >
> >
> >
> > Is this a bug in CXF?
> >
> >
> >
> > P.S.  When the input and output names are made consistent for both
> > portType and binding, wsdlvalidator is happy.   More interestingly,
> > reversing the example, and using unnamed (defaulted) input and
output
> > elements in the binding, and using input and output elements with
> > explicit names which match the default naming in the portType, that
> > validates OK too.
> >
> >
> >
> > -- Sample wsdlvalidator output --
> >
> > C:\Ramnarine\dev\ART-10018>C:\apache-cxf-2.1\bin\wsdlvalidator.bat
> > defaults.wsdl
> >
> > WSDLValidator Error :
> >
> > Summary:  Failures: 2, Warnings: 0
> >
> >
> >
> > <<< ERROR!
> >
> > file:/C:/Ramnarine/dev/ART-10018/defaults.wsdl:[44,13]
> >
> > Caused by
> > {http://www.iona.com/artix/defaults}[portType:TestPortType]
> > [operation:Te
> > st][output:TestResponse] not exist.
> >
> > file:/C:/Ramnarine/dev/ART-10018/defaults.wsdl:[40,13]
> >
> > Caused by
> > {http://www.iona.com/artix/defaults}[portType:TestPortType]
> > [operation:Te
> > st][input:TestRequest] not exist.
> >
> >
> >
> >
> >
> > -- Example: defaults.wsdl --
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <definitions name="defaults.wsdl"
> >
> >    targetNamespace="http://www.iona.com/artix/defaults"
> >
> >    xmlns="http://schemas.xmlsoap.org/wsdl/"
> >
> >    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> >
> >    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> >
> >    xmlns:tns="http://www.iona.com/artix/defaults"
> >
> >    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> >
> >    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> >    <types>
> >
> >        <xsd:schema targetNamespace="http://www.iona.com/artix/
> > defaults"
> >
> >
> >            xmlns="http://www.iona.com/artix/defaults"
> >
> >            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >
> >            <xsd:complexType name="TestType">
> >
> >                <xsd:sequence>
> >
> >                    <xsd:element maxOccurs="1" minOccurs="1"
name="msg"
> > type="xsd:string"/>
> >
> >                    <xsd:element maxOccurs="1" minOccurs="1"
name="num"
> > type="xsd:int"/>
> >
> >                </xsd:sequence>
> >
> >            </xsd:complexType>
> >
> >            <xsd:element name="Test" type="TestType"/>
> >
> >        </xsd:schema>
> >
> >    </types>
> >
> >
> >
> >    <message name="TestMessage">
> >
> >        <part element="tns:Test" name="params"/>
> >
> >    </message>
> >
> >
> >
> >    <portType name="TestPortType">
> >
> >        <operation name="Test">
> >
> >            <input message="tns:TestMessage"/>
> >
> >            <output message="tns:TestMessage"/>
> >
> >        </operation>
> >
> >    </portType>
> >
> >
> >
> >    <binding name="TestPortTypeDefaults" type="tns:TestPortType">
> >
> >        <soap:binding style="document"
> > transport="http://schemas.xmlsoap.org/soap/http"/>
> >
> >        <operation name="Test">
> >
> >            <soap:operation soapAction="" style="document"/>
> >
> >
> >
> >            <input name="TestRequest">
> >
> >                <soap:body use="literal"/>
> >
> >            </input>
> >
> >
> >
> >            <output name="TestResponse">
> >
> >                <soap:body use="literal"/>
> >
> >            </output>
> >
> >
> >
> >        </operation>
> >
> >    </binding>
> >
> >
> >
> >    <service name="TestService">
> >
> >        <port binding="tns:TestPortTypeDefaults" name="TestPort">
> >
> >            <soap:address location="http://localhost:9100/
> > TestService"/>
> >
> >        </port>
> >
> >    </service>
> >
> >
> >
> > </definitions>
> >
> >
> >
> 
> ---
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Re: Default input/output names in port types not honored

Posted by Daniel Kulp <dk...@apache.org>.
Michael,

This is definitely a bug in the CXF validator.   The xpaths that the  
validator are using don't take the "defaults" into account for this.    
I'm testing a fix for it now.

Dan


On May 11, 2008, at 9:47 PM, Ramnarine, Michael wrote:

> According to Section 2.4.5 of WSDL 1.1
> (http://www.w3.org/TR/wsdl#_names), the name attribute of input and
> output elements does not have to be specified; and if not provided  
> will
> default to the name of the operation with "Request" or "Response"
> appended, for request-response operations.  Unfortunately, CXF does  
> not
> like it when the WSDL uses unnamed (defaulted) input and output  
> elements
> in the portType operations, but at the same time has explicit name
> attributes in the binding, even though the names in the binding match
> the default naming specified in section 2.4.5.  The sample  
> defaults.wsdl
> at the end of this message is an example of this, and when run through
> CXF 2.0.6 or 2.1 wsdlvalidator, errors are reported for the portType
> (see the "Sample wsdlvalidator output" below).
>
>
>
> Is this a bug in CXF?
>
>
>
> P.S.  When the input and output names are made consistent for both
> portType and binding, wsdlvalidator is happy.   More interestingly,
> reversing the example, and using unnamed (defaulted) input and output
> elements in the binding, and using input and output elements with
> explicit names which match the default naming in the portType, that
> validates OK too.
>
>
>
> -- Sample wsdlvalidator output --
>
> C:\Ramnarine\dev\ART-10018>C:\apache-cxf-2.1\bin\wsdlvalidator.bat
> defaults.wsdl
>
> WSDLValidator Error :
>
> Summary:  Failures: 2, Warnings: 0
>
>
>
> <<< ERROR!
>
> file:/C:/Ramnarine/dev/ART-10018/defaults.wsdl:[44,13]
>
> Caused by
> {http://www.iona.com/artix/defaults}[portType:TestPortType] 
> [operation:Te
> st][output:TestResponse] not exist.
>
> file:/C:/Ramnarine/dev/ART-10018/defaults.wsdl:[40,13]
>
> Caused by
> {http://www.iona.com/artix/defaults}[portType:TestPortType] 
> [operation:Te
> st][input:TestRequest] not exist.
>
>
>
>
>
> -- Example: defaults.wsdl --
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <definitions name="defaults.wsdl"
>
>    targetNamespace="http://www.iona.com/artix/defaults"
>
>    xmlns="http://schemas.xmlsoap.org/wsdl/"
>
>    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
>    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
>
>    xmlns:tns="http://www.iona.com/artix/defaults"
>
>    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>    <types>
>
>        <xsd:schema targetNamespace="http://www.iona.com/artix/ 
> defaults"
>
>
>            xmlns="http://www.iona.com/artix/defaults"
>
>            xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
>            <xsd:complexType name="TestType">
>
>                <xsd:sequence>
>
>                    <xsd:element maxOccurs="1" minOccurs="1" name="msg"
> type="xsd:string"/>
>
>                    <xsd:element maxOccurs="1" minOccurs="1" name="num"
> type="xsd:int"/>
>
>                </xsd:sequence>
>
>            </xsd:complexType>
>
>            <xsd:element name="Test" type="TestType"/>
>
>        </xsd:schema>
>
>    </types>
>
>
>
>    <message name="TestMessage">
>
>        <part element="tns:Test" name="params"/>
>
>    </message>
>
>
>
>    <portType name="TestPortType">
>
>        <operation name="Test">
>
>            <input message="tns:TestMessage"/>
>
>            <output message="tns:TestMessage"/>
>
>        </operation>
>
>    </portType>
>
>
>
>    <binding name="TestPortTypeDefaults" type="tns:TestPortType">
>
>        <soap:binding style="document"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
>        <operation name="Test">
>
>            <soap:operation soapAction="" style="document"/>
>
>
>
>            <input name="TestRequest">
>
>                <soap:body use="literal"/>
>
>            </input>
>
>
>
>            <output name="TestResponse">
>
>                <soap:body use="literal"/>
>
>            </output>
>
>
>
>        </operation>
>
>    </binding>
>
>
>
>    <service name="TestService">
>
>        <port binding="tns:TestPortTypeDefaults" name="TestPort">
>
>            <soap:address location="http://localhost:9100/ 
> TestService"/>
>
>        </port>
>
>    </service>
>
>
>
> </definitions>
>
>
>

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