axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
Date Fri, 08 Feb 2002 21:21:46 GMT
tomj        02/02/08 13:21:46

  Modified:    java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
  Log:
  Take advantage of the OPERATION_STYLE_PROPERTY and set
  it to document or rpc depending on what was in the WSDL.
  
  Note: The engine currently doesn't do anything with this info.
  
  Revision  Changes    Path
  1.28      +11 -4     xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java
  
  Index: JavaStubWriter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- JavaStubWriter.java	8 Feb 2002 20:48:21 -0000	1.27
  +++ JavaStubWriter.java	8 Feb 2002 21:21:46 -0000	1.28
  @@ -442,8 +442,6 @@
           pw.println("        }");
           pw.println("        org.apache.axis.client.Call call = getCall();");
   
  -        // DUG: need to set the isRPC flag in the Call object
  -
           // loop over paramters and set up in/out params
           for (int i = 0; i < parms.list.size(); ++i) {
               Parameter p = (Parameter) parms.list.get(i);
  @@ -480,16 +478,25 @@
               pw.println("        call.setSOAPActionURI(\"" + soapAction + "\");");
           }
   
  -        // Encoding literal or encoded use.
  +        // Encoding: literal or encoded use.
           int use = bEntry.getInputBodyType(operation.getOperation());
           if (use == BindingEntry.USE_LITERAL) {
               // Turn off encoding
  -            pw.println("        ((org.apache.axis.client.Call)call).setEncodingStyle(null);");
  +            pw.println("        call.setEncodingStyle(null);");
               // turn off multirefs
               pw.println("        call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
Boolean.FALSE);");
               // turn off XSI types
               pw.println("        call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,
Boolean.FALSE);");
           }
  +        
  +        // Style: document or RPC
  +        int style = bEntry.getBindingStyle();
  +        if (style == BindingEntry.STYLE_DOCUMENT) {
  +            pw.println("        call.setProperty(org.apache.axis.client.Call.OPERATION_STYLE_PROPERTY,
\"document\");");
  +        } else {
  +            pw.println("        call.setProperty(org.apache.axis.client.Call.OPERATION_STYLE_PROPERTY,
\"rpc\");");
  +        }
  +            
           
           // Operation name
           pw.println("        call.setOperationName(new javax.xml.rpc.namespace.QName(\""
+ namespace + "\", \"" + operation.getName() + "\"));" );
  
  
  

Mime
View raw message