You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Eric Pederson (JIRA)" <ji...@apache.org> on 2010/04/18 22:53:49 UTC

[jira] Created: (CXF-2769) Must use Java static nested class for faultbean when using JAX-WS java first

Must use Java static nested class for faultbean when using JAX-WS java first
----------------------------------------------------------------------------

                 Key: CXF-2769
                 URL: https://issues.apache.org/jira/browse/CXF-2769
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.2.7
            Reporter: Eric Pederson


You have to use a Java static nested class of the Exception class for a faultbean when using JAX-WS java first.   All other types of classes result in errors of the type
org.apache.cxf.interceptor.Fault: Could not find JAXB information for bean class <bean class> in context.   Make sure it follows JAXB conventions.

You should be able to use any class if it follows the guidelines of JAX-WS section 3.7  

Better yet CXF should be able to generate the bean classes off the Exception classes dynamically.

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


[jira] Updated: (CXF-2769) Must use Java static nested class for faultbean when using JAX-WS java first

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

Eric Pederson updated CXF-2769:
-------------------------------

    Attachment: cxf2769.tar

Yes, you're right.   I apologize.   I could have sworn I tried that.

I removed the non-static nested version (HelloFault2) and kept the un-nested version (HelloFault3).  The demo now works with both versions.  I've re-attached for anyone else who is interested.

-- Eric

> Must use Java static nested class for faultbean when using JAX-WS java first
> ----------------------------------------------------------------------------
>
>                 Key: CXF-2769
>                 URL: https://issues.apache.org/jira/browse/CXF-2769
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.7
>            Reporter: Eric Pederson
>         Attachments: cxf2769.tar
>
>
> You have to use a Java static nested class of the Exception class for a faultbean when using JAX-WS java first.   All other types of classes result in errors of the type
> org.apache.cxf.interceptor.Fault: Could not find JAXB information for bean class <bean class> in context.   Make sure it follows JAXB conventions.
> You should be able to use any class if it follows the guidelines of JAX-WS section 3.7  
> Better yet CXF should be able to generate the bean classes off the Exception classes dynamically.

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


[jira] Updated: (CXF-2769) Must use Java static nested class for faultbean when using JAX-WS java first

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

Eric Pederson updated CXF-2769:
-------------------------------

    Attachment:     (was: cxf2769.tar)

> Must use Java static nested class for faultbean when using JAX-WS java first
> ----------------------------------------------------------------------------
>
>                 Key: CXF-2769
>                 URL: https://issues.apache.org/jira/browse/CXF-2769
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.7
>            Reporter: Eric Pederson
>         Attachments: cxf2769.tar
>
>
> You have to use a Java static nested class of the Exception class for a faultbean when using JAX-WS java first.   All other types of classes result in errors of the type
> org.apache.cxf.interceptor.Fault: Could not find JAXB information for bean class <bean class> in context.   Make sure it follows JAXB conventions.
> You should be able to use any class if it follows the guidelines of JAX-WS section 3.7  
> Better yet CXF should be able to generate the bean classes off the Exception classes dynamically.

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


[jira] Commented: (CXF-2769) Must use Java static nested class for faultbean when using JAX-WS java first

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

Daniel Kulp commented on CXF-2769:
----------------------------------


Can you provide a test case?    The TCK specificially does test these types of things and we have all kinds of unit and system tests as well where the beans aren't nested classes.

> Must use Java static nested class for faultbean when using JAX-WS java first
> ----------------------------------------------------------------------------
>
>                 Key: CXF-2769
>                 URL: https://issues.apache.org/jira/browse/CXF-2769
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.7
>            Reporter: Eric Pederson
>
> You have to use a Java static nested class of the Exception class for a faultbean when using JAX-WS java first.   All other types of classes result in errors of the type
> org.apache.cxf.interceptor.Fault: Could not find JAXB information for bean class <bean class> in context.   Make sure it follows JAXB conventions.
> You should be able to use any class if it follows the guidelines of JAX-WS section 3.7  
> Better yet CXF should be able to generate the bean classes off the Exception classes dynamically.

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


