You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Aaron Gourley (JIRA)" <ji...@apache.org> on 2008/05/04 17:36:56 UTC

[jira] Commented: (AXIS2-3635) Compilation errors encountered when using XMLBeans databinding with unwrapping enabled

    [ https://issues.apache.org/jira/browse/AXIS2-3635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594099#action_12594099 ] 

Aaron Gourley commented on AXIS2-3635:
--------------------------------------

Upon furthur investigation, I'm convinced that there is no "easy" fix for these issues in 1.4.  Some of the issues are fixed by my proposition, but not the new ones.

I found that in Axis2 1.3 the response objects are not unwrapped when unwrapping is enabled, so the code compiled fine and was only mildly inconvenient since manual unwrapping of responses was required.

Axis2 1.4 saw a bunch of checks added to a bunch of the main XSLTs.  Searching the codegen module for "=0) and ($isUnwrapParameters)" should find all of the occurrences.  The ones I found are:
MessageReceiver.xsl: ($returnparamcount=0) and ($isUnwrapParameters)
InterfaceTemplate.xsl: ($outputparamcount=0) and ($isUnwrapParameters)
InterfaceImplementationTemplate.xsl: ($outputparamcount=0) and ($isUnwrapParameters)
SkeletonInterfaceTemplate.xsl: ($outputparamcount=0) and ($isUnwrapParameters)
SkeletonTemplate.xsl: ($outputparamcount=0) and ($isUnwrapParameters)
CallbackHandlerTemplate.xsl: ($outParamCount=0) and ($isUnwrapParameters)

The problem introduced here is that the param count is ALWAYS 0 when the xmlbeans databinding is used, because it is ONLY initialized for the adb databinding (see org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension:110-116 "//TODO: support xmlbeans").  As a result, all methods are generated as 'void' methods.

Removing the explicit "adb" check in the SchemaUnwrapperExtension allowed me to generate the unwrapped code, but unfortunately the XmlbeansDatabindingTemplate.xsl needs a plethora of getXXX() and wrapXXX() methods added.  The ADBDatabindingTemplate.xsl can be referred to when trying to determine which ones are missing.

Hope this helps you get closer to resolving the issue.  Let me know if you need me to clarify anything.

> Compilation errors encountered when using XMLBeans databinding with unwrapping enabled
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3635
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3635
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen, databinding
>    Affects Versions: 1.4, 1.3
>            Reporter: Aaron Gourley
>            Assignee: Amila Chinthaka Suriarachchi
>         Attachments: parlayx.zip, XmlbeansDatabindingTemplate-modified.xsl
>
>
> Attaching modified version of Axis2 1.3's XmlbeansDatabindingTemplate.xsl and WSDL used to exploit this bug.  This fix worked for me in Axis2 1.3, and the bug still exists in 1.4 RC1.
> Axis2 1.4 RC1 seems to have new issues too:
> 1. Skeleton/SkeletonInterface methods are incorrectly generated with void return types when XMLBeans databinding is used with unwrapping enabled.  The return types are correct with unwrapping disabled.  They are also correct when using ADB in both scenarios.
> 2. A call to an invalid wrapXXX() method is generated (possibly related to the void return type issue).

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org