473,396 Members | 1,773 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,396 software developers and data experts.

link problem in a C++ web service client

(I'm new to VS, so please forgive me if this is a faq.) I'm writing some Java
web services and need to test them with C++ clients. I can use either a Windows
Form application or an MFC application. I used VS.NET 2003 to create a C# client
that successfully processes SOAP messages to and from the Java service. However,
I'm having problems with the C++ client.

I created a new solution and a new project with File > New > Visual C++ Projects
Windows Forms Application. Under the project's References, I created a web

reference to the service WSDL and named the reference donow11service, exactly as
I did with the C# client. VS gave the following warning when creating the proxy:

Creating web service proxy file for donow11service ...
Writing file 'donow11service.h'.
donow11service.h
LINK : warning LNK4243: DLL containing objects compiled with /clr is not
linked with /NOENTRY; image may not run correctly

I added the following code in the submitButton_Click method:

donow11service::RainOrderService * proxy =
new donow11service::RainOrderService();

When I build the project, I get the following messages:

Linking...
stdafx.obj : warning LNK4227: metadata operation warning (00131189) :
Inconsistent parameter information in duplicated methods (methods:
orderRecording; type: __boxed_System_Boolean): (0x08000008).
stdafx.obj : error LNK2022: metadata operation failed (80131195) : Custom
attributes are not consistent: (0x0c000007).
LINK : fatal error LNK1255: link failed because of metadata errors

If I comment out the line that creates the proxy, the application runs. Why are
there errors in stdafx.obj? Is there a linker option I need to set somewhere?
Any help would be much appreciated.

Thanks,
Mike
Nov 17 '05 #1
4 3894
Read this and let us know if you have further questions

[1] http://support.microsoft.com/kb/814472/en-us
"Mike Woinoski" <mi******@pineneedleconsulting.com> wrote in message
news:jJ********************@twister.nyc.rr.com...
(I'm new to VS, so please forgive me if this is a faq.) I'm writing some
Java web services and need to test them with C++ clients. I can use either
a Windows Form application or an MFC application. I used VS.NET 2003 to
create a C# client that successfully processes SOAP messages to and from
the Java service. However, I'm having problems with the C++ client.

I created a new solution and a new project with File > New > Visual C++
Projects
Windows Forms Application. Under the project's References, I created a
web

reference to the service WSDL and named the reference donow11service,
exactly as I did with the C# client. VS gave the following warning when
creating the proxy:

Creating web service proxy file for donow11service ...
Writing file 'donow11service.h'.
donow11service.h
LINK : warning LNK4243: DLL containing objects compiled with /clr is not
linked with /NOENTRY; image may not run correctly

I added the following code in the submitButton_Click method:

donow11service::RainOrderService * proxy =
new donow11service::RainOrderService();

When I build the project, I get the following messages:

Linking...
stdafx.obj : warning LNK4227: metadata operation warning (00131189) :
Inconsistent parameter information in duplicated methods (methods:
orderRecording; type: __boxed_System_Boolean): (0x08000008).
stdafx.obj : error LNK2022: metadata operation failed (80131195) :
Custom
attributes are not consistent: (0x0c000007).
LINK : fatal error LNK1255: link failed because of metadata errors

If I comment out the line that creates the proxy, the application runs.
Why are there errors in stdafx.obj? Is there a linker option I need to set
somewhere? Any help would be much appreciated.

Thanks,
Mike

Nov 17 '05 #2
Marcus,

Marcus Heege wrote:
Read this and let us know if you have further questions

[1] http://support.microsoft.com/kb/814472/en-us
It's not clear to me which portions of this article apply to my project (a
simple Windows Forms app), since the article seems to be targeted for developers
of mixed DLLs. However, I assume that you are implying that my link error occurs
because my project is mixing DLLs. If I interpret the article correctly, it
looks like steps to fix the the linker problem are:

1. "The first step to manual initialization is to make sure that you disable the
automatic initialization code"
2. "After you remove the explicit entry point, you must modify components that
consume the DLL for manual initialization"

I followed the steps under "Remove the Entry Point of the Managed DLL". After
that, it's not clear to me how to proceed, because I didn't add any code that
consumes a DLL for manual initialization (at least, not explicitly). I think
that, because I'm writing an application and not a DLL, the section that applies
to my project is "Users of Visual C++ .NET 2002", which says I need to include
_vcclrit.h in my project. However, adding _vcclrit.h in my Form.h or Form.cpp
just cause more compile or link errors. Without _vcclrit.h, the changes I made
to the project in the first step generate more errors than I had originally.

Remember I'm a Java developer, so don't be shy about explaining things in
monosyllables. ;-)

Thanks,
Mike


