I'm trying to get the code working so that the interfaces of remote
endpoints are available for
EndpointReferenceBinderImpl.haveMatchingInterfaceContracts to do
matching validation for remote endpoints. The endpoints in the domain
registry now include a String of the WSDL for their interface so it
should just be a matter of turning that WSDL string back into a
configured WSDLInterfaceContract object, but i can't get that to work.
Initially i thought i must just be doing it wrong so changed the code
to write the wsdl string to a file and then read that in using the
same code as the Tuscany contribution processing uses for wsdl which
seemed to work ok but it turns out only with an IBM JDK and a Sun JDK
has the same issue. The problem is that the schema objects for the
wsdl types don't seem to get built or are build incorrectly so the
message types don't get found. The code is at [1] and an exception you
see when running the samples\getting-started\helloworld-scaclient
testcase.

Does anyone have any ideas on whats wrong or a better way to code this?

   ...ant

[1] 
https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/WSDLHelper.java


org.apache.tuscany.sca.interfacedef.wsdl.impl.InvalidWSDLException:
Element cannot be resolved: {http://sample/}sayHello
        at 
org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl$WSDLPart.<init>(WSDLOperationIntrospectorImpl.java:276)
        at 
org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getMessageType(WSDLOperationIntrospectorImpl.java:194)
        at 
org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getInputType(WSDLOperationIntrospectorImpl.java:145)
        at 
org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLOperationIntrospectorImpl.getOperation(WSDLOperationIntrospectorImpl.java:214)
        at 
org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceIntrospectorImpl.getOperation(WSDLInterfaceIntrospectorImpl.java:87)
        at 
org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceIntrospectorImpl.introspectOperations(WSDLInterfaceIntrospectorImpl.java:67)
        at 
org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLInterfaceIntrospectorImpl.introspectPortType(WSDLInterfaceIntrospectorImpl.java:78)
        at 
org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLFactoryImpl.createWSDLInterface(WSDLFactoryImpl.java:56)
        at 
org.apache.tuscany.sca.core.assembly.impl.WSDLHelper.createWSDLInterfaceContract(WSDLHelper.java:80)
        at 
org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl.setNormalizedWSDLContract(RuntimeEndpointImpl.java:1067)
        at 
org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl.resolve(RuntimeEndpointImpl.java:937)
        at 
org.apache.tuscany.sca.assembly.impl.EndpointImpl.getComponent(EndpointImpl.java:79)
        at 
org.apache.tuscany.sca.client.impl.RemoteServiceInvocationHandler.createEndpointReference(RemoteServiceInvocationHandler.java:175)
        at 
org.apache.tuscany.sca.client.impl.RemoteServiceInvocationHandler.getHandler(RemoteServiceInvocationHandler.java:152)
        at 
org.apache.tuscany.sca.client.impl.RemoteServiceInvocationHandler.invoke(RemoteServiceInvocationHandler.java:109)
        at $Proxy8.sayHello(Unknown Source)
        at sample.HelloworldSCAClient.main(HelloworldSCAClient.java:42)
        at sample.HelloworldTestCase.testSayHello(HelloworldTestCase.java:39)

Reply via email to