Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am created illustrator plugin in c++. I want to call SOAP web service in plugin.
i am trying bellow code but not getting responce.

What I have tried:

C++
IServerXMLHTTPRequestPtr pXMLHTTPReq = NULL;
		hr=pXMLHTTPReq.CreateInstance(__uuidof(ServerXMLHTTP60));

		hr = pXMLHTTPReq->open("POST","http://localhost/Service1.asmx",false,"","");
		hr = pXMLHTTPReq->setRequestHeader("Content-Type", "text/xml; charset=utf-8");
		hr = pXMLHTTPReq->setRequestHeader("SOAPAction", "http://tempuri.org/ValidateIllustratorUser");

		string strSoapEnvelope = "";
		strSoapEnvelope = "";
		strSoapEnvelope += "<soap:envelope";
 strsoapenvelope="" +="xmlns:xsi=\" http:="" www.w3.org="" 2001="" xmlschema-instance\"";
="" http="" :="" xmlschema\"";
="" schemas.xmlsoap.org="" soap="" envelope="" \"="">";
		strSoapEnvelope += "<soap:body>";
		strSoapEnvelope += "<validateillustratoruser xmlns="\"http://tempuri.org/\"">";
		strSoapEnvelope += "<userid>A";
		strSoapEnvelope += "<password>A";
		strSoapEnvelope += "";
		strSoapEnvelope += "";
		strSoapEnvelope += "";
		hr = pXMLHTTPReq->send(&strSoapEnvelope);
	
		string outXML = pXMLHTTPReq->responseText;
Posted
Updated 20-Jan-20 20:45pm
v3

1 solution

There is an Article on Code Project that does similar task and it also contains sample code as well. Try it

WebService Call From VC++6.0[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900