PC Review


Reply
Thread Tools Rate Thread

Bug in Visual C++.NET 2003 Webservice import?

 
 
Thijs
Guest
Posts: n/a
 
      26th Aug 2003
Hi,

I am developing both a webservice and a Windows Forms webservice client.
After I've deployed my webservice to the webserver I update my webservice
reference in my client application, but the code generated by the webservice
import program (wsdl version 1.1.4322.573) does not compile. I have to edit
it manually to get it working.

My webservice looks something like this (cut-down):

namespace MyNamespace {
public __gc class MyWebService: public System::Web::Services::WebService
{
public:
__value struct MyDataStruct {
int id;
String *name;
};
// ...
private:
// ...
public:
// web methods go here...
[System::Web::Services::WebMethod(Description="Gives some data
back")]
MyDataStruct GetData(void);
};
}

Now when I import this with VC++ in my client application, it generates a
header file that looks something like this:

namespace MyNamespace {
public __gc class MyWebService: public System::Web::Services::WebService
{
public:

[System::Xml::Serialization::XmlTypeAttribute(Namespace=S"http://mynamespace
")]
public __gc class MyDataStruct {
/// <remarks/>
public: System::Int32 id;
/// <remarks/>
public: System::String * name;
};
// ...
private:
// ...
public:
// web methods go here...
inline MyWebService::MyDataStruct * MyWebService::GetData(void)
{ // <-- Error here
System::Object * results[] = this->Invoke(S"GetData", new
System::Object * [0]);
return (__try_cast<MyWebService::MyDataStruct * >(results[0]));
// <-- Error here
};
};
}

This code will not compile because MyWebService::MyDataStruct is not a valid
type when defined within class MyWebService. So I have to manually replace
all occurences of "MyWebService::MyDataStruct" to "MyDataStruct" for the
code to compile (and thus before I can use it).

This is rather annoying so I'd like to ask if anyone has experienced this
before and could tell me if I am doing something wrong or this is just a bug
and (hopefully) will be fixed soon.

Thanks in advance.

Best Regards,

Thijs




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can access webService design in visual web developer 2005 as we access from iis server in days of VS 2003 kamig Microsoft ASP .NET 1 17th Mar 2006 10:05 PM
Office 2003 Webservice Toolkit 2.01 and ASP.NET 2.0 Webservice - Problem Neil Young Microsoft Dot NET Framework 0 6th Mar 2006 09:47 AM
Excel 2003: Grabbing a dataset from a webservice and then sending to a webservice? gjn Microsoft Excel Programming 1 7th Oct 2005 04:00 PM
How can i import data from a Visual FoxPro 6.0 to an Access 2003 D =?Utf-8?B?UmljYXJkbw==?= Microsoft Access VBA Modules 5 27th Aug 2005 06:52 PM
Re: Import c files in visual studio 2003 Geert M Microsoft VC .NET 1 31st Aug 2003 03:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:19 AM.