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 Tom Jordahl <to...@macromedia.com> on 2002/09/13 23:57:06 UTC

Change to RPCElement made for TCK - Attn Rich & Russell

I am working on fixing bug 12312 - more than 1 output argument is broken with .NET

This change to RPCElement.java, right after beta 3, seems to break .NET wrapped doc/lit:
-------------------------------------------------------------
Revision : 1.65
Date : 2002/7/18 20:0:37
Author : 'scheu'
Description :
If the element exposed via unwrapping has a maxOccurs="unbounded" attribute,
WSDL to java represents the parameter as an array.The current Axis
runtime also serializers the element correctly.Here is an example
from the modified City_BBB.wsdl:
....
[deleted]
-------------------------------------------------------------

The change in question is the following:

elementIsFirstParam = (operations[0].getStyle() == Style.DOCUMENT ||
                       operations[0].getStyle() == Style.WRAPPED);

Rich, you removed the second conditional on this statement, checking for wrapped.

This is bad.  If we receive a server response that looks like this:
    <HelloWorldResponse xmlns="http://tempuri.org/">
      <HelloWorldResult>unsignedByte</HelloWorldResult>
      <ioArg>unsignedByte</ioArg>
    </HelloWorldResponse>

we do not treat the first element as a parameter. We will deserialize two output arguments, HelloWorldResult and ioArg, when everything else (i.e. the stub) is expecting a JavaBean named HelloWorldResponse to be created.

But if I put this condition back in, the test case added in the test/wsdl/wrapped directory will fail.  I think we need to come up with a different fix for the getAttractions() problem you were trying to fix with this change.



Also, this change in JavaStubWriter.java seems to have affected the type mappings that get registered for the .NET service as reported in bug 12312.
-------------------------------------------------------------
Revision : 1.89
Date : 2002/8/28 22:53:17
Author : 'scheu'

....
And if the node is
   <element name="bar">
      <complexType>
         ...
      </complexType>
then the QName representing the anonymous type is returned.
....
And I cleaned up some code in Utils.getNestedTypes
-------------------------------------------------------------

For the WSDL in the bug, only the anonymous type name is registered in the stub.  The stub uses Utils.getNestedTypes() to find the type QNames that need to be registered, which I why I suspect this change.  

And the third problem I have encountered is in setting the return type in the stub.  It looks like the changes in the StubWriter that I believe Russell made for the return type has changed the way this is emitted.  I believe that the call to setReturnType() in the stub should get the QName from the returnParam, but instead it calls Utils.getXSIType(), which doesn't even use the QName of the return parameter.  

            // Get the QName for the return Type
            QName returnName = Utils.getXSIType(parms.returnParam);

I was going to change the code to this:

            // Get the QName for the return Type
            QName returnName = parms.returnParam.getQName();
            if (returnName == null) {
                returnName = Utils.getXSIType(parms.returnParam);
            }


Any help in this area would be appreciated, I don't want to change all this (pretty complex) stuff to fix my bug and break the TCK.

Thanks for any help.


--
Tom Jordahl
Macromedia Server Development