axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@us.ibm.com
Subject RE: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava Jav aStubWriter.java
Date Mon, 10 Jun 2002 13:21:58 GMT

Argghhhh!!!  Tom, I applied your getOperationQName to JavaStubWriter and
the clash test fails with no operation name specified.  So I'm looking at
the implementation of getOperationQName.  I don't understand why it's OK to
return null, and what I should do if it does.  Could you get on the chat?

Russell Butek
butek@us.ibm.com


Russell Butek/Austin/IBM@IBMUS on 06/10/2002 07:35:45 AM

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

To:    axis-dev@xml.apache.org
cc:
Subject:    RE: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava
       Jav   aStubWriter.java



Silly me.  My Friday brain shutdown happened a bit early.  I'll call Tom's
getOperationQName.

I still have a couple questions, though.
- the portType namespace and the targetNamespace in the binding's
definition COULD be different.  The portType COULD be imported, in which
case the namespaces probably WILL be different.  What SHOULD the namespace
be if it isn't explicit?
- Does AXIS client code care if the output namespace is different?  In
other words, should a call to Call.getOperationName return a different
QName before the invoke vs after the invoke?

Russell Butek
butek@us.ibm.com

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

To:   "'axis-dev@xml.apache.org'" <axis-dev@xml.apache.org>
cc:
Subject:    RE: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava
Jav    aStubWriter.java




The  soap:body of the output is about the OUTPUT, not the input.  So that
would  turn into the returnQName on the server side, nothing to do with the
operation  QName on the client side.  I.e. They're BOTH appropriate.  :)

(c) is  the same thing you implemented, just expressed a different way
which doesn't tie  it to the portType.  It so happens that the portType's
ns is going to be  the targetNS, but coding it that way implies more than
is  necessary.

--Glen

-----Original Message-----
From: butek@us.ibm.com  [mailto:butek@us.ibm.com]
Sent: Friday, June 07, 2002 5:23  PM
To: axis-dev@xml.apache.org
Subject: RE: cvs commit:  xml-axis/java/src/org/apache/axis/wsdl/toJava Jav
aStubWriter.java


But it was getting the namespace from the  soap:body in the input clause.
There was also a namespace explicitly defined  in soap:body of the output
clause. Why should we prefer input over output? And  since there's a
choice, it doesn't sound like EITHER is  appropriate.

Why would c) be better than what I implemented? I guess I  need some
education here.

Russell Butek
butek@us.ibm.com

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

To: "'axis-dev@xml.apache.org'"  <axis-dev@xml.apache.org>
cc:
Subject: RE: cvs  commit: xml-axis/java/src/org/apache/axis/wsdl/toJava Jav
aStubWriter.java




Namespace for the operation  should come from EITHER

a) <soap:body namespace=""> if  it's present (and we're RPC encoded)

OR

c)  target namespace of the document (the default if we're RPC encoded and
there's  no body namespace)

OR

d) the <element>  declaration for doc/lit services

In other words, the WSDL in  the bug report is wrong if he wants the "Ram"
namespace, because it specifies  in the <soap:body> tag to use the
"validate" namespace for the  input.

I think that code you removed should get put back...  perhaps improved, but
we need it.

--Glen

>  -----Original Message-----
> From: butek@apache.org [mailto:butek@apache.org]
> Sent:  Friday, June 07, 2002 4:59 PM
> To: xml-axis-cvs@apache.org
>  Subject: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava
>  JavaStubWriter.java
>
>
> 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/JavaSt
>  ubWriter.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();
>
>
>
>
>



Mime
View raw message