I stumbled across this problem while working on the explicitHeaderBranch. I have a fix for the getOperationQName code and the runtime.
The fix is to have getOperationQName use the correct operation qname ...not some embedded element as is the current case for document style. I then changed MessageContext.getPossibleOperationsByQName to detect document style and get the operations that have a parameter that that matches the qname....much safer. So this fix will be applied when the explicitHeaderBranch is merged in. Rich Scheuerle IBM WebSphere & Axis Web Services Development 512-838-5115 (IBM TL 678-5115) Chris Burnley <[EMAIL PROTECTED] To: [EMAIL PROTECTED] > cc: Subject: Re: Correctness of 10/03/2002 07:42 org.apache.axis.wsdl.toJava.Utils.getOperation QName PM Please respond to axis-dev Tom, you are right. "type" should only be used for encoded, but "element" may be used for literal. I've changed the example I gave earlier to use literal, using rc2 now, wsdl2java still generating the operation name as "anElement". If I run the ticker example in the 1.1 spec, the operation name is still not correct. ( Even though it is possible that the example actually doesn't work, because I found an mistake: binding="tns:StockQuoteBinding" should be binding="tns:StockQuoteSoapBinding" ) I'm willing to submit a patch for it as long as we can sort out what the correct behaviour should be. If what I've got is illegal, then I can always change the schemas/wsdl to be legal. BTW, this used to work fine with beta 2. Tom Jordahl wrote: >Chris, > >If I understand your question right, see section 3.5 of the WSDL 1.1 specification, the third to last paragraph: > "If use is encoded, then each message part references an abstract type using the type attribute." > >WSDL spec should be at http://www.w3.org/TR/wsdl >-- >Tom Jordahl >Macromedia Server Development > > > >-----Original Message----- >From: Chris Burnley [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, October 02, 2002 8:58 PM >To: [EMAIL PROTECTED] >Subject: Correctness of >org.apache.axis.wsdl.toJava.Utils.getOperationQName > > >I have a situation where I a client is using an element instead of a >type for a message parameter in my WSDL file (simplified example >attached). When I generate the stubs, the operation name call looks like >this: > > _call.setOperationName(new >javax.xml.namespace.QName("http://www.xyz.com/schema/Elements", >"anElement")); > >rather than the expected: > >_call.setOperationName(new >javax.xml.namespace.QName("http://www.xyz.com/soap-services", >"anOperation")); > >I read the comments for getOperationQName and someone wrote: > > // NOTE: it is possible for someone to define a part as an element > // while using rpc/encoded, which is wrong and we might want to >catch it > // here. > >Is this actually true ? Could someone point me to the spec that points >this out ? It seems that this could be easy to fix by adding > >@@ -566,6 +566,9 @@ > if (ns == null) { > ns = ""; > } >+ else { >+ return new QName(ns, operationName); >+ } > >to Utils.java, revision RC1 > >regards, > >Chris Burnley > > >