cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juergen Kellerer (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-2139) Deserializer for complex types is not created inside the generated JavaScript client code
Date Mon, 30 Mar 2009 11:50:50 GMT

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

Juergen Kellerer updated CXF-2139:
----------------------------------

    Attachment: SchemaJavascriptBuilder.diff

Here you go. (Please ignore changed imports, I ran reformat code.. my bad.)

> Deserializer for complex types is not created inside the generated JavaScript client
code
> -----------------------------------------------------------------------------------------
>
>                 Key: CXF-2139
>                 URL: https://issues.apache.org/jira/browse/CXF-2139
>             Project: CXF
>          Issue Type: Bug
>          Components: JavaScript Client
>    Affects Versions: 2.1.4, 2.2
>         Environment: Java 1.6, ANT based build script
>            Reporter: Juergen Kellerer
>            Assignee: Benson Margulies
>         Attachments: js-patch-2.1.4.jar, SchemaJavascriptBuilder.diff
>
>
> The JavaScript client code generator successfully creates serializers and deserializers
for first level soap requests and response objects. Serializing code is also created for complex
types but the deserializer code is not created.
> Digging down the code it seems that the problem is in the class "org.apache.cxf.javascript.types.SchemaJavascriptBuilder"
the following HACK made the JS client work correctly:
> ----
>     public void domDeserializerFunction(QName name, XmlSchemaComplexType type) {
>         utils = new JavascriptUtils(code);
>         XmlSchemaSequence sequence = null;
>         sequence = XmlSchemaUtils.getSequence(type);
>         // HACK, use alternate way to get sequence
>         if (sequence.getItems().getCount() == 0) {
>                 XmlSchemaSequence s = XmlSchemaUtils.getContentSequence(type);
>                 if (s != null) {
>                         System.err.println("HACK-applied, generating deserializer for
" + name);
>                         sequence = s;
>                 }
>         }
>         // HACK-END, use alternate way to get sequence
>         String typeObjectName = nameManager.getJavascriptName(name);
> ---

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


Mime
View raw message