Hello and happy holidays all,
I have a quick question. I just playing with interoperability, so I
created a java web service (using Axis), which I am able to access with
a java client, but when I try to access it with a .NET client (just an
..aspx page-I used wsdl.exe to generate the .cs file, and csc.exe to
generate the dll), I get a System.NullReferenceException. Strange
thing though; when using the .NET client, it is getting through to the
web service (I have logging in place to confirm this). The exception
seems to occur on the response from the web service. The response
object I get from the web service is null, though the web service is
sending the populated response object back. Obviously, I can't figure
out why this is happening.
Here is the code for the .aspx page for calling the web service:
// Create the variables
msTestService service = new msTestService();
String strEntryText = txtEnter.Text;
String strResult = "";
// Create the value in object
value_in valueIn = new value_in();
// Create the message in object
message messageIn = new message();
// Create the message out object
message messageOut = null;
// Set the input value
messageIn.message_value = strEntryText;
valueIn.v_in = messageIn;
// Call the web service
value_out valueOut = (value_out)service.getMessage(valueIn);
// Get the result value
try {
messageOut = valueOut.v_out;
strResult = messageOut.message_value;
} catch (Exception e) {
strResult = "Exception occurred. e=" + e.ToString();
}
// Set the result value
txtResult.Text = strResult;
The exception occurs in the try/catch block, when I try to get the
message_value from the messageOut object. Any help on this is greatly
appreciated. Thanks, and happy holidays all!