[
https://issues.apache.org/jira/browse/TUSCANY-3819?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Scott Kurz updated TUSCANY-3819:
--------------------------------
Attachment: 3819.1.patch
Since a lot of this code's been around for quite awhile, I thought I'd write up
the changes I made in this patch, which I'll commit unless I hear any
objections:
1. fix Java JAXWS introspection to build input wrapper type ignoring OUT-only,
output wrapper type including Holders (and excluding return type void)
2. mediating btw. right number of inputs/outputs in Java-centric
JDKInvocationHandler, JavaImplInvoker, rather than I2I, O2O.
For example, in transforming from XML->Java in a wrapped->unwrapped transform,
an OUT-only parm is NOT going to have a corresponding child of the input
wrapper element, so we need to account for this and map the wrapper children to
the correct Java parms, skipping over and filling in with empty Holders those
OUT-only parms. So what I'm saying is we chose to not worry about this at all
in I2I, to keep it from having too many Java-centric special cases, and we
worry about this in the JDKInvocationHandler, JavaImplInvoker.
3. Fixed the O2O logic
--- and some more minor changes ---
4. fix WrapperInfo.getUnwrappedOutputType() to use List<DataType> logical.
5. removed wrapping of output DataType with idl:output DataType in
mediateOutput,
added setting in WSDL introspector to parallel input handling. (Also made
WSDLIntrospector more symmetric wrt outputs as compared to inputs)
6. moved IDL_INPUT (idl:input) and other static constants from "DataBinding" to
"Operation", so we can use a constant, rather than String value, in WSDL
introspector (moved from Databinding since this doesn't introduce new
cross-module dependencies)
7. renamed Operation hasHolders() to hasArrayWrappedOutput() to be used in
contexts where we need to understand if the invoker has passed us a single
output needing to be wrapped in an array. (Maybe this is better than
hasHolders() which is more Java-centric, maybe it's still more complicated?)
8. Note the check for void output ends up changing from check to: get(0)==null
to size()==0
------------------------------------------------------------------------------
Some TODOs remaining:
- check in test
- Bare Holder support
- wsdlgen testing
> Multiple problems with multiple outputs (Holder support)
> --------------------------------------------------------
>
> Key: TUSCANY-3819
> URL: https://issues.apache.org/jira/browse/TUSCANY-3819
> Project: Tuscany
> Issue Type: Bug
> Components: SCA Java Runtime
> Affects Versions: Java-SCA-2.0-M5
> Reporter: Scott Kurz
> Assignee: Scott Kurz
> Attachments: 3819.1.patch, holder-ws-service-multiple-outputs.zip
>
>
> It seems like there are a few related problems when a Java method has
> multiple outputs, as my test will show.
> I think the history here is:
> - We first added support for using a single Holder parm (with INOUT or OUT)
> but only in the case in which there was only one output altogether, (i.e. the
> return type was void).
> - Brent recently added some support for truly using multiple outputs.
> I'm not sure what if any tests we have though using multiple outputs. For
> example, the test in
> samples/learning-more/binding-ws/holder-ws-service only has a single output.
> However, I do have a guess at how this might have worked at some point (maybe
> for Brent).
> I think if we have a binding/wire configuration which uses
> MediatorImpl.copyInput, etc, it might work with the existing code. However,
> I think when we use the DataTransformationInterceptor which in a typical
> Java<->XML transform uses the Input2InputTransformer, etc., it exposes holes
> in the wrapping that need to be more fully implemented.
> I'll attach a test.
> In the meantime I've assigned to myself as I have started working on a few
> areas including the Input2Input, Output2Output transformers, the JAXWS
> interface processor. Also the wsdlgen will need some tweaking I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.