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
[EMAIL PROTECTED]
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 5:23 PM
To: [EMAIL PROTECTED]
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
[EMAIL PROTECTED]
Please respond to [EMAIL PROTECTED]
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 07, 2002 4:59 PM
> To: [EMAIL PROTECTED]
> 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();
>
>
>
>
>