|
From: Michael S. <mi...@sc...> - 2005-01-06 01:43:21
|
I've stumbled again on my quest to make Axis and Spring work together in
the way I want them to. One of my operations has an out parameter (in
WSDL: a part of the output message that does not appear in the
operation's parameterOrder attribute; see JAX-RPC 4.3.4).
Now, JaxRpcPortProxyFactoryBean passes in all arguments from the proxied
interface to Call#invoke(Object[]). Unfortunately, in this specific
case, that's not the right thing to do. Instead, two things ought to
happen
(1) Only those arguments listed in the parameterOrder ought to be passed
to invoke.
With the means of plain JAX-RPC this is not possible, AFAICT. For
org.apache.axis.client.Call there's a way through getOperation() ->
getParameters() -> getMode() == OUT.
(2) Out parameters need to be extracted from the call object somewhat
painfully. In code generated by Axis' wsdl2java, it looks like this
(slightly changed for readability)
extractAttachments(_call);
java.util.Map _output;
_output = _call.getOutputParams();
try {
expiration.value = (Calendar) _output.get(
new QName("http://ns", "expires"));
} catch (Exception _exception) {
expiration.value = (Calendar) JavaUtils.convert(_output.get(
new QName("http://ns", "expires")), Calendar.class);
}
Again, the needed metadata is provided by the Axis implementation
classes, but are not in JAX-RPC.
When I started to write this message I thought of the problem as a
hopeless case. In the meantime it looks quite solvable. I'll probably
have a go at it in the next couple of days. Thus if anyone else intends
to do something similar, please contact me.
Michael
--
Michael Schuerig Face reality and stare it down
mailto:mi...@sc... --Jethro Tull, Silver River Turning
http://www.schuerig.de/michael/
|