473,796 Members | 2,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Serv ices.Protocols. SoapHttpClientP rotocol
{
....
public MyArray SearchThis([System.Xml.Seri alization.XmlEl ementAttribute( Form
= System.Xml.Sche ma.XmlSchemaFor m.Unqualified, IsNullable = true)] string
SearchName)
{
object[] results = this.Invoke("Se archNow", new object[] {
SearchName});
return ((MyArray)(resu lts[0]));
}
}

public partial class MyArray : Array
{
}

public partial class Array
{

private System.Xml.XmlE lement[] anyField;

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

try
{
private WSProxy proxy = new WSProxy();
myArray oArray = new myArray();
oArray = proxy.searchThi s(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 1969
"Ace" <Ac*@discussion s.microsoft.com wrote in message
news:E0******** *************** ***********@mic rosoft.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.Serv ices.Protocols. SoapHttpClientP rotocol
{
...
public MyArray
SearchThis([System.Xml.Seri alization.XmlEl ementAttribute( Form
= System.Xml.Sche ma.XmlSchemaFor m.Unqualified, IsNullable = true)] string
SearchName)
{
object[] results = this.Invoke("Se archNow", new object[] {
SearchName});
return ((MyArray)(resu lts[0]));
}
}

public partial class MyArray : Array
{
}

public partial class Array
{

private System.Xml.XmlE lement[] anyField;

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

try
{
private WSProxy proxy = new WSProxy();
myArray oArray = new myArray();
oArray = proxy.searchThi s(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
1592
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 snap-in gives me the error saying that the service did not respond to the Stop call in a timely fashion. So is there any method by which I can get around this problem. Thanks Prasad
0
2488
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 control. The Custom OCX is not used for visual purposes, but has some functionality that we require (hence hosting an OCX in a DLL). Everything worked fine until we installed the latest service pack for each respective windows operating system:...
4
6215
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 pass the data to the web service. I already modified both web.config files and changed maxRequestLength to 60000(kb). When I debug the upload process, it seems the Web application can get the 50M file and read the data without problem, but when the...
1
2636
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" exception. private static void testTest() { try { String endpoint = "http://localhost/WebService1/Service1.asmx"; String method = "Test";
1
4112
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 has timed out. If I continue by pressing F10, the process starts again and everything is fine. After some time again it will stop, show me an error on the line where I am calling webservice and if i say F10, it will again continue. I wanted to...
4
6812
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 specific error occured: 0." How do I (if it is possible) change the value of the zero to something custom (like a "look in the event log for further information" message)? Thank you,
0
1692
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 Access turned off for the folder that contains the webservice .ASMX file. When I hit a certain page on Machine A, it will call the web service on Machine A, and then it will call the same web service on Machine B. Likewise, when I hit the same...
6
3375
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. When to test it using the web interface on pocket IE, everything is fine. Before there was no such problem, it only happened within a week or so. I suspect it's caused by the server's firewall settings, but how come the first call is ok? This...
3
4429
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 the other machine I get the error upon instantiating the service client. I add the reference by choosing Add Service Reference from the project menu, and pointing to the remote wsdl file. I can't seem to find what the difference between the two...
0
9680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10012
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7548
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.