"Mike Woinoski" <mi******@pineneedleconsulting.com> wrote in message
news:jJ********************@twister.nyc.rr.com...
(I'm new to VS, so please forgive me if this is a faq.) I'm writing some
Java web services and need to test them with C++ clients. I can use either
a Windows Form application or an MFC application. I used VS.NET 2003 to
create a C# client that successfully processes SOAP messages to and from
the Java service. However, I'm having problems with the C++ client.

I created a new solution and a new project with File > New > Visual C++
Projects
Windows Forms Application. Under the project's References, I created a
web


reference to the service WSDL and named the reference donow11service,
exactly as I did with the C# client. VS gave the following warning when
creating the proxy:

Creating web service proxy file for donow11service ...
Writing file 'donow11service.h'.
donow11service.h
LINK : warning LNK4243: DLL containing objects compiled with /clr is not
linked with /NOENTRY; image may not run correctly

I added the following code in the submitButton_Click method:

donow11service::RainOrderService * proxy =
new donow11service::RainOrderService();

When I build the project, I get the following messages:

Linking...
stdafx.obj : warning LNK4227: metadata operation warning (00131189) :
Inconsistent parameter information in duplicated methods (methods:
orderRecording; type: __boxed_System_Boolean): (0x08000008).
stdafx.obj : error LNK2022: metadata operation failed (80131195) :
Custom
attributes are not consistent: (0x0c000007).
LINK : fatal error LNK1255: link failed because of metadata errors

If I comment out the line that creates the proxy, the application runs.
Why are there errors in stdafx.obj? Is there a linker option I need to set
somewhere? Any help would be much appreciated.

Thanks,
Mike


Nov 17 '05 #3
>> [1] http://support.microsoft.com/kb/814472/en-us

It's not clear to me which portions of this article apply to my project (a
simple Windows Forms app), since the article seems to be targeted for
developers of mixed DLLs. However, I assume that you are implying that my
link error occurs because my project is mixing DLLs. If I interpret the
article correctly, it looks like steps to fix the the linker problem are:


Indeed this article applies to DLLs only. But your linker error
LINK : warning LNK4243: DLL containing objects compiled with /clr is
not
linked with /NOENTRY; image may not run correctly


should occur only if you compile DLLs.

To find something more about your problem. I have created a ASP.NET
WebService and a Managed C++ client, but I couldn't reproduce the problem.
My code seems to compile and link and execute without problems.

Here is what I have done:

1) Solution Explorer / Solution's context menu / Add project Console
Application (.NET)
Name: WFClient
2) Soltuion Exporer / WFClient's context menu / Add Web Reference
URL: ... url url
Button Add Reference
3) Add a button on your form and double click it to implement a handler.
4) Implement the handler to call your web service. For my web service this
was:

localhost::Service1 __gc* ws1 = new localhost::Service1;
String * str = ws1->HelloWorld();
MessageBox::Show(str);

Start and test your application.

Please try the same and let me know if this still causes the problems you
have.

Marcus
Nov 17 '05 #4
sir
No Prob

"Mike Woinoski" wrote:
(I'm new to VS, so please forgive me if this is a faq.) I'm writing some Java
web services and need to test them with C++ clients. I can use either a Windows
Form application or an MFC application. I used VS.NET 2003 to create a C# client
that successfully processes SOAP messages to and from the Java service. However,
I'm having problems with the C++ client.

I created a new solution and a new project with File > New > Visual C++ Projects
> Windows Forms Application. Under the project's References, I created a web

reference to the service WSDL and named the reference donow11service, exactly as
I did with the C# client. VS gave the following warning when creating the proxy:

Creating web service proxy file for donow11service ...
Writing file 'donow11service.h'.
donow11service.h
LINK : warning LNK4243: DLL containing objects compiled with /clr is not
linked with /NOENTRY; image may not run correctly

I added the following code in the submitButton_Click method:

donow11service::RainOrderService * proxy =
new donow11service::RainOrderService();

When I build the project, I get the following messages:

Linking...
stdafx.obj : warning LNK4227: metadata operation warning (00131189) :
Inconsistent parameter information in duplicated methods (methods:
orderRecording; type: __boxed_System_Boolean): (0x08000008).
stdafx.obj : error LNK2022: metadata operation failed (80131195) : Custom
attributes are not consistent: (0x0c000007).
LINK : fatal error LNK1255: link failed because of metadata errors

If I comment out the line that creates the proxy, the application runs. Why are
there errors in stdafx.obj? Is there a linker option I need to set somewhere?
Any help would be much appreciated.

Thanks,
Mike

Nov 17 '05 #5

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

Similar topics

2
by: Baby Blue | last post by:
I am using a free domain service and phpNuke 7.5 for my site ! Although I turn on "cloaking" fearture in my domain service to hide the realink, we can see the realink in the status bar of I.E. Can...
9
by: Marty McDonald | last post by:
If I invoke a web service, and it throws an exception, I can see the exception if the client app is a .Net app. However, if the client app is not a .Net app, I only receive the HTTP 500 error. I...
6
by: Xerxes | last post by:
Hi, how can I activate a login when someone clicks on a link? I want only authorized users to have access to the pages accessible through the links. Thanks.
2
by: Jean-Yves | last post by:
Hi. I would like to open an ASP.NET page from a Web Method like this: Form my WinForm App: OpenLink("Select * From Customers", "http://myserver/ReportApp/ShowReport.aspx") <(Web Method)> _...
5
by: Buddy Ackerman | last post by:
My app is a .NET forms app that runs in the taskbar and periodically polls a web service. I have a client that wants the app to integrate with their Active Directory. They do not want the user to...
4
by: WinDev | last post by:
We are trying to build a system where we have a Windows Service do some manipulation of data, and then sending the data to a Windows App. I had posted a question of how we should do this and was...
5
by: James | last post by:
Hi, I working on an ASP .NET project, in this project I need to link my project with another program to retrieve data, how can I do that? I have access to source code of the other program where...
6
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public...
4
by: =?Utf-8?B?Z3Jhenph?= | last post by:
Hello If someone can help me with this it would be greatly appreciated. I’m no web service expert but I don't think i'm trying to do anything too special. I think i must be missing something...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.