butek       2002/06/07 13:59:12

  Modified:    java/src/org/apache/axis/wsdl/toJava JavaStubWriter.java
  Log:
  Fixed bugzilla 9643
  (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9643).
  
  I'm still not sure getting the namespace for an operation from the portType
  is the right thing to do, but it's better than what was there.  Where SHOULD
  an operation's namespace come from?
  
  Revision  Changes    Path
  1.68      +3 -31     
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.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- JavaStubWriter.java       7 Jun 2002 13:14:34 -0000       1.67
  +++ JavaStubWriter.java       7 Jun 2002 20:59:12 -0000       1.68
  @@ -259,38 +259,10 @@
                       break;
                   }
               }
  -            // Get the namespace for the operation from the <soap:body>
  +            // Get the namespace for the operation from the portType
               // RJB: is this the right thing to do?
  -            String namespace = "";
  -            Iterator bindingMsgIterator = null;
  -            BindingInput input = operation.getBindingInput();
  -            BindingOutput output;
  -            if (input != null) {
  -                bindingMsgIterator =
  -                        input.getExtensibilityElements().iterator();
  -            }
  -            else {
  -                output = operation.getBindingOutput();
  -                if (output != null) {
  -                    bindingMsgIterator =
  -                            output.getExtensibilityElements().iterator();
  -                }
  -            }
  -            if (bindingMsgIterator != null) {
  -                for (; bindingMsgIterator.hasNext();) {
  -                    Object obj = bindingMsgIterator.next();
  -                    if (obj instanceof SOAPBody) {
  -                        namespace = ((SOAPBody) obj).getNamespaceURI();
  -                        if (namespace == null) {
  -                            namespace = symbolTable.getDefinition().
  -                                    getTargetNamespace();
  -                        }
  -                        if (namespace == null)
  -                            namespace = "";
  -                        break;
  -                    }
  -                }
  -            }
  +            String namespace = portType.getQName().getNamespaceURI();
  +
               Operation ptOperation = operation.getOperation();
               OperationType type = ptOperation.getStyle();
   
  
  
  


Reply via email to