Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 86025 invoked by uid 500); 10 Jun 2002 13:23:17 -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 86016 invoked from network); 10 Jun 2002 13:23:16 -0000 Importance: Normal Sensitivity: Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava Jav aStubWriter.java To: axis-dev@xml.apache.org X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 Message-ID: From: butek@us.ibm.com Date: Mon, 10 Jun 2002 08:21:58 -0500 X-MIMETrack: Serialize by Router on D04NM203/04/M/IBM(Build M13TT_05222002 Pre-release 2|May 22, 2002) at 06/10/2002 09:23:12 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=09BBE147DFDAA7678f9e8a93df938690918c09BBE147DFDAA767" Content-Disposition: inline X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --0__=09BBE147DFDAA7678f9e8a93df938690918c09BBE147DFDAA767 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable Argghhhh!!! Tom, I applied your getOperationQName to JavaStubWriter an= d 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 O= K to return null, and what I should do if it does. Could you get on the cha= t? 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/toJa= va Jav aStubWriter.java Silly me. My Friday brain shutdown happened a bit early. I'll call To= m'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 whic= h case the namespaces probably WILL be different. What SHOULD the namesp= ace 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'" cc: Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJa= va Jav aStubWriter.java The soap:body of the output is about the OUTPUT, not the input.=A0 So = that would turn into the returnQName on the server side, nothing to do with= the operation QName on the client side.=A0 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.=A0 It so happens that the portTy= pe's ns is going to be the targetNS, but coding it that way implies more th= an 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 claus= e. There was also a namespace explicitly defined in soap:body of the outp= ut 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'" cc: Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava= Jav aStubWriter.java Namespace for the operation =A0should come from EITHER a) if =A0it's present (and we're RPC encoded= ) OR c) =A0target namespace of the document (the default if we're RPC encode= d and there's =A0no body namespace) OR d) the =A0declaration for doc/lit services In other words, the WSDL in =A0the bug report is wrong if he wants the = "Ram" namespace, because it specifies =A0in the tag to use the "validate" namespace for the =A0input. I think that code you removed should get put back... =A0perhaps improve= d, but we need it. --Glen > =A0-----Original Message----- > From: butek@apache.org [mailto:butek@apache.org] > Sent: =A0Friday, June 07, 2002 4:59 PM > To: xml-axis-cvs@apache.org > =A0Subject: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava= > =A0JavaStubWriter.java > > > butek =A0 =A0 =A0 =A02002/06/07 13:59:12 > > =A0 Modified: =A0 =A0=A0java/src/org/apache/axis/wsdl/toJava > JavaStubWriter.java > =A0=A0 Log: > =A0 Fixed bugzilla 9643 > =A0 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D9643). > > =A0=A0 I'm still not sure getting the namespace for an operation > from =A0the portType > =A0 is the right thing to do, but it's better than =A0what was > there. =A0Where SHOULD > =A0 an operation's =A0namespace come from? > > =A0 Revision =A0Changes =A0 =A0=A0Path > =A0 1.68 =A0 =A0 =A0+3 -31 > =A0xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java > > =A0=A0 Index: JavaStubWriter.java > =A0 =A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =A0=A0 RCS file: > =A0/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaSt > =A0ubWriter.java,v > =A0 retrieving revision 1.67 > =A0 =A0retrieving revision 1.68 > =A0 diff -u -r1.67 -r1.68 > =A0 =A0--- JavaStubWriter.java 7 Jun 2002 13:14:34 -0000 1.67 > =A0 +++ =A0JavaStubWriter.java 7 Jun 2002 20:59:12 -0000 1.68 > =A0 @@ -259,38 =A0+259,10 @@ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0break; > =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0} > =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0// Get the namespace for the operatio= n from > the =A0 > =A0 + =A0 =A0 =A0 =A0 =A0 =A0// =A0Get the namespace for the operatio= n from > the portType > =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0// RJB: is this the right =A0thing = to do? > =A0 - =A0 =A0 =A0 =A0 =A0 =A0String =A0namespace =3D ""; > =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0Iterator bindingMsgIterator =3D null;= > =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0BindingInput input =3D =A0operation.g= etBindingInput(); > =A0 - =A0 =A0 =A0 =A0 =A0=A0 =A0BindingOutput output; > =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0if (input !=3D null) { > =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0bindingMsgIterator =3D > > input.getExtensibilityElements().iterator(); > =A0 - =A0 =A0=A0 =A0 =A0 =A0 =A0} > =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0else { > =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0output =3D operation.getBindi= ngOutput(); > =A0 - =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (output !=3D null) > =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0bindingMsgIterator =3D= > =A0 - > =A0output.getExtensibilityElements().iterator(); > =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0} > =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0} > =A0 - =A0 =A0 =A0 =A0 =A0=A0 =A0if (bindingMsgIterator !=3D null) { > =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0for (; bindingMsgIterator.has= Next();) > =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0Object obj =3D bindin= gMsgIterator.next(); > =A0 - =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (obj =A0instanceof= SOAPBody) { > =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0namespace =3D= =A0((SOAPBody) > obj).getNamespaceURI(); > =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if =A0(namesp= ace =3D=3D null) { > =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0names= pace > symbolTable.getDefinition(). > =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0= =A0 =A0 =A0getTargetNamespace(); > =A0 - =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0} > =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0if (namespace= =3D=3D null) > =A0 - =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0na= mespace =3D ""; > =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0break; > =A0=A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0} > =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0} > =A0 - =A0 =A0 =A0 =A0 =A0 =A0} > =A0=A0 + =A0 =A0 =A0 =A0 =A0 =A0String namespace =3D > =A0portType.getQName().getNamespaceURI(); > =A0 + > =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0Operation ptOperation =3D =A0operat= ion.getOperation(); > =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0OperationType type =3D =A0ptOperati= on.getStyle(); > > > > > = --0__=09BBE147DFDAA7678f9e8a93df938690918c09BBE147DFDAA767 Content-type: text/html; charset=ISO-8859-1 Content-Disposition: inline Content-transfer-encoding: quoted-printable Argghhhh!!! Tom, I applied your getOperationQName to JavaS= tubWriter and the clash test fails with no operation name specified. S= o I'm looking at the implementation of getOperationQName. I don't unde= rstand why it's OK to return null, and what I should do if it does. Co= uld you get on the chat?

