I am new to .NET and I was trying to build a C++ web service returning 2 char
strings and 2 doubles. So, I am using a struct containing those 4 variables
and trying to return that struct (BT_STRUCT):
BT_STRUCT __gc* BAWSClass::Call_Bt( String* st_receb )
{
BT_STRUCT btrs;
.
.
return btrs;
}
When testing that web service (localhost), it returns the following
InvalidOperationException: BT_STRUCT* is inaccessible due to its protection
level. Only public types can be processed.
I've been trying for some time now to solve this but without success.
Certainly, someone in this discussion group can help me or direct me to info
where to find the solution.
Thanks for your help.
Pedro
Dan Rogers - 02 Dec 2004 22:06 GMT
Hi Pedro,
Instead of returning a struct, you will need to create a class that defines
your data type and return the typed instance.
Best regards
Dan Rogers
Microsoft Corporation
--------------------
Thread-Topic: BT_STRUCT* is inaccessible due to its protection level. Only
publi
thread-index: AcTTyDFc+Z07t/S/TiuIPvXrcrSktA==
X-WBNR-Posting-Host: 81.193.142.177
From: "=?Utf-8?B?UGVkcm8gQ2FydmFsaG8=?="
<PedroCarvalho@discussions.microsoft.com>
Subject: BT_STRUCT* is inaccessible due to its protection level. Only publi
Date: Fri, 26 Nov 2004 06:57:04 -0800
Lines: 21
Message-ID: <3E27C590-96D5-44DD-8452-9D96018F7108@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA
03.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7650
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices
I am new to .NET and I was trying to build a C++ web service returning 2
char
strings and 2 doubles. So, I am using a struct containing those 4 variables
and trying to return that struct (BT_STRUCT):
BT_STRUCT __gc* BAWSClass::Call_Bt( String* st_receb )
{
BT_STRUCT btrs;
.
.
return btrs;
}
When testing that web service (localhost), it returns the following
InvalidOperationException: BT_STRUCT* is inaccessible due to its protection
level. Only public types can be processed.
I've been trying for some time now to solve this but without success.
Certainly, someone in this discussion group can help me or direct me to
info
where to find the solution.
Thanks for your help.
Pedro