I added a method that returns an array of int and I can call that method
fine from my .net app.
As for the proxy code, this is an asp.net 2.0 app I'm consuming from, so
most proxy code is done somehow behind the scenes which I can't seem to get
to decided to consume it from a .net windows app, which generates the same
error, and does let me see the proxy code, so I included that below.
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version
2.0.50727.42.
//
#pragma warning disable 1591
namespace WindowsApplication1.PersonWS {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="PersonWSSoapBinding",
Namespace="http://dc1serv306:8080/axis/PersonWS.jws")]
[System.Xml.Serialization.SoapIncludeAttribute(typeof(WorkGroupData))]
public partial class PersonWSService :
System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback TestOperationCompleted;
private System.Threading.SendOrPostCallback
ListWorkGroupsOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
/// <remarks/>
public PersonWSService() {
this.Url =
global::WindowsApplication1.Properties.Settings.Default.WindowsApplication1_PersonWS_PersonWSService;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}
public new string Url {
get {
return base.Url;
}
set {
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
&& (this.useDefaultCredentialsSetExplicitly ==
false))
&& (this.IsLocalFileSystemWebService(value) ==
false))) {
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}
public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
}
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}
/// <remarks/>
public event TestCompletedEventHandler TestCompleted;
/// <remarks/>
public event ListWorkGroupsCompletedEventHandler
ListWorkGroupsCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="http://DefaultNamespace",
ResponseNamespace="http://dc1serv306:8080/axis/PersonWS.jws")]
[return:
System.Xml.Serialization.SoapElementAttribute("TestReturn")]
public int[] Test(string strPerson) {
object[] results = this.Invoke("Test", new object[] {
strPerson});
return ((int[])(results[0]));
}
/// <remarks/>
public void TestAsync(string strPerson) {
this.TestAsync(strPerson, null);
}
/// <remarks/>
public void TestAsync(string strPerson, object userState) {
if ((this.TestOperationCompleted == null)) {
this.TestOperationCompleted = new
System.Threading.SendOrPostCallback(this.OnTestOperationCompleted);
}
this.InvokeAsync("Test", new object[] {
strPerson}, this.TestOperationCompleted, userState);
}
private void OnTestOperationCompleted(object arg) {
if ((this.TestCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs
invokeArgs =
((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.TestCompleted(this, new
TestCompletedEventArgs(invokeArgs.Results, invokeArgs.Error,
invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="http://DefaultNamespace",
ResponseNamespace="http://dc1serv306:8080/axis/PersonWS.jws")]
[return:
System.Xml.Serialization.SoapElementAttribute("ListWorkGroupsReturn")]
public WorkGroupData[] ListWorkGroups(string strPerson) {
object[] results = this.Invoke("ListWorkGroups", new object[] {
strPerson});
return ((WorkGroupData[])(results[0]));
}
/// <remarks/>
public void ListWorkGroupsAsync(string strPerson) {
this.ListWorkGroupsAsync(strPerson, null);
}
/// <remarks/>
public void ListWorkGroupsAsync(string strPerson, object userState)
{
if ((this.ListWorkGroupsOperationCompleted == null)) {
this.ListWorkGroupsOperationCompleted = new
System.Threading.SendOrPostCallback(this.OnListWorkGroupsOperationCompleted);
}
this.InvokeAsync("ListWorkGroups", new object[] {
strPerson}, this.ListWorkGroupsOperationCompleted,
userState);
}
private void OnListWorkGroupsOperationCompleted(object arg) {
if ((this.ListWorkGroupsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs
invokeArgs =
((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ListWorkGroupsCompleted(this, new
ListWorkGroupsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error,
invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
}
System.Uri wsUri = new System.Uri(url);
if (((wsUri.Port >= 1024)
&& (string.Compare(wsUri.Host, "localHost",
System.StringComparison.OrdinalIgnoreCase) == 0))) {
return true;
}
return false;
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml",
"2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.SoapTypeAttribute(Namespace="http://openview.comp.ca")]
public partial class WorkGroupData {
private string nameField;
private string searchCodeField;
/// <remarks/>
[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public string Name {
get {
return this.nameField;
}
set {
this.nameField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public string SearchCode {
get {
return this.searchCodeField;
}
set {
this.searchCodeField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
public delegate void TestCompletedEventHandler(object sender,
TestCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class TestCompletedEventArgs :
System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal TestCompletedEventArgs(object[] results, System.Exception
exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((int[])(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
public delegate void ListWorkGroupsCompletedEventHandler(object sender,
ListWorkGroupsCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services",
"2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class ListWorkGroupsCompletedEventArgs :
System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal ListWorkGroupsCompletedEventArgs(object[] results,
System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public WorkGroupData[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((WorkGroupData[])(this.results[0]));
}
}
}
}
>> I've writtin a very simple web service in axis which returns an array of
>> classes.
[quoted text clipped - 14 lines]
>
> John
John Saunders - 13 Mar 2007 00:48 GMT
>I added a method that returns an array of int and I can call that method
>fine from my .net app.
[quoted text clipped - 3 lines]
> get to decided to consume it from a .net windows app, which generates the
> same error, and does let me see the proxy code, so I included that below.
I didn't see anything blatantly wrong with the proxy code. Are you able to
find the line of code that the exception references?
John