You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Valdemar Mejstad (JIRA)" <ji...@apache.org> on 2008/12/02 10:42:44 UTC

[jira] Created: (CXF-1930) JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag

JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag
-------------------------------------------------------------------------------

                 Key: CXF-1930
                 URL: https://issues.apache.org/jira/browse/CXF-1930
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 2.1.3
            Reporter: Valdemar Mejstad


I'm having trouble getting JAX-WS with JAXB databinding to work with the configuration option for using anonymous wrapper types:

JaxWsServerFactoryBean serverFactory = new JaxWsServerFactoryBean();
// set address, service class etc...
serverFactory.getServiceFactory().setAnonymousWrapperTypes(true);
serverFactory.create();

Doing this doesn't result in the expected results (there are still separate named complex types besides the elements in the WSDL).

It seems to work fine with the simple frontend + aegis databinding.

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


[jira] Commented: (CXF-1930) JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652900#action_12652900 ] 

Daniel Kulp commented on CXF-1930:
----------------------------------


OK.   I was on the right track, but not quite.   For anonymous types, you have to generate the XmlType annotation, but set the name attribute to an empty string.

         av0 = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlType;", true);
         if (!anonymous) {
            av0.visit("name", wrapperElement.getLocalPart());
            av0.visit("namespace", wrapperElement.getNamespaceURI());
        } else {
            av0.visit("name", "");
        }
        av0.visitEnd();

Will commit once tests done running.


> JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag
> -------------------------------------------------------------------------------
>
>                 Key: CXF-1930
>                 URL: https://issues.apache.org/jira/browse/CXF-1930
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.3
>            Reporter: Valdemar Mejstad
>
> I'm having trouble getting JAX-WS with JAXB databinding to work with the configuration option for using anonymous wrapper types:
> JaxWsServerFactoryBean serverFactory = new JaxWsServerFactoryBean();
> // set address, service class etc...
> serverFactory.getServiceFactory().setAnonymousWrapperTypes(true);
> serverFactory.create();
> Doing this doesn't result in the expected results (there are still separate named complex types besides the elements in the WSDL).
> It seems to work fine with the simple frontend + aegis databinding.

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


[jira] Commented: (CXF-1930) JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652401#action_12652401 ] 

Daniel Kulp commented on CXF-1930:
----------------------------------


Any chance you could attach a small project that shows the issue.   That would make debugging this quite  a bit easier.


> JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag
> -------------------------------------------------------------------------------
>
>                 Key: CXF-1930
>                 URL: https://issues.apache.org/jira/browse/CXF-1930
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.3
>            Reporter: Valdemar Mejstad
>
> I'm having trouble getting JAX-WS with JAXB databinding to work with the configuration option for using anonymous wrapper types:
> JaxWsServerFactoryBean serverFactory = new JaxWsServerFactoryBean();
> // set address, service class etc...
> serverFactory.getServiceFactory().setAnonymousWrapperTypes(true);
> serverFactory.create();
> Doing this doesn't result in the expected results (there are still separate named complex types besides the elements in the WSDL).
> It seems to work fine with the simple frontend + aegis databinding.

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


[jira] Commented: (CXF-1930) JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag

Posted by "Valdemar Mejstad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652326#action_12652326 ] 

Valdemar Mejstad commented on CXF-1930:
---------------------------------------

Reply by mail from Daniel Kulp:

{quote}
I see the problem.   With 2.1.x, if ASM is on the classpath, we use ASM to
generate jaxb wrapper beans in memory and then let JAXB generate the schema.
However, those generated wrapper beans aren't honoring that flag.

If you pull asm off the classpath, it probably will generate what you expect.

