Hi,

I have been looking into Java2WSDL in Tuscany.  The relationship between
what we have in Tuscany to that in Axis2 is that the Tuscany one is a
wrapper.  We started doing this because during the M1 time there were a
couple of things that need to be fixed in Axis2.  We did that under the
covers of the Tuscany wrapper.

Later down, things started improving in the Axis2 code but did have trouble
(relatively less though) with duplicate schema definitions and so on.   So
the wrapper continued to take care of this.

Further down the line we had the requirement to support SDO types and call
into the SDO implemenations XSDHelper for this.  So this again had to be
done in the wrapper.

I have been following the Axis2 Java2WSDL for sometime now and I think this
Tuscany wrapper can be thinned down quite a bit.. just to take care of the
SDO types.  I hope to get to this soon.

I suppose the WSDL2Java should have a similar story.

- Venkat

On 11/30/06, Matthew Sykes <[EMAIL PROTECTED]> wrote:

I've been playing with the BigBank sample and have added a fault to the
AccountService's withdraw operation.  After changing the
AccountService.wsdl (attached), the Tuscany WSDL2Java no longer works.
(Exception from the build is below.)

When I took a quick look at the code, it seemed that the Tuscany code
does some configuration of the axis2 code generation and then delegates
the majority of the work to it.

Does anyone have any ideas of what's going on here?  The axis code is
looking in a map of QName to Name but the only map that's been populated
is a map of QName to SDODataBindingTypeMappingEntry objects.  The
WSDL2Java from axis2 seems to work okay with the same WSDL.

On a somewhat related note, what is the intended relationship between
the Tuscany WSDL2Java and Java2WSDL tools to the tools provided by axis2?

Thanks!

[INFO] Generating Java service interfaces from

/home/sykesm/oss-code/tuscany/sca-java-M2/samples/applications/bigbank/account/src/main/resources/wsdl/AccountService.wsdl
[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 insufficientFundsFault with namespace
http://www.bigbank.com/account
[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 insufficientFundsFault with namespace
http://www.bigbank.com/account
         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
:64)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:615)
         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 insufficientFundsFault with namespace
http://www.bigbank.com/account
         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 insufficientFundsFault with namespace
http://www.bigbank.com/account
         at
org.apache.axis2.wsdl.databinding.TypeMappingAdapter.getTypeMappingName(
TypeMappingAdapter.java:73)
         at

org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements
(AxisServiceBasedMultiLanguageEmitter.java:1958)
         at

org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement
(AxisServiceBasedMultiLanguageEmitter.java:1867)
         at

org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement
(AxisServiceBasedMultiLanguageEmitter.java:1618)
         at

org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations
(AxisServiceBasedMultiLanguageEmitter.java:1533)
         at

org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForInterface
(AxisServiceBasedMultiLanguageEmitter.java:740)
         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

--
Matthew Sykes


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to