You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Luciano Resende (JIRA)" <tu...@ws.apache.org> on 2007/08/24 01:01:12 UTC

[jira] Resolved: (TUSCANY-1108) SDO Wsdl tooling does not handle exceptions

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

Luciano Resende resolved TUSCANY-1108.
--------------------------------------

    Resolution: Fixed

Provided wsdl added to wsdl2java test case. 
Note that, addressing a possible limitation from the JAX-WS spec, I had to rename the name of the message that described the fault to be different of the fault complex type.

> SDO Wsdl tooling does not handle exceptions
> -------------------------------------------
>
>                 Key: TUSCANY-1108
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1108
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Tools
>    Affects Versions: Java-SCA-M2
>            Reporter: Rick Rineholt
>            Assignee: Luciano Resende
>             Fix For: Java-SCA-Next
>
>         Attachments: mvn.out, pom.xml, StockExceptionTest.wsdl
>
>
> Using tuscany maven plugin tuscany-plugin-wsdl2java an exception is generated for the attached wsdl.  Note removing exceptions in the wsdl avoids the UnmatchedTypeException  This maybe due to the sdo generation producing the fault not as an exception? 
> [INFO] 
> NOTE: Maven is executing in offline mode. Any artifacts not already in your local
> repository will be inaccessible.
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [INFO] Building Test Suite Exception Handling cross bindings
> [INFO]    task-segment: [clean, install]
> [INFO] ----------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory E:\dev\tuscany\branches\sca-java-integration\testing\sca\itest\exceptionXbindingTest\target
> [INFO] [tuscany-sdo:generate {execution: default}]
> [INFO] Generating SDO interfaces from E:\dev\tuscany\branches\sca-java-integration\testing\sca\itest\exceptionXbindingTest\src\main\resources\wsdl\StockExceptionTest.wsdl
> >>  Generating code
> >>  Generating packages
> >>  Generating package ScatesttoolPackageImpl
> >>  Generating Java interface stockexceptiontestservice.scatesttool.ScatesttoolFactory
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/ScatesttoolFactory.java
> >>  Generating Java class stockexceptiontestservice.scatesttool.impl.ScatesttoolFactoryImpl
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/impl/ScatesttoolFactoryImpl.java
> >>  Generating Invalid Symbol Fault
> >>  Generating Java interface stockexceptiontestservice.scatesttool.InvalidSymbolFault
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/InvalidSymbolFault.java
> >>  Generating Java class stockexceptiontestservice.scatesttool.impl.InvalidSymbolFaultImpl
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/impl/InvalidSymbolFaultImpl.java
> >>  Generating Market Closed Fault
> >>  Generating Java interface stockexceptiontestservice.scatesttool.MarketClosedFault
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/MarketClosedFault.java
> >>  Generating Java class stockexceptiontestservice.scatesttool.impl.MarketClosedFaultImpl
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/impl/MarketClosedFaultImpl.java
> >>  Generating Stock Offer
> >>  Generating Java interface stockexceptiontestservice.scatesttool.StockOffer
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/StockOffer.java
> >>  Generating Java class stockexceptiontestservice.scatesttool.impl.StockOfferImpl
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/impl/StockOfferImpl.java
> >>  Generating stock Quote Offer
> >>  Generating Java interface stockexceptiontestservice.scatesttool.stockQuoteOffer
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/stockQuoteOffer.java
> >>  Generating Java class stockexceptiontestservice.scatesttool.impl.stockQuoteOfferImpl
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/impl/stockQuoteOfferImpl.java
> >>  Generating stock Quote Offer Response
> >>  Generating Java interface stockexceptiontestservice.scatesttool.stockQuoteOfferResponse
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/stockQuoteOfferResponse.java
> >>  Generating Java class stockexceptiontestservice.scatesttool.impl.stockQuoteOfferResponseImpl
> >>  Generating /TargetProject/stockexceptiontestservice/scatesttool/impl/stockQuoteOfferResponseImpl.java
> [INFO] [tuscanywsdl2java:generate {execution: default}]
> [INFO] Generating Java service interfaces from E:\dev\tuscany\branches\sca-java-integration\testing\sca\itest\exceptionXbindingTest\src\main\resources\wsdl\StockExceptionTest.wsdl
> log4j:WARN No appenders could be found for logger (org.apache.axis2.i18n.ProjectResourceBundle).
> log4j:WARN Please initialize the log4j system properly.
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name MarketClosedFault with namespace http://scatesttool.stockexceptiontestservice
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.IllegalArgumentException: org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name MarketClosedFault with namespace http://scatesttool.stockexceptiontestservice
> 	at org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator.generateFromWSDL(WSDL2JavaGenerator.java:244)
> 	at org.apache.tuscany.tools.wsdl2java.plugin.WSDL2JavaGeneratorMojo.execute(WSDL2JavaGeneratorMojo.java:134)
> 	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
> 	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name MarketClosedFault with namespace http://scatesttool.stockexceptiontestservice
> 	at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:178)
> 	at org.apache.tuscany.tools.wsdl2java.generate.WSDL2JavaGenerator.generateFromWSDL(WSDL2JavaGenerator.java:242)
> 	... 19 more
> Caused by: org.apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name MarketClosedFault with namespace http://scatesttool.stockexceptiontestservice
> 	at org.apache.axis2.wsdl.databinding.TypeMappingAdapter.getTypeMappingName(TypeMappingAdapter.java:73)
> 	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2048)
> 	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:1957)
> 	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:1708)
> 	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:1623)
> 	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface(AxisServiceBasedMultiLanguageEmitter.java:830)
> 	at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceEmitter.writeInterface(JavaInterfaceEmitter.java:196)
> 	at org.apache.tuscany.tools.wsdl2java.generate.JavaInterfaceGenerator.generate(JavaInterfaceGenerator.java:174)
> 	... 20 more
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 5 seconds
> [INFO] Finished at: Tue Feb 13 07:58:43 EST 2007
> [INFO] Final Memory: 10M/254M
> [INFO] ------------------------------------------------------------------------

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org