I THINK the problem is at line 197 of WrapperClassGenerator.    It needs to
wrap the creation of the XmlType element with a call into the service factory
bean (it's a field on the WrapperClassGenerator) to check that flag and not
generate that annotation if true.

Could you log a JIRA for that (feel free to assign to me)?   If you have the
ability to checkout the source and build it, it would be great if you could
give that fix a try as well and attache a patch.

I'm busy for the next couple days and won't get a chance to look at it
immediately so I want to make sure it doesn't get lost.
{quote}

> JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag
> -------------------------------------------------------------------------------
>
>                 Key: CXF-1930
>                 URL: https://issues.apache.org/jira/browse/CXF-1930
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.3
>            Reporter: Valdemar Mejstad
>
> I'm having trouble getting JAX-WS with JAXB databinding to work with the configuration option for using anonymous wrapper types:
> JaxWsServerFactoryBean serverFactory = new JaxWsServerFactoryBean();
> // set address, service class etc...
> serverFactory.getServiceFactory().setAnonymousWrapperTypes(true);
> serverFactory.create();
> Doing this doesn't result in the expected results (there are still separate named complex types besides the elements in the WSDL).
> It seems to work fine with the simple frontend + aegis databinding.

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


[jira] Commented: (CXF-1930) JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag

Posted by "Valdemar Mejstad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652941#action_12652941 ] 

Valdemar Mejstad commented on CXF-1930:
---------------------------------------

Thank you for fixing this.

> JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag
> -------------------------------------------------------------------------------
>
>                 Key: CXF-1930
>                 URL: https://issues.apache.org/jira/browse/CXF-1930
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.3
>            Reporter: Valdemar Mejstad
>            Assignee: Daniel Kulp
>             Fix For: 2.1.4
>
>
> I'm having trouble getting JAX-WS with JAXB databinding to work with the configuration option for using anonymous wrapper types:
> JaxWsServerFactoryBean serverFactory = new JaxWsServerFactoryBean();
> // set address, service class etc...
> serverFactory.getServiceFactory().setAnonymousWrapperTypes(true);
> serverFactory.create();
> Doing this doesn't result in the expected results (there are still separate named complex types besides the elements in the WSDL).
> It seems to work fine with the simple frontend + aegis databinding.

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


[jira] Commented: (CXF-1930) JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag

Posted by "Valdemar Mejstad (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652333#action_12652333 ] 

Valdemar Mejstad commented on CXF-1930:
---------------------------------------

I tried both pulling the asm-jar from the classpath and patching WrapperClassGenerator, but couldn't get any of those two "fixes" to work. 

> JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag
> -------------------------------------------------------------------------------
>
>                 Key: CXF-1930
>                 URL: https://issues.apache.org/jira/browse/CXF-1930
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.3
>            Reporter: Valdemar Mejstad
>
> I'm having trouble getting JAX-WS with JAXB databinding to work with the configuration option for using anonymous wrapper types:
> JaxWsServerFactoryBean serverFactory = new JaxWsServerFactoryBean();
> // set address, service class etc...
> serverFactory.getServiceFactory().setAnonymousWrapperTypes(true);
> serverFactory.create();
> Doing this doesn't result in the expected results (there are still separate named complex types besides the elements in the WSDL).
> It seems to work fine with the simple frontend + aegis databinding.

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


[jira] Resolved: (CXF-1930) JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag

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

Daniel Kulp resolved CXF-1930.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.4
         Assignee: Daniel Kulp

> JAX-WS + JAXB does not honor the service factory isAnonymousWrapperTypes() flag
> -------------------------------------------------------------------------------
>
>                 Key: CXF-1930
>                 URL: https://issues.apache.org/jira/browse/CXF-1930
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.3
>            Reporter: Valdemar Mejstad
>            Assignee: Daniel Kulp
>             Fix For: 2.1.4
>
>
> I'm having trouble getting JAX-WS with JAXB databinding to work with the configuration option for using anonymous wrapper types:
> JaxWsServerFactoryBean serverFactory = new JaxWsServerFactoryBean();
> // set address, service class etc...
> serverFactory.getServiceFactory().setAnonymousWrapperTypes(true);
> serverFactory.create();
> Doing this doesn't result in the expected results (there are still separate named complex types besides the elements in the WSDL).
> It seems to work fine with the simple frontend + aegis databinding.

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