473,466 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Urgent help on IXMLHTTPRequest(Pocket PC win32) for SOAP Client

3 New Member
I am working on a project related to windows pocket pc 5.0 (win32). in that i am trying client-server communicationusing SOAP server ,but facing problem on IXMLHTTPRequest.
#################### CODE ##########################
//included files are,
#include "msxml2.h"
#import "msxml3.dll"
using namespace MSXML2;
#define CoInitialize(NULL) CoInitializeEx(NULL, COINIT_MULTITHREADED)
// code snippet as follows.
void ClientServerCommunicationUsingXmlHttpRequest()
{
::CoInitialize(NULL);
{
HRESULT hr;
// Url of SOAP server (Used axis toolkit)
bstr_t Url = "http://192.168.1.98:8080/axis/WinMobileService/WinMobileService.jws";
bstr_t method = "GET";
_variant_t Async = VARIANT_FALSE;
//body of send method that sends xml of soap envelope.
_variant_t varBody= L"<?xml version='1.0' encoding='UTF-8'?> <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' soap:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> <soap:Body> <getDataFromClient xmlns='urn:WinMobileService'> <c-gensym3 xsi:type='xsd:string'>MY send MSG</c-gensym3> </getDataFromClient> </soap:Body> </soap:Envelope>";
IXMLHTTPRequestPtr oIXMLHTTPRequest = NULL;
hr = oIXMLHTTPRequest.CreateInstance("Msxml2.XMLHTTP");
if(hr!=S_OK)
MessageBox(NULL,L"Create instance failed",L"CreateInstance",MB_OK);
hr = oIXMLHTTPRequest->open(method,Url,Async);
if(hr!=S_OK)
MessageBox(NULL,L"open method failed.",L"open",MB_OK);
hr = oIXMLHTTPRequest->setRequestHeader(L"Content_Type",L"text/xml");
if(hr!=S_OK)
MessageBox(NULL,L"setRequestHeader method failed.",L"setRequestHeader",MB_OK);
hr=oIXMLHTTPRequest->setRequestHeader(L"SOAPAction",L"'urn:WinMobileSe rvice/getDataFromClient'");
if(hr!=S_OK)
MessageBox(NULL,L"setRequestHeader method about soap failed.",L"SOAPAction",MB_OK);
hr=oIXMLHTTPRequest->send(varBody);
if(hr!=S_OK)
MessageBox(NULL,L"send method failed.",L"send",MB_OK);
}
::CoUninitialize();
}
################### END OF CODE ########################
###Related problem
1)send method gives error as "problem has occured with gwes.exe."
Plz i am stuck on this point, i want your help....plz reply this mail.......
Regards,
Bhush&Jitu
Mar 13 '08 #1
0 1461

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: John | last post by:
Hi all, Perhaps I'm being a little impatient here but I needed to re-send with a metter of urgency... I'm trying to get a client callback to work and am able to get it to work when I comment...
0
by: Matt Wood | last post by:
Hi, I have written a Web Service for a customer which expects a SOAP message with Document/Literal encoding, and uses RoutingStyle=SoapServiceRoutingStyle.RequestElement to route the SOAP body...
5
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2...
6
by: Hao | last post by:
There is a wield issue in inspecting the network traffic on the web service client side. There are two soap calls if credentials are used. The first call has no credentials and is rejected by the...
5
by: cj | last post by:
I've got a Soap web client written in VB. I'm wondering if it would be ok to run this same program multiple times on the same pc. Would they get confused with which of them requested what...
15
by: =?Utf-8?B?ZG91Zw==?= | last post by:
I hadn't had a class yet and I had some MS help on this to set up, but I wrote a .Net WS that creates a proxy class response using SOAP. Works fine. And in kind of a good way, the IDE has hidden...
5
by: =?Utf-8?B?SmltbWVy?= | last post by:
Hello, I've been trying to create a WCF SOAP Router Service that can forward not just the message body but also any security headers set by the originator of the message. The destination service...
2
by: bhushanbsc | last post by:
Hi, I am working on a project related to windows pocket pc 5.0 (win32). in that i am trying client-server communicationusing SOAP server. but facing problem on...
3
by: Lance Wynn | last post by:
Hello, I am receiving this error when trying to instantiate a webservice component. I have 2 development machines, both are XP sp2 with VS 2008 installed. On one machine, the code works fine. On...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... I've got a .Net client to a soap service that works for the most part, but there are a couple of things I'd like to improve: 1) the first request to the client wrapper always takes...
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
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...
1
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
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...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.