Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to perform opening a file? Pin
ewighell19-Jul-06 14:59
ewighell19-Jul-06 14:59 
AnswerRe: How to perform opening a file? Pin
Stephen Hewitt19-Jul-06 15:11
Stephen Hewitt19-Jul-06 15:11 
GeneralRe: How to perform opening a file? Pin
ewighell19-Jul-06 15:16
ewighell19-Jul-06 15:16 
AnswerRe: How to perform opening a file? Pin
Hamid_RT19-Jul-06 19:11
Hamid_RT19-Jul-06 19:11 
QuestionSystem-Wide WriteProcessMemory Hook Pin
capricious_00119-Jul-06 14:16
capricious_00119-Jul-06 14:16 
AnswerRe: System-Wide WriteProcessMemory Hook Pin
Stephen Hewitt19-Jul-06 15:22
Stephen Hewitt19-Jul-06 15:22 
GeneralPreventing the C++ compiler to optimize [solved] [modified] Pin
Jörgen Sigvardsson19-Jul-06 13:14
Jörgen Sigvardsson19-Jul-06 13:14 
QuestionFailed to invoke web services in VC++, please help [modified] Pin
Liu Shuai19-Jul-06 11:38
Liu Shuai19-Jul-06 11:38 
Hi all,

I'm trying to invoke web services written in c# from a VC++ 7.1 app.
The function I'm invoking is quite simple.
<code>
[WebMethod]
public int Foo(int i)
{
return i + 1;
}
</code>

It works fine when I test the client in C#. I then tested in VC++. I added the web reference and SPROXY generate the header files for me. Here's is my client code in c++

<code>
...
if (SUCCEEDED(CoInitialize(NULL))))
{
TestServices::CTestServices ws;
int ret = 0;
HRESULT hr = ws.Foo(3, &ret);
CoUninitialize();
}
</code>

However ws.Foo() returns E_FAIL. I stepped in the generated code and it failed at BeginParse() function in atlsoap.h
<code>
virtual HRESULT BeginParse(IStream *pStream)
{
ATLASSERT( pStream != NULL );
CComVariant varStream;
varStream = static_cast<IUnknown*>(pStream);

HRESULT hr = m_spReader->parse(varStream); //it fails here
if (SUCCEEDED(hr))
{
if (m_refMap.GetCount() != 0)
{
hr = E_FAIL;
}
}
return hr;
}
</code>

And I see following error message in the output window
ATLSOAP: CSoapRootHandler::GetElementEntry -- element not found: Action.
ATLSOAP: CSoapRootHandler::GetElementEntry -- element not found: MessageID.
ATLSOAP: CSoapRootHandler::GetElementEntry -- element not found: To.
ATLSOAP: CSoapRootHandler::GetElementEntry -- element not found: Security.
ATLSOAP: CSoapRootHandler::endElement -- invalid SOAP message format while processing headers.

Also, here is the xml result returned by the web service call

<?xml version="1.0" encoding="utf-8"?>
<int xmlns="http://www.blahblah.com/webservices/">4</int>


What am I missing? Thank you all in advance.

-- modified at 17:41 Wednesday 19th July, 2006
AnswerRe: Failed to invoke web services in VC++, please help Pin
kapil_moondra5-Jan-09 1:25
kapil_moondra5-Jan-09 1:25 
QuestionI hate imagelists!! ( drawing with ILD_TRANSPARENT ) [modified] Pin
Maximilien19-Jul-06 11:23
Maximilien19-Jul-06 11:23 
AnswerRe: I hate imagelists!! ( drawing with ILD_TRANSPARENT ) Pin
led mike19-Jul-06 11:40
led mike19-Jul-06 11:40 
GeneralRe: I hate imagelists!! ( drawing with ILD_TRANSPARENT ) Pin
Maximilien19-Jul-06 14:41
Maximilien19-Jul-06 14:41 
AnswerRe: I hate imagelists!! ( drawing with ILD_TRANSPARENT ) Pin
Michael Dunn19-Jul-06 16:15
sitebuilderMichael Dunn19-Jul-06 16:15 
QuestionIs the microphone in use? Pin
Larsson19-Jul-06 10:35
Larsson19-Jul-06 10:35 
QuestionRe: Is the microphone in use? [modified] Pin
Ali Rafiee19-Jul-06 10:52
Ali Rafiee19-Jul-06 10:52 
QuestionHow can I select a node in a treeview Pin
Alex Cutovoi19-Jul-06 9:08
Alex Cutovoi19-Jul-06 9:08 
AnswerRe: How can I select a node in a treeview Pin
Ali Rafiee19-Jul-06 9:21
Ali Rafiee19-Jul-06 9:21 
GeneralRe: How can I select a node in a treeview [modified] Pin
Alex Cutovoi19-Jul-06 11:18
Alex Cutovoi19-Jul-06 11:18 
GeneralRe: How can I select a node in a treeview Pin
Ali Rafiee19-Jul-06 11:23
Ali Rafiee19-Jul-06 11:23 
GeneralRe: How can I select a node in a treeview Pin
Alex Cutovoi20-Jul-06 2:24
Alex Cutovoi20-Jul-06 2:24 
QuestionSerial Communication with a Garmin Device Pin
dinesh_pam19-Jul-06 8:40
dinesh_pam19-Jul-06 8:40 
QuestionRe: Serial Communication with a Garmin Device Pin
cppcook19-Jul-06 9:02
cppcook19-Jul-06 9:02 
AnswerRe: Serial Communication with a Garmin Device Pin
kitty519-Jul-06 9:11
kitty519-Jul-06 9:11 
GeneralRe: Serial Communication with a Garmin Device Pin
dinesh_pam19-Jul-06 9:29
dinesh_pam19-Jul-06 9:29 
GeneralRe: Serial Communication with a Garmin Device Pin
kitty519-Jul-06 9:45
kitty519-Jul-06 9:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.