You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "Ramnarine, Michael" <Mi...@iona.com> on 2006/11/06 02:53:34 UTC

locator.query.FilterType.setField() parameter type looks wrong

Looking at:

 
testutils/target/generated/src/main/java/com/iona/ws/_2005/_11/locator/q
uery/FilterType.java

Which is generated from:

   testutils/src/main/resources/wsdl/locator.wsdl

 

The following method signature doesn't look right:

    public void setField(String value) {

 

Shouldn't it be:

    public void setField(FilterFieldType value) {

 

Here's the relevant wsdl:

            <xs:complexType name="FilterType">

                <xs:simpleContent>

                    <xs:extension base="xs:string">

                        <xs:attribute name="field"
type="tns:FilterFieldType" 

                            use="required"/>

                    </xs:extension>

                </xs:simpleContent>

            </xs:complexType>

 

-Mike

 


RE: locator.query.FilterType.setField() parameter type looks wrong

Posted by Jim Ma <ji...@iona.com>.
Hi Mike ,

I think this is correct .  Conform to  JAXB2.0 specification(Proposed Final
Draft September 30, 2005) section 6.2 ,  simple type will be mapped to java
built in type , Object or List .

This case  is similar to the example on  JAXB2.0 sepc page 89 :

The following schema fragment:
<xs:complexType name="CTType">
<xs:attribute name="state" type="ZipOrName"/>
</xs:complexType>
<xs:simpleTypename="ZipOrName" memberTypes="xs:integer xs:string"/>

is bound to the following Java representation.

public class CTType {
String getState() {...}
void setState(String value) {...}
}


Regards

Jim

> -----Original Message-----
> From: Ramnarine, Michael [mailto:Michael.Ramnarine@iona.com]
> Sent: Monday, November 06, 2006 9:54 AM
> To: cxf-dev@incubator.apache.org
> Subject: locator.query.FilterType.setField() parameter type looks wrong
>
>
> Looking at:
>
>
> testutils/target/generated/src/main/java/com/iona/ws/_2005/_11/locator/q
> uery/FilterType.java
>
> Which is generated from:
>
>    testutils/src/main/resources/wsdl/locator.wsdl
>
>
>
> The following method signature doesn't look right:
>
>     public void setField(String value) {
>
>
>
> Shouldn't it be:
>
>     public void setField(FilterFieldType value) {
>
>
>
> Here's the relevant wsdl:
>
>             <xs:complexType name="FilterType">
>
>                 <xs:simpleContent>
>
>                     <xs:extension base="xs:string">
>
>                         <xs:attribute name="field"
> type="tns:FilterFieldType"
>
>                             use="required"/>
>
>                     </xs:extension>
>
>                 </xs:simpleContent>
>
>             </xs:complexType>
>
>
>
> -Mike
>
>
>
>