[jira] Resolved: (CXF-2769) Must use Java static nested class for faultbean when using JAX-WS java first

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

Daniel Kulp resolved CXF-2769.
------------------------------

    Fix Version/s: Invalid
       Resolution: Not A Problem

> Must use Java static nested class for faultbean when using JAX-WS java first
> ----------------------------------------------------------------------------
>
>                 Key: CXF-2769
>                 URL: https://issues.apache.org/jira/browse/CXF-2769
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.7
>            Reporter: Eric Pederson
>             Fix For: Invalid
>
>         Attachments: cxf2769.tar
>
>
> You have to use a Java static nested class of the Exception class for a faultbean when using JAX-WS java first.   All other types of classes result in errors of the type
> org.apache.cxf.interceptor.Fault: Could not find JAXB information for bean class <bean class> in context.   Make sure it follows JAXB conventions.
> You should be able to use any class if it follows the guidelines of JAX-WS section 3.7  
> Better yet CXF should be able to generate the bean classes off the Exception classes dynamically.

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


[jira] Commented: (CXF-2769) Must use Java static nested class for faultbean when using JAX-WS java first

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

Daniel Kulp commented on CXF-2769:
----------------------------------


Actually, this is working per spec.    Per spec, the beans the JAXB creates MUST have a default, no arg constructor.   It's impossible to have that with a non-static nested class as there is always an implied pointer to the outer as the first arg to the constructors.    You cannot instantiate an instance of the inner class outside the scope of the outter class.   That is required by JAXB.

HelloFault3 is already working as far as I can tell.   

That said, per spec, if you are using a faultDetails thing, you SHOULD have a constructor of:

public HelloFault(String msg, HelloFaultDetails details)  {
....
}

That would be called by the runtime when it's being unmarshalled.   Without that constructor, we try to go through a bunch of reflection things to copy the data into the fields and such.   Not the most reliable.   




> Must use Java static nested class for faultbean when using JAX-WS java first
> ----------------------------------------------------------------------------
>
>                 Key: CXF-2769
>                 URL: https://issues.apache.org/jira/browse/CXF-2769
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.7
>            Reporter: Eric Pederson
>         Attachments: cxf2769.tar
>
>
> You have to use a Java static nested class of the Exception class for a faultbean when using JAX-WS java first.   All other types of classes result in errors of the type
> org.apache.cxf.interceptor.Fault: Could not find JAXB information for bean class <bean class> in context.   Make sure it follows JAXB conventions.
> You should be able to use any class if it follows the guidelines of JAX-WS section 3.7  
> Better yet CXF should be able to generate the bean classes off the Exception classes dynamically.

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


[jira] Updated: (CXF-2769) Must use Java static nested class for faultbean when using JAX-WS java first

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

Eric Pederson updated CXF-2769:
-------------------------------

    Attachment: cxf2769.tar

Attached.   This is a modified version of the java_first_spring_support sample.

Run mvn -Pserver to run the server and mvn -Pclient to run the client

If you can tell me how to get HelloFault2 and/or HelloFault3 working that would be great. 

I'm always getting errors like: 
org.apache.cxf.interceptor.Fault: Could not find JAXB information for bean class demo.spring.HelloFault2$HelloFault2Details in context.   Make sure it follows JAXB conventions.

By working I mean the included client and server works and the WSDL is good (for non-java clients).

Thanks!

> Must use Java static nested class for faultbean when using JAX-WS java first
> ----------------------------------------------------------------------------
>
>                 Key: CXF-2769
>                 URL: https://issues.apache.org/jira/browse/CXF-2769
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.7
>            Reporter: Eric Pederson
>         Attachments: cxf2769.tar
>
>
> You have to use a Java static nested class of the Exception class for a faultbean when using JAX-WS java first.   All other types of classes result in errors of the type
> org.apache.cxf.interceptor.Fault: Could not find JAXB information for bean class <bean class> in context.   Make sure it follows JAXB conventions.
> You should be able to use any class if it follows the guidelines of JAX-WS section 3.7  
> Better yet CXF should be able to generate the bean classes off the Exception classes dynamically.

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