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/30 10:21:44 UTC

[jira] Created: (CXF-1833) Inconsistent Aegis type mapping of List<> with and without @WebParam

Inconsistent Aegis type mapping of List<> with and without @WebParam
--------------------------------------------------------------------

                 Key: CXF-1833
                 URL: https://issues.apache.org/jira/browse/CXF-1833
             Project: CXF
          Issue Type: Bug
          Components: Aegis Databinding
    Affects Versions: 2.1.2
         Environment: SimpleFrontend, AegisDatabinding
            Reporter: Jara Cesnek


When adding @WebParam on List<>, WSDL types and namespaces is changed drastically. 

1.
    @WebMethod
    public void method1(List<String> headers1) {
    }

2.
    @WebMethod
    public void method1(String[] headers1) {
    }

3.
    @WebMethod
    public void method1( @WebParam(name = "headers1") String[] headers1) {
    }

4.
    @WebMethod
    public void method1( @WebParam(name = "headers1") List<String> headers1) {
    }

Methods 1,2,3 produces equal WSDL and expected types :

- <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://v1_1_2.mcnav4connector.ws.daisy.marbes.cz" xmlns:tns="http://v1_1_2.mcnav4connector.ws.daisy.marbes.cz" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:complexType name="ArrayOfString">
- <xsd:sequence>
  <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>


But method 4 produces something unexpexted : 

- <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://util.java" xmlns:tns="http://util.java" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:complexType name="headers1">
- <xsd:sequence>
  <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
  </xsd:sequence>
  </xsd:complexType>
  </xsd:schema>




My configuration: 

        JaxWsServiceFactoryBean aegisServiceFactoryBean = new JaxWsServiceFactoryBean(); 
        aegisServiceFactoryBean.setDataBinding(new AegisDatabinding()); 
        aegisServiceFactoryBean.setServiceConfigurations(Arrays.asList( 
                new org.apache.cxf.jaxws.support.JaxWsServiceConfiguration(), 
                new org.apache.cxf.service.factory.DefaultServiceConfiguration() 
        )); 


        ServerFactoryBean serverFactoryBean = new ServerFactoryBean(); 
        serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); 
        serverFactoryBean.setServiceBean(implementor); 
        serverFactoryBean.setAddress(url); 
        serverFactoryBean.setServiceFactory(aegisServiceFactoryBean); 


Together with bug CXF-1789  there is definitively something nasty in handling @WebParam in Aegis and SimpleFrontent.


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


[jira] Resolved: (CXF-1833) Inconsistent Aegis type mapping of List<> with and without @WebParam

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies resolved CXF-1833.
-----------------------------------

       Resolution: Won't Fix
    Fix Version/s: Invalid

My view is that we don't set out to support the combination of parts from JAX-WS and Simple front ends.

Here's the supported variation on the reported code, taken from AbstractAegisTestCase were I just checked it in.

protected Server createJaxwsService(Class serviceClass, Object serviceBean, String address, QName name) {
        if (address == null) {
            address = serviceClass.getSimpleName();
        }
        JaxWsServiceFactoryBean sf = new JaxWsServiceFactoryBean();
        sf.setDataBinding(new AegisDatabinding());
        JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
        serverFactoryBean.setServiceClass(serviceClass);
        
        if (serviceBean != null) {
            serverFactoryBean.setServiceBean(serviceBean);
        }

        serverFactoryBean.setAddress("local://" + address);
            
        serverFactoryBean.setServiceFactory(sf);
        if (name != null) {
            serverFactoryBean.setEndpointName(name);
        }
        return serverFactoryBean.create();
    }

> Inconsistent Aegis type mapping of List<> with and without @WebParam
> --------------------------------------------------------------------
>
>                 Key: CXF-1833
>                 URL: https://issues.apache.org/jira/browse/CXF-1833
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.2
>         Environment: SimpleFrontend, AegisDatabinding
>            Reporter: Jara Cesnek
>             Fix For: Invalid
>
>
> When adding @WebParam on List<>, WSDL types and namespaces is changed drastically. 
> 1.
>     @WebMethod
>     public void method1(List<String> headers1) {
>     }
> 2.
>     @WebMethod
>     public void method1(String[] headers1) {
>     }
> 3.
>     @WebMethod
>     public void method1( @WebParam(name = "headers1") String[] headers1) {
>     }
> 4.
>     @WebMethod
>     public void method1( @WebParam(name = "headers1") List<String> headers1) {
>     }
> Methods 1,2,3 produces equal WSDL and expected types :
> - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://v1_1_2.mcnav4connector.ws.daisy.marbes.cz" xmlns:tns="http://v1_1_2.mcnav4connector.ws.daisy.marbes.cz" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <xsd:complexType name="ArrayOfString">
> - <xsd:sequence>
>   <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
> But method 4 produces something unexpexted : 
> - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://util.java" xmlns:tns="http://util.java" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <xsd:complexType name="headers1">
> - <xsd:sequence>
>   <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
>   </xsd:schema>
> My configuration: 
>         JaxWsServiceFactoryBean aegisServiceFactoryBean = new JaxWsServiceFactoryBean(); 
>         aegisServiceFactoryBean.setDataBinding(new AegisDatabinding()); 
>         aegisServiceFactoryBean.setServiceConfigurations(Arrays.asList( 
>                 new org.apache.cxf.jaxws.support.JaxWsServiceConfiguration(), 
>                 new org.apache.cxf.service.factory.DefaultServiceConfiguration() 
>         )); 
>         ServerFactoryBean serverFactoryBean = new ServerFactoryBean(); 
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); 
>         serverFactoryBean.setServiceBean(implementor); 
>         serverFactoryBean.setAddress(url); 
>         serverFactoryBean.setServiceFactory(aegisServiceFactoryBean); 
> Together with bug CXF-1789  there is definitively something nasty in handling @WebParam in Aegis and SimpleFrontent.

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


