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 "Mohamed Nufail (Commented) (JIRA)" <ji...@apache.org> on 2011/09/30 10:43:45 UTC

[jira] [Commented] (AXIS2-4028)

wsdl2java with JiBX binding
 cannot unwrap integer param
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394


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

Mohamed Nufail commented on AXIS2-4028:
---------------------------------------

The type should be set to int not integer. So it should be,

  <element name="isbn" type="int"/>


It works when the type as int.
                
> 	
wsdl2java with JiBX binding cannot unwrap integer param
> ---------------------------------------------------------
>
>                 Key: AXIS2-4028
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4028
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4
>            Reporter: don t
>            Assignee: Dennis Sosnoski
>              Labels: jibx
>         Attachments: library.wsdl
>
>
> 1. Use Axis2 1.4
> 2. Download Axis2 jibx example http://www.sosnoski.com/jibx-wiki/space/axis2-jibx/example/jibx-library.zip
> 3. Unzip it and configure axis_home and jibx-home
> 4. In library.wsdl (see attached) change line 18 from
>                 <element name="isbn" type="string"/>
>         to
>                
>                 <element name="isbn" type="integer"/>
> 5. Run ant generate-server
>      [java] Retrieving document at './library.wsdl'.
>      [java] log4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL11ToAxisServiceBuilder).
>      [java] log4j:WARN Please initialize the log4j system properly.
>      [java] Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: Cannot unwrap element {http://ws.sosnoski.com/library/wsdl}getBook: no format definition found for type {http://www.w3.org/2001/XMLSchema}integer (used by element {http://ws.sosnoski.com/library/wsdl}isbn)
>      [java]     at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
>      [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>      [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
>      [java] Caused by: java.lang.RuntimeException: Cannot unwrap element {http://ws.sosnoski.com/library/wsdl}getBook: no format definition found for type {http://www.w3.org/2001/XMLSchema}integer (used by element {http://ws.sosnoski.com/library/wsdl}isbn)
>      [java]     at org.apache.axis2.jibx.CodeGenerationUtility.unwrapMessage(CodeGenerationUtility.java:801)
>      [java]     at org.apache.axis2.jibx.CodeGenerationUtility.engage(CodeGenerationUtility.java:387)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>      [java]     at java.lang.reflect.Method.invoke(Method.java:597)
>      [java]     at org.apache.axis2.wsdl.codegen.extension.JiBXExtension.engage(JiBXExtension.java:77)
>      [java]     at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>      [java]     ... 2 more 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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