Russell Butek
butek@us.ibm.com

Please respond to axis-dev@xml.ap= ache.org

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



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

I still have a couple questions, though.
- the portType namespace and the targetNamespace in th= e binding's definition COULD be different. The portType COULD be impor= ted, in which case the namespaces probably WILL be different. What SHO= ULD the namespace be if it isn't explicit?
- Does AXIS client code care if the output namespace i= s different? In other words, should a call to Call.getOperationName re= turn 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&g= t;
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.=A0 So that would turn into the returnQName on the server si= de, nothing to do with the operation QName on the client side.=A0 I.e.= They're BOTH appropriate. :)
=A0
(c) is the same thing you implemented, just expressed= a different way which doesn't tie it to the portType.=A0 It so happen= s that the portType's ns is going to be the targetNS, but coding it th= at way implies more than is necessary.
=A0
--Glen
=A0
-----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<= /font>


But it was getting the namespace from the soap:body i= n the input clause. There was also a namespace explicitly defined in s= oap: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 appropria= te.

Why would c) be better than what I implemented? I gues= s 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-de= v@xml.apache.org>
cc:
Subject: RE: cvs commit: xml-axis/java/src/org/apache= /axis/wsdl/toJava Jav aStubWriter.java




Namespace for the operation =A0should come from EI= THER

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

OR

c) =A0target namespace of the document (the defaul= t if we're RPC encoded and there's =A0no body namespace)
OR

d) the <element> =A0declaration for doc/lit = services

In other words, the WSDL in =A0the bug report is w= rong if he wants the "Ram" namespace, because it specifies =A0= in the <soap:body> tag to use the "validate" namespace = for the =A0input.

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

--Glen

