Glen, the issue Dug brought up on axis-dev is related to the TCK. There are a number of TCK tests that have code essentially like the code I presented on axis-dev:

/jaxrpctck/src/com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java
/jaxrpctck/src/com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Service/Client.java
/jaxrpctck/src/com/sun/ts/tests/jaxrpc/ee/j2w/simpletest/Client.java
/jaxrpctck/src/com/sun/ts/tests/jaxrpc/ee/w2j/rpc/encoded/simpletest/Client.java

If we implement Doug's suggestion, we'll fail the TCK.

(Dug, don't know whether you're on axis-tck. Let's move this discussion here and keep it off of axis-dev as that's too public.)

Russell Butek
[EMAIL PROTECTED]
---------------------- Forwarded by Russell Butek/Austin/IBM on 07/08/2002 11:44 AM ---------------------------

Please respond to [email protected]

To: [email protected]
cc:

Subject: RE: Return type




The following code, which the spec implies should work, would not:

Call call = ...;
if (call.isParameterAndReturnSpecRequired()) {
// The call object needs the info
call.addParameter(...);
call.setReturnType(...);
}
else {
// I assume the call object has the info, so don't do anything
}
call.invoke(...);

Russell Butek
[EMAIL PROTECTED]

Please respond to [email protected]

To: "'[email protected]'" <[email protected]>
cc:
Subject: RE: Return type




While your point is well-taken, Russell, all Doug is suggesting is that Axis allow you to be more lenient. What code can you imagine "not porting to Axis" if we make this possible (as it used to be before we JAX-RPCified)?
Â
--Glen
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 08, 2002 12:19 PM
To: [email protected]
Subject: RE: Return type


The spec says:

"In terms of the specification of parameters and return value, a Call implementation class
is required to support the following cases:

â The Call implementation class determines the types of the parameters and return
value from the invocation of addParameter and setReturnType methods in the
client code. The method isParameterAndReturnSpecRequired is required to return
true in this case.

â The Call implementation class determines the types and modes of the parameters in
an implementation specific manner. For example, a Call implementation class may
determine parameter types by using Java reflection on parameters, using WSDL
service description and the configured type mapping registry. In this case, the client
code is not required to invoke any addParameter and setReturnType methods
before calling the invoke method. The method isParameterAndReturnSpec-Required
is required to return false in this case. The methods addParameter,
removeAllParameters and setReturnType may throw JAXRPCException if invoked
in this case."


This IMPLIES that Call determines the types of parameters and return EITHER by addParameter/setReturnType OR some implementation specific manner. What you're saying is that, for AXIS, addParameter/setReturnType are part of the implementation specific manner. I doubt most folks would read it that way. Code written to assume an exclusive or use of addParameter/setReturnType will not port to AXIS code if we do what you suggest.

Russell Butek
[EMAIL PROTECTED]

Please respond to [email protected]

To: [email protected]
cc:
Subject: RE: Return type




But the spec doesn't mandate that isParameterAndReturnSpecRequired MUST return "true". In fact, it says that we can have an implementation specific way of doing it and if so it is legal for it to return "false" in ALL cases - which is basically what I'm suggesting. We've been through this before - just because isParameterAndReturnSpecRequired returns "false" does not mean you can't still call addParameter - the spec says that method _may_ throw an exception not MUST throw an exception. So, let's have it return "false" and make our lives easier.
-Dug

Please respond to [email protected]

To: [email protected]
cc:
Subject: RE: Return type



Dug, it seems to me the name of the method itself - isParameterAndReturnSpecRequired - tells us that you MUST specify the return as well as parameters.

Russell Butek
[EMAIL PROTECTED]

Please respond to [email protected]

To: [email protected]
cc:
Subject: RE: Return type




Glen?
If no one can show me where in the spec it says this
I'd like to remove the check(s).
-Dug

---------------------- Forwarded by Doug Davis/Raleigh/IBM on 07/04/2002 06:51 AM ---------------------------

To: [email protected]
cc:
From: Doug Davis/Raleigh/[EMAIL PROTECTED]
Subject: RE: Return type Doug Davis


Can you point me to where in the spec it says that?
I can't find anyplace in the spec where it says a return
type is required. In fact it does talk about "implementation
specific manner" of when talking about what to do with
addParam/setReturn types so why can't we just make
this "our implementation manner"?
-Dug

Please respond to [email protected]

To: "'[email protected]'" <[email protected]>
cc:
Subject: RE: Return type




I agree with you, Doug. This is a JAX-RPCism. Personally, I think you should be able to specify as much or as little metadata as you want, and you takes your chances (for instance, there'll either be xsi:types on the return or not), but the other JAX-RPC experts disagreed.
Â
--Glen
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 10:07 AM
To: [email protected]
Subject: Return type



If I create a Service object and a Call object w/o any WSDL
and then call addParameter() I get an error saying that
I _must_ also specify a return type. Why do we require this?
If the return type is so important then it should not be triggered
based on me calling addParameter it should just be required
in all cases. With the current logic if I have a no-arg method
I won't get this error, but if I have a one-arg method I will. This
inconsistency isn't good. Personally, I'd prefer if we didn't
require it at all. Can someone explain the logic here?
-Dug


[IMAGE]
[IMAGE]
[IMAGE]



Reply via email to