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 bu...@apache.org on 2002/09/04 20:58:38 UTC

DO NOT REPLY [Bug 12312] New: - Calling a .NET server with both an out argument and return value always returns null values.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12312>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12312

Calling a .NET server with both an out argument and return value always returns null values.

           Summary: Calling a .NET server with both an out argument and
                    return value always returns null values.
           Product: Axis
           Version: current (nightly)
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: ckowal@actional.com


Calling a .NET server with both an out argument and return value always returns 
null values.

To reproduce the problem, take the default C# ASP.NET web service generated
by VS.NET, and change the HelloWorld method to look like this:

		[WebMethod]
		public byte HelloWorld(byte inarg, ref byte ioArg)
		{
			ioArg = inarg;
			return 2;
		}

Then call it with this Axis Java client:
You'll notice that the return values this client prints out are null,
when they obviously should be something else.

public class Client2
{
	public org.tempuri.Service1Soap fport;

	public static void main(String [] args)
		throws Exception
	{
		Client2 client = new Client2();

		client.doIt();
	}

	public Client2()
	{
		try
		{
			org.tempuri.Service1Locator fservice =
			       new org.tempuri.Service1Locator();

			fport = fservice.getService1Soap();
		}
		catch (Exception e)
		{
			System.out.println(e);
		}
	}

	public void doIt() throws Exception
	{
		org.tempuri.HelloWorldResponse rtrn;

		org.apache.axis.types.UnsignedByte inarg =
			new org.apache.axis.types.UnsignedByte(1);

		org.apache.axis.types.UnsignedByte ioArg =
			new org.apache.axis.types.UnsignedByte(2);

		rtrn = fport.helloWorld(inarg, ioArg);

		System.out.println(rtrn.getIoArg());
		System.out.println(rtrn.getHelloWorldResult());
	}
}