> =A0-----Original Message-----
= > From: butek@apache.org [mai= lto:butek@apache.org]
> Sent: =A0Friday, June 07, 2002 4:59 PM=
> To: xml-axis-cvs@apache.org
> =A0Subject: cvs commit: xml-axis/java/src/org= /apache/axis/wsdl/toJava
> =A0JavaStubWriter.java
>
>
> butek =A0 =A0 =A0 =A02002/06/07 13:59:12
>
> =A0 Modified: =A0 =A0=A0java/src/org/apache/a= xis/wsdl/toJava
> JavaStubWriter.java
> =A0=A0 Log:
> =A0 Fixed bugzilla 9643
> =A0 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D9643).
>
> =A0=A0 I'm still not sure getting the namespa= ce for an operation
> from =A0the portType
> =A0 is the right thing to do, but it's better= than =A0what was
> there. =A0Where SHOULD
> =A0 an operation's =A0namespace come from?
>
> =A0 Revision =A0Changes =A0 =A0=A0Path=
> =A0 1.68 =A0 =A0 =A0+3 -31
> =A0xml-axis/java/src/org/apache/axis/wsdl/toJ= ava/JavaStubWriter.java
>
> =A0=A0 Index: JavaStubWriter.java=
> =A0 =A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
> =A0=A0 RCS file:
> =A0/home/cvs/xml-axis/java/src/org/apache/axi= s/wsdl/toJava/JavaSt
> =A0ubWriter.java,v
> =A0 retrieving revision 1.67
> =A0 =A0retrieving revision 1.68 > =A0 diff -u -r1.67 -r1.68
> =A0 =A0--- JavaStubWriter.java 7 Jun 2002 13:= 14:34 -0000 1.67
> =A0 +++ =A0JavaStubWriter.java 7 Jun 2002 20:= 59:12 -0000 1.68
> =A0 @@ -259,38 =A0+259,10 @@
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0= =A0break;
> =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0}
> =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0}
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0// Get the na= mespace for the operation from
> the =A0<soap:body>
> =A0 + =A0 =A0 =A0 =A0 =A0 =A0// =A0Get the na= mespace for the operation from
> the portType
> =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0// RJB: is = this the right =A0thing to do?
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0String =A0namesp= ace =3D "";
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0Iterator bind= ingMsgIterator =3D null;
> =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0BindingInput = input =3D =A0operation.getBindingInput();
> =A0 - =A0 =A0 =A0 =A0 =A0=A0 =A0BindingOutput= output;
> =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0if (input !=3D= null) {
> =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0bindi= ngMsgIterator =3D
> =A0 =A0
> input.getExtensibilityElements().iterator();<= /font>
> =A0 - =A0 =A0=A0 =A0 =A0 =A0 =A0}=
> =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0else {=
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0outpu= t =3D operation.getBindingOutput();
> =A0 - =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (o= utput !=3D null) =A0
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 = =A0bindingMsgIterator =3D
> =A0 -
> =A0output.getExtensibilityElements().iterator= ();
> =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0}
> =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0}=
> =A0 - =A0 =A0 =A0 =A0 =A0=A0 =A0if (bindingMs= gIterator !=3D null) {
> =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0for (= ; bindingMsgIterator.hasNext();) =A0
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 = =A0Object obj =3D bindingMsgIterator.next();
> =A0 - =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0if (obj =A0instanceof SOAPBody) {
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 = =A0 =A0 =A0namespace =3D =A0((SOAPBody)
> obj).getNamespaceURI();
> =A0 - =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0if =A0(namespace =3D=3D null) {
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0namespace =A0
> symbolTable.getDefinition().
> =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0getTargetNamespace();=
> =A0 - =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0=A0}
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0 = =A0 =A0 =A0if (namespace =3D=3D null)
> =A0 - =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0=A0 =A0 =A0namespace =3D "";
> =A0 - =A0 =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0break;
> =A0=A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0=A0}
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0}
> =A0 - =A0 =A0 =A0 =A0 =A0 =A0} > =A0=A0 + =A0 =A0 =A0 =A0 =A0 =A0String namesp= ace =3D
> =A0portType.getQName().getNamespaceURI();
> =A0 +
> =A0 =A0 =A0=A0 =A0 =A0 =A0 =A0 =A0Operation p= tOperation =3D =A0operation.getOperation();
> =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 =A0OperationTy= pe type =3D =A0ptOperation.getStyle();
>
>
>
>
> =A0


= --0__=09BBE147DFDAA7678f9e8a93df938690918c09BBE147DFDAA767--