473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

error with web service call

hi all,
we are trying to hook up with a web service provided by one of our vendors.
i got their wsdl file and generated a proxy class using wsdl.exe. below is
the method signature as well as the class associated with it:

public partial class WSProxy :
System.Web.Services.Protocols.SoapHttpClientProtoc ol
{
....
public MyArray SearchThis([System.Xml.Serialization.XmlElementAttribute(Form
= System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = true)] string
SearchName)
{
object[] results = this.Invoke("SearchNow", new object[] {
SearchName});
return ((MyArray)(results[0]));
}
}

public partial class MyArray : Array
{
}

public partial class Array
{

private System.Xml.XmlElement[] anyField;

.....
}
and here is how i consume this method on my code.

try
{
private WSProxy proxy = new WSProxy();
myArray oArray = new myArray();
oArray = proxy.searchThis(strSearchName);
}
catch (Exception e)
{
throw e;
}

it looks simple to me; however, i am getting the following error:

message: "There is an error in XML document (2, 347)."
inner exception: "The specified type was not recognized: name='Array',
namespace='http://schemas.xmlsoap.org/soap/encoding/', at <SearchResult
xmlns=''>."

any suggestions?

thanks...a
Jun 5 '07 #1
1 1928
"Ace" <Ac*@discussions.microsoft.comwrote in message
news:E0**********************************@microsof t.com...
hi all,
we are trying to hook up with a web service provided by one of our
vendors.
i got their wsdl file and generated a proxy class using wsdl.exe. below
is
the method signature as well as the class associated with it:

public partial class WSProxy :
System.Web.Services.Protocols.SoapHttpClientProtoc ol
{
...
public MyArray
SearchThis([System.Xml.Serialization.XmlElementAttribute(Form
= System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = true)] string
SearchName)
{
object[] results = this.Invoke("SearchNow", new object[] {
SearchName});
return ((MyArray)(results[0]));
}
}

public partial class MyArray : Array
{
}

public partial class Array
{

private System.Xml.XmlElement[] anyField;

....
}
and here is how i consume this method on my code.

try
{
private WSProxy proxy = new WSProxy();
myArray oArray = new myArray();
oArray = proxy.searchThis(strSearchName);
}
catch (Exception e)
{
throw e;
}

it looks simple to me; however, i am getting the following error:

message: "There is an error in XML document (2, 347)."
inner exception: "The specified type was not recognized: name='Array',
namespace='http://schemas.xmlsoap.org/soap/encoding/', at <SearchResult
xmlns=''>."

any suggestions?
For one thing, I'd suggest your vendor not use the word "Array" as a type
name!

I'd like to see all or part of the WSDL, though. In particular, I'm
wondering where all the XML namespaces are.
--
John Saunders [MVP]
Jun 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Prasad | last post by:
Hi, I am writing a service which takes a long time to stop after the OnStop call is given by the Services Snap-in. The problem is I cannot cut down on the time that it takes to Stop. The Service...
0
by: MarkD | last post by:
I have an ASP.NET (VB.NET) application that calls all VB6 COM DLL via Interop. The DLL uses functionality contained in a Custom OCX Control (Also VB6) that in turn contains a standard TreeView...
4
by: jf li | last post by:
I have a Asp.net web application and a Asp.net Web service application. The Web application is using HtmlInputFile to get a 50M size of file selected by end user, read the data of this file and...
1
by: Scott Yen | last post by:
Hi, I'm using the following Axis java client to invoke a .Net web service hosted my localhost. Although the username and password is set on the "call", client gets (401) Access Denied"...
1
by: Pooja | last post by:
Hi, I am calling a web service to get Latitude and Longitude by sending a zip code. This is happening inside a loop (2000 - 3000 times). After say 80 times, it gives me an error - The operation...
4
by: Jason Richmeier | last post by:
I am sure this has been asked at least once before but I could not find anything when searching. If I set the value of the ExitCode property to 1066 for a windows service, the text "A service...
0
by: JeremyPollack | last post by:
Here's the situation : I have the same ASP.NET 2.0 web application running on both Machine A and Machine B. On both machines, I have Integrated Windows Authentication turned on, and Anonymous...
6
by: alho | last post by:
The web service is called by a program running on pocket pc. When to call the web service, the first call is still ok, but for the second or later calls, it will throw "403 Forbidden" WebException....
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.