[jira] Commented: (CXF-1833) Inconsistent Aegis type mapping of List<> with and without @WebParam

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635919#action_12635919 ] 

Benson Margulies commented on CXF-1833:
---------------------------------------

This is very likely a side-effect of the artificial separation of generics, non-generics, and annotations in Aegis. There may be nothing to be done about this except to refactor. Ugh.

> Inconsistent Aegis type mapping of List<> with and without @WebParam
> --------------------------------------------------------------------
>
>                 Key: CXF-1833
>                 URL: https://issues.apache.org/jira/browse/CXF-1833
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.2
>         Environment: SimpleFrontend, AegisDatabinding
>            Reporter: Jara Cesnek
>
> When adding @WebParam on List<>, WSDL types and namespaces is changed drastically. 
> 1.
>     @WebMethod
>     public void method1(List<String> headers1) {
>     }
> 2.
>     @WebMethod
>     public void method1(String[] headers1) {
>     }
> 3.
>     @WebMethod
>     public void method1( @WebParam(name = "headers1") String[] headers1) {
>     }
> 4.
>     @WebMethod
>     public void method1( @WebParam(name = "headers1") List<String> headers1) {
>     }
> Methods 1,2,3 produces equal WSDL and expected types :
> - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://v1_1_2.mcnav4connector.ws.daisy.marbes.cz" xmlns:tns="http://v1_1_2.mcnav4connector.ws.daisy.marbes.cz" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <xsd:complexType name="ArrayOfString">
> - <xsd:sequence>
>   <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
> But method 4 produces something unexpexted : 
> - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://util.java" xmlns:tns="http://util.java" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <xsd:complexType name="headers1">
> - <xsd:sequence>
>   <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
>   </xsd:schema>
> My configuration: 
>         JaxWsServiceFactoryBean aegisServiceFactoryBean = new JaxWsServiceFactoryBean(); 
>         aegisServiceFactoryBean.setDataBinding(new AegisDatabinding()); 
>         aegisServiceFactoryBean.setServiceConfigurations(Arrays.asList( 
>                 new org.apache.cxf.jaxws.support.JaxWsServiceConfiguration(), 
>                 new org.apache.cxf.service.factory.DefaultServiceConfiguration() 
>         )); 
>         ServerFactoryBean serverFactoryBean = new ServerFactoryBean(); 
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); 
>         serverFactoryBean.setServiceBean(implementor); 
>         serverFactoryBean.setAddress(url); 
>         serverFactoryBean.setServiceFactory(aegisServiceFactoryBean); 
> Together with bug CXF-1789  there is definitively something nasty in handling @WebParam in Aegis and SimpleFrontent.

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


[jira] Commented: (CXF-1833) Inconsistent Aegis type mapping of List<> with and without @WebParam

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636200#action_12636200 ] 

Benson Margulies commented on CXF-1833:
---------------------------------------

You've combined a JAX-WS service factory with a Simple server factory. I don't know what will happen, but I doubt that it will be good. If you switch to JaxWsServerFactoryBean, do you get better behavior?

> Inconsistent Aegis type mapping of List<> with and without @WebParam
> --------------------------------------------------------------------
>
>                 Key: CXF-1833
>                 URL: https://issues.apache.org/jira/browse/CXF-1833
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.2
>         Environment: SimpleFrontend, AegisDatabinding
>            Reporter: Jara Cesnek
>
> When adding @WebParam on List<>, WSDL types and namespaces is changed drastically. 
> 1.
>     @WebMethod
>     public void method1(List<String> headers1) {
>     }
> 2.
>     @WebMethod
>     public void method1(String[] headers1) {
>     }
> 3.
>     @WebMethod
>     public void method1( @WebParam(name = "headers1") String[] headers1) {
>     }
> 4.
>     @WebMethod
>     public void method1( @WebParam(name = "headers1") List<String> headers1) {
>     }
> Methods 1,2,3 produces equal WSDL and expected types :
> - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://v1_1_2.mcnav4connector.ws.daisy.marbes.cz" xmlns:tns="http://v1_1_2.mcnav4connector.ws.daisy.marbes.cz" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <xsd:complexType name="ArrayOfString">
> - <xsd:sequence>
>   <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
> But method 4 produces something unexpexted : 
> - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://util.java" xmlns:tns="http://util.java" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> - <xsd:complexType name="headers1">
> - <xsd:sequence>
>   <xsd:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="xsd:string" /> 
>   </xsd:sequence>
>   </xsd:complexType>
>   </xsd:schema>
> My configuration: 
>         JaxWsServiceFactoryBean aegisServiceFactoryBean = new JaxWsServiceFactoryBean(); 
>         aegisServiceFactoryBean.setDataBinding(new AegisDatabinding()); 
>         aegisServiceFactoryBean.setServiceConfigurations(Arrays.asList( 
>                 new org.apache.cxf.jaxws.support.JaxWsServiceConfiguration(), 
>                 new org.apache.cxf.service.factory.DefaultServiceConfiguration() 
>         )); 
>         ServerFactoryBean serverFactoryBean = new ServerFactoryBean(); 
>         serverFactoryBean.setServiceClass(AopUtils.getTargetClass(implementor)); 
>         serverFactoryBean.setServiceBean(implementor); 
>         serverFactoryBean.setAddress(url); 
>         serverFactoryBean.setServiceFactory(aegisServiceFactoryBean); 
> Together with bug CXF-1789  there is definitively something nasty in handling @WebParam in Aegis and SimpleFrontent.

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