[
http://issues.apache.org/jira/browse/TUSCANY-141?page=comments#action_12375999
]
ant elder commented on TUSCANY-141:
-----------------------------------
This has now changed so that the problem can be fixed by moving up the
import.wsdl to be above the component in the sca.module file. (moving up the
import didn't used to fix the problem).
This still needs to be fixed but I'll lower the priority from blocker to major.
This now exposes another problem. The object returned to a J2SE client or a
component with a service refernece to a component using interface.wsdl is a
proxy which implements an interface thats dynamically generated to represent
the WSDL portType. This happens even if the client has an existing interface
gen'd from the WSDL. So the only way to use this the proxy object is something
like:
Object o = moduleContext.locateService("HelloWorldComponent");
Method m = o.getClass().getDeclaredMethod("getGreetings", new Class[]
{String.class});
String value = (String) m.invoke(o, in);
> interface.wsdl doesn't work in .componentType side files
> --------------------------------------------------------
>
> Key: TUSCANY-141
> URL: http://issues.apache.org/jira/browse/TUSCANY-141
> Project: Tuscany
> Type: Bug
> Components: Java SCA Core
> Reporter: ant elder
> Assignee: Jeremy Boynes
> Priority: Critical
>
> Using interface.wsdl in .componentType side file fails as it can't find the
> WSDL.
> It looks like the import.wsdl doesn't get processed until after the side file
> is processed. The JavaScript sample 7 can be used to recreate the problem,
> look in HelloWorldImpl.componentType and there's a commented out
> interface.wsdl, change to use that gives this exception:
> java.lang.IllegalArgumentException: Cannot find WSDL definition for
> http://helloworld.samples.tuscany.apache.org
> at
> org.apache.tuscany.model.types.wsdl.impl.WSDLServiceContractImpl.getPortType(WSDLServiceContractImpl.java:158)
> at
> org.apache.tuscany.model.types.wsdl.impl.WSDLServiceContractImpl.initialize(WSDLServiceContractImpl.java:103)
> at
> org.apache.tuscany.model.assembly.impl.PortImpl.initialize(PortImpl.java:77)
> at
> org.apache.tuscany.model.assembly.impl.ComponentTypeImpl.initialize(ComponentTypeImpl.java:117)
> at
> org.apache.tuscany.model.assembly.impl.ComponentImplementationImpl.initialize(ComponentImplementationImpl.java:62)
> at
> org.apache.tuscany.container.js.assembly.impl.JavaScriptImplementationImpl.initialize(JavaScriptImplementationImpl.java:73)
> at
> org.apache.tuscany.model.assembly.impl.ComponentImpl.initialize(ComponentImpl.java:115)
> at
> org.apache.tuscany.model.scdl.loader.impl.SCDLModelContentHandlerImpl$9.run(SCDLModelContentHandlerImpl.java:409)
> at
> org.apache.tuscany.model.util.ModelTransformerImpl.transformPass2(ModelTransformerImpl.java:122)
> at
> org.apache.tuscany.model.util.ModelTransformerImpl.transform(ModelTransformerImpl.java:42)
> at
> org.apache.tuscany.model.scdl.loader.impl.SCDLAssemblyModelLoaderImpl.transform(SCDLAssemblyModelLoaderImpl.java:198)
> at
> org.apache.tuscany.model.scdl.loader.impl.SCDLAssemblyModelLoaderImpl.loadModule(SCDLAssemblyModelLoaderImpl.java:107)
> at
> org.apache.tuscany.core.config.impl.ModuleComponentConfigurationLoaderImpl.loadModule(ModuleComponentConfigurationLoaderImpl.java:48)
> at
> org.apache.tuscany.core.config.impl.AbstractModuleComponentConfigurationLoader.loadModuleComponent(AbstractModuleComponentConfigurationLoader.java:98)
> at
> org.apache.tuscany.core.config.impl.AbstractModuleComponentConfigurationLoader.loadModuleComponent(AbstractModuleComponentConfigurationLoader.java:88)
> at
> org.apache.tuscany.core.config.impl.AbstractModuleComponentConfigurationLoader.loadModuleComponent(AbstractModuleComponentConfigurationLoader.java:61)
> at
> org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:100)
> at
> org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:64)
> at sample.Sample7Client.invoke(Sample7Client.java:38)
> at sample.Sample7TestCase.testGeetings(Sample7TestCase.java:28)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira