Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 76722 invoked by uid 500); 23 Oct 2001 14:19:54 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 76562 invoked from network); 23 Oct 2001 14:19:49 -0000 Importance: Normal Subject: Getting rid of RPCParam? (was: cvs commit: xml-axis/java/src/org/apache/axis/wsdl Emitter.java) To: axis-dev@xml.apache.org X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 Message-ID: From: "Russell Butek" Date: Tue, 23 Oct 2001 09:19:15 -0500 X-MIMETrack: Serialize by Router on D04NMS23/04/M/IBM(Release 5.0.8 |June 18, 2001) at 10/23/2001 10:19:19 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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();