Hi,
There are a few issues in the test case:
1) The impl class is annotated with @Remotable instead of @Service
2) The QName of the composite doesn't match what's in the test case
3) The service name under <component> doesn't match the one from the
introspected componentType
And the Amazon WSDL is tricky as it returns more than child elements in the
response wrapper. I have to force the java interface to BARE style (passing
the wrappers directly).
There are also a few issues in the code.
a) The databinding introspection doesn't filter out the methods on
Object.class (the path was triggered by 1) as the impl class becomes the
interface). That's why NPE is thrown.
b) For BARE-style java interface, no unwrapped type is available and we
should skip the compatibility check.
c) The Databinding framework doesn't handle null request/response wrappers
well. (I worked it around by passing non-null data in the test case).
After fixing all these issues, I got the test case working. I need to run a
full build before checking the changes.
Thanks,
Raymond
----- Original Message -----
From: "Jean-Sebastien Delfino" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, November 15, 2007 9:06 AM
Subject: Re: Amazon Cart
Antollini, Mario wrote:
Jean-Sebastien,
I added the amazon cart to jire:
https://issues.apache.org/jira/secure/attachment/12369533/tutorial-amazo
n.zip
Sadly, I could not get the test running, therefore I am not sure it will
run properly.
I committed your new module with the following minor changes:
- Grouped amazon-cart-api and amazon-cart into one module, as an SCA
contribution cannot span 2 Maven modules and using 2 SCA contributions
with a dependency and an SCA <import> of the WSDL namespace would probably
complicate the tutorial at this point.
- Changed the test case to use the same node API as you were using in the
Launcher.
- Fixed some of the dependencies and added missing license headers.
I am now able to start the test case and the launcher but running into the
following exception:
Caused by: java.lang.NullPointerException
at
org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor.processInterface(DataBindingJavaInterfaceProcessor.java:97)
at
org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor.visitInterface(DataBindingJavaInterfaceProcessor.java:59)
at
org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceIntrospectorImpl.introspectInterface(JavaInterfaceIntrospectorImpl.java:90)
at
org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl.createJavaInterface(JavaInterfaceFactoryImpl.java:48)
at
org.apache.tuscany.sca.implementation.java.introspect.impl.HeuristicPojoProcessor.createService(HeuristicPojoProcessor.java:568)
at
org.apache.tuscany.sca.implementation.java.introspect.impl.HeuristicPojoProcessor.addService(HeuristicPojoProcessor.java:127)
at
org.apache.tuscany.sca.implementation.java.introspect.impl.HeuristicPojoProcessor.visitEnd(HeuristicPojoProcessor.java:106)
at
org.apache.tuscany.sca.implementation.java.impl.JavaClassIntrospectorImpl.introspectClass(JavaClassIntrospectorImpl.java:109)
at
org.apache.tuscany.sca.implementation.java.impl.JavaImplementationFactoryImpl.createJavaImplementation(JavaImplementationFactoryImpl.java:53)
at
org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.resolve(JavaImplementationProcessor.java:133)
at
org.apache.tuscany.sca.implementation.java.xml.JavaImplementationProcessor.resolve(JavaImplementationProcessor.java:1)
at
org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint$LazyStAXArtifactProcessor.resolve(DefaultStAXArtifactProcessorExtensionPoint.java:212)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:108)
at
org.apache.tuscany.sca.assembly.xml.BaseAssemblyProcessor.resolveImplementation(BaseAssemblyProcessor.java:236)
at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:730)
at
org.apache.tuscany.sca.assembly.xml.CompositeProcessor.resolve(CompositeProcessor.java:1)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor.resolve(ExtensibleStAXArtifactProcessor.java:108)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:113)
at
org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor.resolve(CompositeDocumentProcessor.java:1)
at
org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor.resolve(ExtensibleURLArtifactProcessor.java:86)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.processResolvePhase(ContributionServiceImpl.java:415)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.addContribution(ContributionServiceImpl.java:329)
at
org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl.contribute(ContributionServiceImpl.java:165)
at
org.apache.tuscany.sca.node.impl.SCANodeImpl.addContribution(SCANodeImpl.java:302)
... 22 more
The good news is that it goes way further than before before hitting an
issue with the DataBinding stuff. Could some of the folks working on
databindings please help understand that Exception? Thanks.
Once we get past that error, I guess you'll need to add more meat to the
test case to create an SDO etc. Also could you please try to configure the
surefireplugin to pick /**/*TestCase.java?
Thanks!
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]