You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jara Cesnek (JIRA)" <ji...@apache.org> on 2008/09/09 14:17:44 UTC

[jira] Updated: (CXF-1789) Inconsistent @WebParam behaviour - wrong default namespace, wrong type name

     [ https://issues.apache.org/jira/browse/CXF-1789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jara Cesnek updated CXF-1789:
-----------------------------

    Description: 
CXF 2.1.2 Aegis Databinding, 

When using ONLY @WebParam(name="xyz) on parameter,  only name of parameter should be changed, NOT it's namespace, NOT it's complex type name.

Example :

Java :

@XmlType(name="DOlrb_stat",namespace="http://rb.lite.ws.daisy.marbes.cz")
public class Rb_stat {
...
}

@WebService(name="wsrbadresa",serviceName="wsrbadresa",targetNamespace="http://rb.ws.daisy.marbes.cz")
public class WSGetRBAdresa

 1.
 @WebMethod
 public List<Rb_stat> getStatList(Rb_stat inputObject) {
 ...
 }

 2.
 @WebMethod
 public List<Rb_stat> getStatList(@WebParam(name="inputObject") Rb_stat inputObject) {
 ...
 }

 3.
 @WebMethod
 public List<Rb_stat> getStatList(@WebParam(name = "inputObject", targetNamespace = "http://rb.lite.ws.daisy.marbes.cz")  @XmlParamType(name = "DOlrb_stat") Rb_stat inputObject {
 ...
 }

}



First method working as expected. Parameter name is arg0 and parameter type is based on annotations on class Rb_stat.

<xsd:element minOccurs="0" name="arg0" nillable="true" type="ns0:DOlrb_stat" />

- <xsd:complexType name="DOlrb_stat">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="id_stat" nillable="true" type="xsd:int" /> 
  <xsd:element minOccurs="0" name="nazev_stat" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>


With second method I want only change parameter name to "inputObject". But strange things happend. WSDL schema is completly defferent.

<xsd:element minOccurs="0" name="inputObject" nillable="true" type="ns0:inputObject" />

- <xsd:complexType name="inputObject">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="ns1:id_stat" nillable="true" type="xsd:int" /> 
  <xsd:element minOccurs="0" name="ns1:nazev_stat" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>


Third method generates right WSDL schema I expected from second method. Only parameter name has chnged from first method.


This is dependent on result type. Must be List<> of parameter type.

  was:
CXF 2.1.2 Aegis Databinding, 

When using ONLY @WebParam(name="xyz) on parameter,  only name of parameter should be changed, NOT it's namespace, NOT it's complex type name.

Example :

Java :

@XmlType(name="DOlrb_stat",namespace="http://rb.lite.ws.daisy.marbes.cz")
public class Rb_stat {
...
}

@WebService(name="wsrbadresa",serviceName="wsrbadresa",targetNamespace="http://rb.ws.daisy.marbes.cz")
public class WSGetRBAdresa

 1.
 @WebMethod
 public List<Rb_stat> getStatList(Rb_stat inputObject) {
 ...
 }

 2.
 @WebMethod
 public List<Rb_stat> getStatList(@WebParam(name="inputObject") Rb_stat inputObject) {
 ...
 }

 3.
 @WebMethod
 public List<Rb_stat> getStatList(@WebParam(name = "inputObject", targetNamespace = "http://rb.lite.ws.daisy.marbes.cz")  @XmlParamType(name = "DOlrb_stat") Rb_stat inputObject {
 ...
 }

}



First method working as expected. Parameter name is arg0 and parameter type is based on annotations on class Rb_stat.

<xsd:element minOccurs="0" name="inputObject" nillable="true" type="ns0:DOlrb_stat" />

- <xsd:complexType name="DOlrb_stat">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="id_stat" nillable="true" type="xsd:int" /> 
  <xsd:element minOccurs="0" name="nazev_stat" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>


With second method I want only change parameter name to "inputObject". But strange things happend. WSDL schema is completly defferent.

<xsd:element minOccurs="0" name="inputObject" nillable="true" type="ns0:inputObject" />

- <xsd:complexType name="inputObject">
- <xsd:sequence>
  <xsd:element minOccurs="0" name="ns1:id_stat" nillable="true" type="xsd:int" /> 
  <xsd:element minOccurs="0" name="ns1:nazev_stat" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>


Third method generates right WSDL schema I expected from second method. Only parameter name has chnged from first method.


This is dependent on result type. Must be List<> of parameter type.


> Inconsistent @WebParam behaviour - wrong default namespace, wrong type name
> ---------------------------------------------------------------------------
>
>                 Key: CXF-1789
>                 URL: https://issues.apache.org/jira/browse/CXF-1789
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.2, 2.1.3
>            Reporter: Jara Cesnek
>            Priority: Critical
>
> CXF 2.1.2 Aegis Databinding, 
> When using ONLY @WebParam(name="xyz) on parameter,  only name of parameter should be changed, NOT it's namespace, NOT it's complex type name.
> Example :
> Java :
> @XmlType(name="DOlrb_stat",namespace="http://rb.lite.ws.daisy.marbes.cz")
> public class Rb_stat {
> ...
> }
> @WebService(name="wsrbadresa",serviceName="wsrbadresa",targetNamespace="http://rb.ws.daisy.marbes.cz")
> public class WSGetRBAdresa
>  1.
>  @WebMethod
>  public List<Rb_stat> getStatList(Rb_stat inputObject) {
>  ...
>  }
>  2.
>  @WebMethod
>  public List<Rb_stat> getStatList(@WebParam(name="inputObject") Rb_stat inputObject) {
>  ...
>  }
>  3.
>  @WebMethod
>  public List<Rb_stat> getStatList(@WebParam(name = "inputObject", targetNamespace = "http://rb.lite.ws.daisy.marbes.cz")  @XmlParamType(name = "DOlrb_stat") Rb_stat inputObject {
>  ...
>  }
> }
> First method working as expected. Parameter name is arg0 and parameter type is based on annotations on class Rb_stat.
> <xsd:element minOccurs="0" name="arg0" nillable="true" type="ns0:DOlrb_stat" />
> - <xsd:complexType name="DOlrb_stat">
> - <xsd:sequence>
>   <xsd:element minOccurs="0" name="id_stat" nillable="true" type="xsd:int" /> 
>   <xsd:element minOccurs="0" name="nazev_stat" nillable="true" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
> With second method I want only change parameter name to "inputObject". But strange things happend. WSDL schema is completly defferent.
> <xsd:element minOccurs="0" name="inputObject" nillable="true" type="ns0:inputObject" />
> - <xsd:complexType name="inputObject">
> - <xsd:sequence>
>   <xsd:element minOccurs="0" name="ns1:id_stat" nillable="true" type="xsd:int" /> 
>   <xsd:element minOccurs="0" name="ns1:nazev_stat" nillable="true" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
> Third method generates right WSDL schema I expected from second method. Only parameter name has chnged from first method.
> This is dependent on result type. Must be List<> of parameter type.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.