You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Chris Burnley <ch...@viator.com> on 2002/10/04 02:42:18 UTC

Re: Correctness of org.apache.axis.wsdl.toJava.Utils.getOperation QName

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:chris@viator.com]
>Sent: Wednesday, October 02, 2002 8:58 PM
>To: axis-dev@xml.apache.org
>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
>
>  
>