axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Davis" <...@us.ibm.com>
Subject Re: Getting rid of RPCParam? (was: cvs commit: xml-axis/java/src/org/apache/axis/wsdl Emitter.java)
Date Tue, 23 Oct 2001 14:59:59 GMT
That one's for them.  8-)
I guess you could say that it is optional since using the correct
names is optional.  Granted the other side might (or might not)
barf on it, but if they don't then it truly is optional!  8-)
-Dug


Russell Butek/Austin/IBM@IBMUS on 10/23/2001 10:49:07 AM

Please respond to axis-dev@xml.apache.org

To:   axis-dev@xml.apache.org
cc:
Subject:  Re: Getting rid of RPCParam? (was: cvs commit:
      xml-axis/java/src/org/apache/axis/wsdl Emitter.java)



Ah...  Thanks for clearing away my blindness.

But JAX-RPC implies that calling addParameter isn't required.  We're doing
it in our stubs, so I don't have a big concern, but if folks use the Call
interface directly, how can the spec say those calls aren't required?

Russell Butek
butek@us.ibm.com


Doug Davis/Raleigh/IBM@IBMUS on 10/23/2001 09:30:51 AM

Please respond to axis-dev@xml.apache.org

To:   axis-dev@xml.apache.org
cc:
Subject:  Re: Getting rid of RPCParam? (was: cvs commit:
      xml-axis/java/src/org/apache/axis/wsdl Emitter.java)



Look a little above that in the code - you'll see some addParameter()
calls - that is where we specify the name of the parameters.
-Dug


Russell Butek/Austin/IBM@IBMUS on 10/23/2001 10:19:15 AM

Please respond to axis-dev@xml.apache.org

To:   axis-dev@xml.apache.org
cc:
Subject:  Getting rid of RPCParam? (was: cvs commit:
      xml-axis/java/src/org/apache/axis/wsdl Emitter.java)



Doug,

I have a concern about something you did here.  Actually, it's a concern
about the JAX-RPC spec and I'd like to know whether we should complain to
them or not.  You've eliminated the use of the RPCParam class:

  -                pw.print("new org.apache.axis.message.RPCParam(\"" +
p.name +
  -                        "\", " + wrapPrimitiveType(p.type, p.name) +
")");
  +                pw.print(wrapPrimitiveType(p.type, p.name));
               else if (p.mode == Parameter.INOUT)
  -                pw.print("new org.apache.axis.message.RPCParam(\"" +
p.name +
  -                        "\", " + wrapPrimitiveType(p.type, p.name + ".
_value")+ ")");
  +                pw.print(wrapPrimitiveType(p.type, p.name + "._value"));

That class was necessary to propagate the parameter name to the SOAP
message.  Without that, AXIS simply names the parameters "arg0", "arg1",
etc.  Since a SOAP engine cannot depend on the order of parameters in a
SOAP message, it must look up each parameter by name.  But if AXIS sends
"arg0", etc, then the real names have been lost and the SOAP engine on the
receiving side has no way to determine which parameters are which.  Is this
something we should bring up with JAX-RPC folks?

Russell Butek
butek@us.ibm.com
---------------------- Forwarded by Russell Butek/Austin/IBM on 10/23/2001
09:11 AM ---------------------------





dug@apache.org on 10/23/2001 08:33:30 AM

Please respond to axis-dev@xml.apache.org

To:   xml-axis-cvs@apache.org
cc:

Subject:  cvs commit: xml-axis/java/src/org/apache/axis/wsdl Emitter.java




dug         01/10/23 06:33:30

  Modified:    java/src/org/apache/axis/wsdl Emitter.java
  Log:
  Switch invoke() to JAX-RPC format.

  Revision  Changes    Path
  1.74      +8 -12     xml-axis/java/src/org/apache/axis/wsdl/Emitter.java

  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Emitter.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- Emitter.java  2001/10/23 12:31:44  1.73
  +++ Emitter.java  2001/10/23 13:33:30  1.74
  @@ -1310,10 +1310,10 @@
                   pw.println("        call.addParameter(\"" + p.name + "
\", " + typeString + ", org.apache.axis.client.Call.PARAM_MODE_IN);");
               }
               else if (p.mode == Parameter.INOUT) {
  -                pw.println("        call.addParameter(\"" + p.name + "
\", " + typeString + ", org.apache.axis.client.Call.PARAM_MODE_INOUT);");
  +                pw.println("        call.addParameter(\"" + p.name + "
\", " + typeString + ", call.PARAM_MODE_INOUT);");
               }
               else { // p.mode == Parameter.OUT
  -                pw.println("        call.addParameter(\"" + p.name + "
\", " + typeString + ", org.apache.axis.client.Call.PARAM_MODE_OUT);");
  +                pw.println("        call.addParameter(\"" + p.name + "
\", " + typeString + ", call.PARAM_MODE_OUT);");
               }
           }
           // set output type
  @@ -1327,14 +1327,12 @@
           }

           pw.println("
call.setProperty(org.apache.axis.transport.http.HTTPTransport.ACTION, \"" +
soapAction + "\");");
  +        pw.println("        call.setProperty(call.NAMESPACE, \"" +
namespace
  +                                                 + "\");" );
  +        pw.println("        call.setOperationName( \"" + name + "\");"
);
           pw.print("        Object resp = call.invoke(");
  +        pw.print("new Object[] {");

  -        // Namespace
  -        pw.print("\"" + namespace + "\"");
  -
  -        // Operation
  -        pw.print(", \"" + name + "\", new Object[] {");
  -
           // Write the input and inout parameter list
           boolean needComma = false;
           for (int i = 0; i < parms.list.size(); ++i) {
  @@ -1347,11 +1345,9 @@
               else
                   needComma = true;
               if (p.mode == Parameter.IN)
  -                pw.print("new org.apache.axis.message.RPCParam(\"" +
p.name +
  -                        "\", " + wrapPrimitiveType(p.type, p.name) +
")");
  +                pw.print(wrapPrimitiveType(p.type, p.name));
               else if (p.mode == Parameter.INOUT)
  -                pw.print("new org.apache.axis.message.RPCParam(\"" +
p.name +
  -                        "\", " + wrapPrimitiveType(p.type, p.name + ".
_value")+ ")");
  +                pw.print(wrapPrimitiveType(p.type, p.name + "._value"));
           }
           pw.println("});");
           pw.println();












Mime
View raw message