You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "David J. M. Karlsen (JIRA)" <ji...@apache.org> on 2010/12/08 20:45:01 UTC

[jira] Created: (CXF-3175) Unmarshalling does not follow JAXB rules.

Unmarshalling does not follow JAXB rules.
-----------------------------------------

                 Key: CXF-3175
                 URL: https://issues.apache.org/jira/browse/CXF-3175
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 2.3.1
            Reporter: David J. M. Karlsen
            Priority: Blocker


I have a soapheader element which is declared as:
{noformat}
    <xsd:complexType name="EDBHeaderType">
        <xsd:sequence>
            <xsd:element name="SourceApplication" type="xsd:string">
            </xsd:element>
{noformat}

The JAXB2 generated code (through the cxf-codegen maven plugin will be:
{noformat}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EDBHeaderType", propOrder = {
    "sourceApplication"
})
public class EDBHeaderType {

    @XmlElement(name = "SourceApplication", required = true)
    protected String sourceApplication;
{noformat}

which is OK, BUT - then I get this on service invocation from a client:
{noformat}
Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://edb.com/ws/WSCommon_v21", local:"SourceApplication"). Expected elements are <{http://edb.com<{http://edb.com/ws/WSCommon_v21}sourceApplication>
{noformat}

Check the casing! It expects lowercase elements, although they are declared uppercase. This is not correct.
If I change it to lowercase it will in fact pass validation (but not adhere to the schema which declared it).

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


[jira] Updated: (CXF-3175) Unmarshalling does not follow JAXB rules.

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

Daniel Kulp updated CXF-3175:
-----------------------------

    Fix Version/s: NeedMoreInfo


I tried to reproduce this and couldn't.   Can you create a small test case and attach it?

The common cause of something like this would be a classloader issue with the jaxb annotations in OSGi.  Not sure if that would be your case though.

> Unmarshalling does not follow JAXB rules.
> -----------------------------------------
>
>                 Key: CXF-3175
>                 URL: https://issues.apache.org/jira/browse/CXF-3175
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.3.1
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>             Fix For: NeedMoreInfo
>
>
> I have a soapheader element which is declared as:
> {noformat}
>     <xsd:complexType name="EDBHeaderType">
>         <xsd:sequence>
>             <xsd:element name="SourceApplication" type="xsd:string">
>             </xsd:element>
> {noformat}
> The JAXB2 generated code (through the cxf-codegen maven plugin will be:
> {noformat}
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name = "EDBHeaderType", propOrder = {
>     "sourceApplication"
> })
> public class EDBHeaderType {
>     @XmlElement(name = "SourceApplication", required = true)
>     protected String sourceApplication;
> {noformat}
> which is OK, BUT - then I get this on service invocation from a client:
> {noformat}
> Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://edb.com/ws/WSCommon_v21", local:"SourceApplication"). Expected elements are <{http://edb.com<{http://edb.com/ws/WSCommon_v21}sourceApplication>
> {noformat}
> Check the casing! It expects lowercase elements, although they are declared uppercase. This is not correct.
> If I change it to lowercase it will in fact pass validation (but not adhere to the schema which declared it).

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


[jira] Resolved: (CXF-3175) Unmarshalling does not follow JAXB rules.

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

Daniel Kulp resolved CXF-3175.
------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: NeedMoreInfo)


Cannot reproduce and request for testcase unanswered for over 2 months.

> Unmarshalling does not follow JAXB rules.
> -----------------------------------------
>
>                 Key: CXF-3175
>                 URL: https://issues.apache.org/jira/browse/CXF-3175
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.3.1
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>
> I have a soapheader element which is declared as:
> {noformat}
>     <xsd:complexType name="EDBHeaderType">
>         <xsd:sequence>
>             <xsd:element name="SourceApplication" type="xsd:string">
>             </xsd:element>
> {noformat}
> The JAXB2 generated code (through the cxf-codegen maven plugin will be:
> {noformat}
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name = "EDBHeaderType", propOrder = {
>     "sourceApplication"
> })
> public class EDBHeaderType {
>     @XmlElement(name = "SourceApplication", required = true)
>     protected String sourceApplication;
> {noformat}
> which is OK, BUT - then I get this on service invocation from a client:
> {noformat}
> Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://edb.com/ws/WSCommon_v21", local:"SourceApplication"). Expected elements are <{http://edb.com<{http://edb.com/ws/WSCommon_v21}sourceApplication>
> {noformat}
> Check the casing! It expects lowercase elements, although they are declared uppercase. This is not correct.
> If I change it to lowercase it will in fact pass validation (but not adhere to the schema which declared it).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira