+1, this sounds right to me.
> -----Original Message----- > From: Tom Jordahl [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 07, 2002 5:32 PM > To: '[EMAIL PROTECTED]' > Subject: RE: cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava > Jav aStubWriter.java > > > > I am pretty sure I refactored this exact code (in another > place?) in to a function just last week. See > getOperationQName() in toJava.Utils. This code should use > that function and it should follow what Glen said below > (which I believe it does). > > Sorry I didn't realize there was duplicate code when I > extracted the function. > > -- > Tom Jordahl > Macromedia > > > -----Original Message----- > From: Glen Daniels [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 07, 2002 5:05 PM > To: '[EMAIL PROTECTED]' > 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(); > > > > > > > > > > >