I have a simple .NET 2.0 web service created with VS.NET 2005 with a single
web method with the following signature:
[WebMethod]
void HelloWorld(Guid parameter1);
When calling this method I receive the following error:
System.IndexOut OfRangeExceptio n: Index was outside the bounds of the array.
at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type)
at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( )
at System.Web.Serv ices.Protocols. ServerProtocol. SetContext(Type type,
HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing )If I change the type of parameter1 to a simple type such as
string or int then the method works as expected. My operating system is
Windows 2003 Server R2 (Enterprise Edition) with all the latest patches.
I see several other people have run into this error. Does anyone have an
idea how to correct this?
Thanks,
Michael 5 6500
"Michael Primeaux" <mj********@msn .comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>I have a simple .NET 2.0 web service created with VS.NET 2005 with a single web method with the following signature:
[WebMethod]
void HelloWorld(Guid parameter1);
When calling this method I receive the following error:
System.IndexOut OfRangeExceptio n: Index was outside the bounds of the
array.
at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type)
at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( )
at System.Web.Serv ices.Protocols. ServerProtocol. SetContext(Type type,
HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing )If I change the type of parameter1 to a simple type such
as string or int then the method works as expected. My operating system is
Windows 2003 Server R2 (Enterprise Edition) with all the latest patches.
I see several other people have run into this error. Does anyone have an
idea how to correct this?
First of all, I'd suggest that System.Guid is a platform-specific type, so
why do you want to use it in a Web Service? Perhaps you should make your
parameter be of type string, and then parse out the Guid from the string.
John
Hi John,
I do understand the Guid parameter is a platform-specific type. That said,
the generated WSDL defines the type as a string but with format constraints
(a regular expression in the form
"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}".
I have both JAVA and PHP consumers calling several services with Guid
parameters without issue; again, from their perspective it's a string with
format contraints.
However, this does not explain the below exception. Any help specific as to
why the exception occurs is appreciated.
Kindest regards,
Michael
"John Saunders" <john.saunder s at trizetto.comwro te in message
news:uK******** ******@TK2MSFTN GP05.phx.gbl...
"Michael Primeaux" <mj********@msn .comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>>I have a simple .NET 2.0 web service created with VS.NET 2005 with a single web method with the following signature:
[WebMethod] void HelloWorld(Guid parameter1);
When calling this method I receive the following error: System.IndexOu tOfRangeExcepti on: Index was outside the bounds of the array. at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type) at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( ) at System.Web.Serv ices.Protocols. ServerProtocol. SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing )If I change the type of parameter1 to a simple type such as string or int then the method works as expected. My operating system is Windows 2003 Server R2 (Enterprise Edition) with all the latest patches.
I see several other people have run into this error. Does anyone have an idea how to correct this?
First of all, I'd suggest that System.Guid is a platform-specific type, so
why do you want to use it in a Web Service? Perhaps you should make your
parameter be of type string, and then parse out the Guid from the string.
John
You could define GUID as a schema type and use that versus System.Guid and
relying on how the platform will translate it:
The following was snipped off the web:
<xsd:simpleTy pe name="GUID">
<xsd:annotation >
<xsd:documentat ion xml:lang="en">
The representation of a GUID, generally the id of an element.
</xsd:documentati on>
</xsd:annotation>
<xsd:restrictio n base="xsd:strin g">
<xsd:pattern
value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>
</xsd:restriction >
</xsd:simpleType>
I believe I've seen that same type definition for one of Microsoft's
products, SharePoint or something maybe.
Ron
"Michael Primeaux" <mj********@msn .comwrote in message
news:OI******** ******@TK2MSFTN GP04.phx.gbl...
Hi John,
I do understand the Guid parameter is a platform-specific type. That said,
the generated WSDL defines the type as a string but with format
constraints (a regular expression in the form
"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}".
I have both JAVA and PHP consumers calling several services with Guid
parameters without issue; again, from their perspective it's a string with
format contraints.
However, this does not explain the below exception. Any help specific as
to why the exception occurs is appreciated.
Kindest regards,
Michael
"John Saunders" <john.saunder s at trizetto.comwro te in message
news:uK******** ******@TK2MSFTN GP05.phx.gbl...
>"Michael Primeaux" <mj********@msn .comwrote in message news:%2******* *********@TK2MS FTNGP03.phx.gbl ...
>>>I have a simple .NET 2.0 web service created with VS.NET 2005 with a single web method with the following signature:
[WebMethod] void HelloWorld(Guid parameter1);
When calling this method I receive the following error: System.IndexO utOfRangeExcept ion: Index was outside the bounds of the array. at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type) at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( ) at System.Web.Serv ices.Protocols. ServerProtocol. SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing )If I change the type of parameter1 to a simple type such as string or int then the method works as expected. My operating system is Windows 2003 Server R2 (Enterprise Edition) with all the latest patches.
I see several other people have run into this error. Does anyone have an idea how to correct this?
First of all, I'd suggest that System.Guid is a platform-specific type, so why do you want to use it in a Web Service? Perhaps you should make your parameter be of type string, and then parse out the Guid from the string.
John
Hi Ron,
I appreciate your time. As indicated in my previous post that is precisely
what I do. The issue is that I receive the following error when doing so:
[WebMethod]
void HelloWorld(Guid parameter1);
When calling this method I receive the following error:
System.IndexOut OfRangeExceptio n: Index was outside the bounds of the array.
at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type)
at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( )
at System.Web.Serv ices.Protocols. ServerProtocol. SetContext(Type type,
HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing )If I change the type of parameter1 to a simple type such as
string or int then the method works as expected. My operating system is
Windows 2003 Server R2 (Enterprise Edition) with all the latest patches.
"RYoung" <rcyoungatinksp otdev.comwrote in message
news:uf******** ******@TK2MSFTN GP04.phx.gbl...
You could define GUID as a schema type and use that versus System.Guid and
relying on how the platform will translate it:
The following was snipped off the web:
<xsd:simpleTy pe name="GUID">
<xsd:annotation >
<xsd:documentat ion xml:lang="en">
The representation of a GUID, generally the id of an element.
</xsd:documentati on>
</xsd:annotation>
<xsd:restrictio n base="xsd:strin g">
<xsd:pattern
value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>
</xsd:restriction >
</xsd:simpleType>
I believe I've seen that same type definition for one of Microsoft's
products, SharePoint or something maybe.
Ron
"Michael Primeaux" <mj********@msn .comwrote in message
news:OI******** ******@TK2MSFTN GP04.phx.gbl...
>Hi John,
I do understand the Guid parameter is a platform-specific type. That said, the generated WSDL defines the type as a string but with format constraints (a regular expression in the form "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}". I have both JAVA and PHP consumers calling several services with Guid parameters without issue; again, from their perspective it's a string with format contraints.
However, this does not explain the below exception. Any help specific as to why the exception occurs is appreciated.
Kindest regards, Michael
"John Saunders" <john.saunder s at trizetto.comwro te in message news:uK******* *******@TK2MSFT NGP05.phx.gbl.. .
>>"Michael Primeaux" <mj********@msn .comwrote in message news:%2****** **********@TK2M SFTNGP03.phx.gb l... I have a simple .NET 2.0 web service created with VS.NET 2005 with a single web method with the following signature:
[WebMethod] void HelloWorld(Guid parameter1);
When calling this method I receive the following error: System.Index OutOfRangeExcep tion: Index was outside the bounds of the array. at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type) at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( ) at System.Web.Serv ices.Protocols. ServerProtocol. SetContext(Type type, HttpContex t context, HttpRequest request, HttpResponse response) at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing )If I change the type of parameter1 to a simple type such as string or int then the method works as expected. My operating system is Windows 2003 Server R2 (Enterprise Edition) with all the latest patches.
I see several other people have run into this error. Does anyone have an idea how to correct this?
First of all, I'd suggest that System.Guid is a platform-specific type, so why do you want to use it in a Web Service? Perhaps you should make your parameter be of type string, and then parse out the Guid from the string.
John
Sorry about that, didn't realize System.Guid was serializable.
I can't reproduce the error here. Just a simple web service with the same
signature as what you've posted, and a console client calling the service
and passing a Guid.NewGuid() to it. Tried Guid.Empty as well.
Is it safe to say that since you aren't getting a SoapException, that the
exception is occuring on the client side? I know you mention changing the
signature from Guid to String and everything works, but I think there's an
issue serializing the value of what's supposed to be a guid on the client.
How about if you change the signature to string, have the service log the
value it receives and see if that value is a valid Guid format?
Ron
"Michael Primeaux" <mj********@msn .comwrote in message
news:OP******** ******@TK2MSFTN GP03.phx.gbl...
Hi Ron,
I appreciate your time. As indicated in my previous post that is precisely
what I do. The issue is that I receive the following error when doing so:
[WebMethod]
void HelloWorld(Guid parameter1);
When calling this method I receive the following error:
System.IndexOut OfRangeExceptio n: Index was outside the bounds of the
array.
at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type)
at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( )
at System.Web.Serv ices.Protocols. ServerProtocol. SetContext(Type type,
HttpContext context, HttpRequest request, HttpResponse response)
at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type,
HttpContext context, HttpRequest request, HttpResponse response, Boolean&
abortProcessing )If I change the type of parameter1 to a simple type such
as
string or int then the method works as expected. My operating system is
Windows 2003 Server R2 (Enterprise Edition) with all the latest patches.
"RYoung" <rcyoungatinksp otdev.comwrote in message
news:uf******** ******@TK2MSFTN GP04.phx.gbl...
>You could define GUID as a schema type and use that versus System.Guid and relying on how the platform will translate it:
The following was snipped off the web:
<xsd:simpleTyp e name="GUID">
<xsd:annotation >
<xsd:documentat ion xml:lang="en">
The representation of a GUID, generally the id of an element.
</xsd:documentati on>
</xsd:annotation>
<xsd:restrictio n base="xsd:strin g">
<xsd:pattern
value="\{[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\}"/>
</xsd:restriction >
</xsd:simpleType>
I believe I've seen that same type definition for one of Microsoft's products, SharePoint or something maybe.
Ron
"Michael Primeaux" <mj********@msn .comwrote in message news:OI******* *******@TK2MSFT NGP04.phx.gbl.. .
>>Hi John,
I do understand the Guid parameter is a platform-specific type. That said, the generated WSDL defines the type as a string but with format constraints (a regular expression in the form "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}". I have both JAVA and PHP consumers calling several services with Guid parameters without issue; again, from their perspective it's a string with format contraints.
However, this does not explain the below exception. Any help specific as to why the exception occurs is appreciated.
Kindest regards, Michael
"John Saunders" <john.saunder s at trizetto.comwro te in message news:uK****** ********@TK2MSF TNGP05.phx.gbl. .. "Michael Primeaux" <mj********@msn .comwrote in message news:%2***** ***********@TK2 MSFTNGP03.phx.g bl... >I have a simple .NET 2.0 web service created with VS.NET 2005 with a >single web method with the following signature: > [WebMethod] void HelloWorld(Guid parameter1); > When calling this method I receive the following error: System.Inde xOutOfRangeExce ption: Index was outside the bounds of the array. at System.Web.Serv ices.Protocols. HttpServerType. .ctor(Type type) at System.Web.Serv ices.Protocols. HttpServerProto col.Initialize( ) at System.Web.Serv ices.Protocols. ServerProtocol. SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Serv ices.Protocols. ServerProtocolF actory.Create(T ype type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing )If I change the type of parameter1 to a simple type such as string or int then the method works as expected. My operating system is Windows 2003 Server R2 (Enterprise Edition) with all the latest patches. > I see several other people have run into this error. Does anyone have an idea how to correct this?
First of all, I'd suggest that System.Guid is a platform-specific type, so why do you want to use it in a Web Service? Perhaps you should make your parameter be of type string, and then parse out the Guid from the string.
John This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: headware |
last post by:
Is the GUID generated by the .NET System.Guid.NewGuid() function
compatible with Access' Replication ID field type?
Dave
|
by: sergi |
last post by:
Hi there,
I am getting a System.NullReference exception when calling an unmanaged
method CreateClassEnumerator. I am really new to Interop, so that I am
having trouble finding out a solution. The code is the following :
<code>
using System;
|
by: Nadav |
last post by:
Hi,
I am using the System.Type.GUID to identify similar types on different
computers, one computer send the GUID through a socket while the other
resolve the GUID and identify the type, when working on a single computer
everything works fine, BUT, when working on two different computers the GUID
extracted from one type is different from the GUID extracted from the same
type on the other computer. why is that happening? shouldn't a guid...
|
by: Lee Crabtree |
last post by:
I've been wrapping an unmanaged class, and everything has gone well. That
is...until now.
I've hit a wall while trying to marshal the System::Guid type down into the
unmanaged GUID structure that the unmanaged class asks for. For some
reason, none of my attempts to date have met with success. Maybe someone
else has an idea how this works?
Lee
|
by: rcolby |
last post by:
Evening,
Wondering if someone can point me in the right direction, on how I would
compare a system.guid with a system.byte.
system.guid (pulled from sql server table with a data type of
uniqueidentifier, originally taken from objectGUID from active directory
domain)
| |
by: Tarren |
last post by:
Hi:
I need to get the unique GUID for a file, so I am using API calls through
System.InteropServices
I am using
BY_HANDLE_FILE_INFORMATION
and
|
by: Jeff |
last post by:
ASP.NET 2.0
In the code below, the reader has a column named "Id". The MsgInfo class
needs that value sent into its constructor. But MsgInfo need it as a
System.Guid datatype. How do I convert this "Id" value to System.Guid
datatype??
protected virtual MsgInfo ReadMessage(IDataReader reader)
{
return new MsgInfo(System.Guid(reader) <.---- this code crashes
|
by: Jeff |
last post by:
ASP.NET 2.0
This problem occur using the basic version of SQL Server 2005 which get
installed when installing Visual Studio 2005!
I have inserted a record in the Test table. But when I try to insert a
second record I get this error:
{"Violation of PRIMARY KEY constraint 'PK_Test'. Cannot insert duplicate key
in object 'dbo.Test'.
|
by: Jeff |
last post by:
ASP.NET 2.0
I'm wondering how to convert a string into a System.Guid!
I have this code where I want to use the convert:
Message.DeleteMessage(hidden.Value);. Here DeleteMessage wants an argument
of type System.Guid, but the hidden.Value (HiddenField) has stored it as a
string. I need to convert the value of hidden.Value to a System.Guid for
this to compile, but how??
|
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...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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,...
|
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();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |