473,657 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Cl ick method:

donow11service: :RainOrderServi ce * proxy =
new donow11service: :RainOrderServi ce();

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 3916
Read this and let us know if you have further questions

[1] http://support.microsoft.com/kb/814472/en-us
"Mike Woinoski" <mi******@pinen eedleconsulting .com> wrote in message
news:jJ******** ************@tw ister.nyc.rr.co m...
(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_Cl ick method:

donow11service: :RainOrderServi ce * proxy =
new donow11service: :RainOrderServi ce();

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******@pinen eedleconsulting .com> wrote in message
news:jJ******** ************@tw ister.nyc.rr.co m...
(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_Cl ick method:

donow11servic e::RainOrderSer vice * proxy =
new donow11service: :RainOrderServi ce();

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::Serv ice1 __gc* ws1 = new localhost::Serv ice1;
String * str = ws1->HelloWorld() ;
MessageBox::Sho w(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_Cl ick method:

donow11service: :RainOrderServi ce * proxy =
new donow11service: :RainOrderServi ce();

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
3389
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 we hide the link completely ? Plz help me !
9
4189
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 believe this is due mostly to the fact that the non-.Net apps are using POST instead of SOAP. If the non-.Net apps were using SOAP, they too would in fact "see" the exception. Is this true? Thanks!
6
1368
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
1374
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)> _ Public Function OpenLink(ByVal sQuery As String, ByVal sURL As String) As boolean ..... SomeCode to Open Internet Explorer with the URL
5
2197
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 have to provide the username and password to login to the application/web service. I need to be able to send the users authenticated security token to the web service. I have looked at the UserNameToken class of the WSE 2.0 Security.Tokens...
4
3991
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 told remoting was the way to go. So I got a client and a server program up and going and from the client I can call a routine in the server program. I can't figure out how to actually send data to the client. At the moment the client calls a...
5
1696
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 the data is stored. Can I convert the program to a web service and then in my ASP .NET project access the web service? The program basically parse weather data for the day periodically and store
6
3981
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 string UID; public string PWD; }
4
6907
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 simple because i have been banging my head against a wall with this for a while now. I have created a web service and a client Win forms application to consume the web service. The problem is i don't know where the web service will be deployed...
0
8384
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
8302
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,...
0
8718
jinu1996
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...
1
8499
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
8601
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...
0
7314
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5630
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
4150
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...
2
1601
bsmnconsultancy
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...

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.