On 1/10/2011 2:07 PM, Jean-Sebastien Delfino wrote:
On 01/10/2011 12:19 PM, Jean-Sebastien Delfino wrote:
On 01/10/2011 11:21 AM, Jean-Sebastien Delfino wrote:

OK I checked some code in at revision: 1057230 [1] . As I've been
updating the async support I extended the async part of the
implementation extension sample to have an implementation that uses a
doc/lit implementation reference but with a reference defined in the
composite as doc/lit/wrapped.

This now gives an index out of bounds exception somewhere in the
databinding. Haven't tracked it down yet. Be interested to know if
this is the scenario you had in mind though.

[1] http://svn.apache.org/viewvc?view=revision&revision=1057230

Regards

Simon


Thanks! Taking a look now.


Your test case looks different from what I'm trying to do (I hope I
understood what you did there, as I was a little confused with the extra
components in multiple composites and the async combinations).

In my case the reference is unwrapped, and the binding contract is
wrapped. I'm also not using async -- yet :).

I'll try to put together another test there [1] to not complicate
further the sample (with just WelloTest using an unwrapped operation and
the binding on the wire to Upper using a wrapped operation), and will
post here again later with what I find.


The modified sample and tests are available there [2].

I've done the following:

- Changed test.composite to use UpperService.wsdl (doc-wrapped) in the wsdlElement attribute of the upper reference's binding.ws element.

- Changed WelloTest.java to UpperRPC.wsdl (RPC) on the upper reference.

- Added to SampleWSDLInvoker and SampleWSDLProxy an 'rpccall' method allowing a component implementation to call an operation 'the RPC way' and pass args in an Object[] instead of of wrappering them in an XML element.

- Changed WelloTest.java to use rpccall to call the upper reference.

AIU Raymond's earlier comments in this thread that should work, but mvn:test in the sample directory [1] causes this exception:

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.w3c.dom.Node at org.apache.tuscany.sca.databinding.xml.Node2XMLStreamReader.transform(Node2XMLStreamReader.java:35) at org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint$LazyPullTransformer.transform(DefaultTransformerExtensionPoint.java:209) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:116) at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform(Input2InputTransformer.java:240) at org.apache.tuscany.sca.core.databinding.transformers.Input2InputTransformer.transform(Input2InputTransformer.java:45) at org.apache.tuscany.sca.databinding.DefaultTransformerExtensionPoint$LazyPullTransformer.transform(DefaultTransformerExtensionPoint.java:209) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediate(MediatorImpl.java:116) at org.apache.tuscany.sca.databinding.impl.MediatorImpl.mediateInput(MediatorImpl.java:432) at org.apache.tuscany.sca.core.databinding.wire.DataTransformationInterceptor.processRequest(DataTransformationInterceptor.java:69) at org.apache.tuscany.sca.core.invocation.InterceptorAsyncImpl.invoke(InterceptorAsyncImpl.java:57) at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:125) at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:108) at org.apache.tuscany.sca.core.invocation.RuntimeInvoker.invoke(RuntimeInvoker.java:97) at org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointReferenceImpl.invoke(RuntimeEndpointReferenceImpl.java:239)
    at sample.impl.SampleWSDLProxy.rpccall(SampleWSDLProxy.java:74)
    at sample.WelloTest.doccall(WelloTest.java:69)

Thoughts?

Did I miss something in how I configured the WSDL interfaces and passed the args?

Thanks

[1] http://svn.apache.org/repos/asf/tuscany/sandbox/sebastien/java/wrapped/ [2] http://svn.apache.org/repos/asf/tuscany/sandbox/sebastien/java/wrapped/samples/extending-tuscany/implementation-sample/

Could the problem be with Input2InputTransformer.transform [1]? The code comments suggest the intent is to execute the first if-block for "Unwrapped --> Wrapped", however, the code doesn't seem to match:

boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null; boolean sourceBare = sourceOp != null && !sourceOp.isWrapperStyle() && sourceOp.getWrapper() == null;
  [...]
  if ((!sourceWrapped && !sourceBare) && targetWrapped) {
    // Unwrapped --> Wrapped
  [...]

In which case would both sourceWrapped and sourceBare be false?

Thanks,
Ben

[1] http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/transformers/Input2InputTransformer.java

Reply via email to