Click here to Skip to main content
15,881,172 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Access Driver in Embedded Standard OS Pin
Randor 10-Jul-17 9:00
professional Randor 10-Jul-17 9:00 
QuestionRe: Access Driver in Embedded Standard OS Pin
David Crow6-Jul-17 4:34
David Crow6-Jul-17 4:34 
AnswerRe: Access Driver in Embedded Standard OS Pin
divya036-Jul-17 22:38
divya036-Jul-17 22:38 
GeneralRe: Access Driver in Embedded Standard OS Pin
Frederick J. Harris10-Jul-17 3:28
Frederick J. Harris10-Jul-17 3:28 
AnswerRe: Access Driver in Embedded Standard OS Pin
Randor 10-Jul-17 8:47
professional Randor 10-Jul-17 8:47 
QuestionHow to run a java script(json) from my vc++ code? Pin
pankajkumar4-Jul-17 2:25
pankajkumar4-Jul-17 2:25 
SuggestionRe: How to run a java script(json) from my vc++ code? Pin
Richard MacCutchan4-Jul-17 2:56
mveRichard MacCutchan4-Jul-17 2:56 
GeneralRe: How to run a java script(json) from my vc++ code? Pin
pankajkumar4-Jul-17 19:36
pankajkumar4-Jul-17 19:36 
Dear,
I explain you whole condition of code...

<s:element name="ConvertTemperature"> <s:complextype> <s:sequence> <s:element minoccurs="1" maxoccurs="1" name="dFahrenheit" type="s:double">    <s:element name="ConvertTemperatureResponse"> <s:complextype> <s:sequence> <s:element minoccurs="1" maxoccurs="1" name="ConvertTemperatureResult" type="s:double">    ... – pankaj 16 hours ago   
  	   	 	
I want to add an input parameter('zipcode' from VC++/'InParam' in vb web method) in web method...though I am trying to send that parameter, in my call of C++ SOAP packet..but this is being taken as 'Nothing'(InParam) by web method..
  	 	
Though I made a sample json file as microsoft says...social.msdn.microsoft.com/Forums/en-US/… how to fix that in my vc++ code, after sending 'POST' request of my http packet
  	 	
  	 	
in WSDL..Web Service.vb.. 
  	 	
Imports System.Web Imports System.Web.Services Imports System.Web.Services.Protocols <webservice(namespace:="tempuri.org ")="">; _ <webservicebinding(conformsto:=wsiprofiles.basicprofile1_1)> _ <global.microsoft.visualbasic.compilerservices.designergener‌​ated()> _ Public Class WebService Inherits System.Web.Services.WebService <webmethod()> _ Public Function ConvertTemperature(ByVal InParam As String) As String Dim Temp As Integer Temp = CInt(InParam) + 20 Return CStr(Temp) End Function End Class – pankaj 15 hours ago   
  	 	
float CallWebService(LPCTSTR szZipCode) { // SOAP Request Envelop to be posted TCHAR szSOAPReq[MAX_PATH*2] = {0}; sprintf(szSOAPReq, g_lpszSOAPReq, szZipCode); CComPtr<ixmlhttprequest> spXMLHTTP; HRESULT hr = spXMLHTTP.CoCreateInstance(GetClsidXMLHTTP("Msxml2.ServerXML‌​HTTP.4.0")); CHECK_HR(hr); TCHAR szGetURL[64]={0}; )); sprintf(szGetURL, g_lpszGetURL, szZipCode); char szTemp[32]; sprintf(szTemp, "\"%s\"", szZipCode); hr = spXMLHTTP->open(_bstr_t(_T("GET")), szGetURL, VARIANT_FALSE); – pankaj 15 hours ago   
  	 	
CHECK_HR(hr); ///////////////////////////Packet //static const TCHAR* const g_lpszSOAPReq = CString szRequest= _T(" " "<soap:envelope xmlns:xsi="w3.org/2001/XMLSchema-instance" ;="" "="" xmlns:xsd="w3.org/2001/XMLSchema" xmlns:soap="schemas.xmlsoap.org/soap/envelope/">"; " <soap:body>" " <converttemperature xmlns="localhost:48788/WebService.asmx\'">" " <zipcode>string" " " " " ""); – pankaj 14 hours ago   
  	 	
VARIANT vRequest; vRequest.vt = VT_BSTR; vRequest.bstrVal = szRequest.AllocSysString(); // Send the HTTP GET request //hr = spXMLHTTP->send(); hr = spXMLHTTP->send(vRequest); //////////////////////////////////////////////////// // Initialize the Synchronous HTTP POST request hr = spXMLHTTP->open(_bstr_t(_T("POST")), g_lpszSOAPEndpointURL, VARIANT_FALSE); CHECK_HR(hr); – pankaj 14 hours ago   
  	 	
hr = spXMLHTTP->setRequestHeader(_bstr_t(_T("Content-Type")), _bstr_t(_T("text/xml"))); CHECK_HR(hr); //Here JS code...? // Send the POST request, along with the SOAP request envelope text hr = spXMLHTTP-
>send(_bstr_t(szSOAPReq)); CHECK_HR(hr); if(200 == spXMLHTTP->status)   	 	
_bstr_t bstrResponse = spXMLHTTP->responseText; MessageBox(0, bstrResponse, "TEST", 0); AfxMessageBox(bstrResponse); } 
  	 	
from web method..vb.. <webmethod()> _ Public Function ConvertTemperature(ByVal InParam As String) As String Dim Temp As Integer Temp = CInt(InParam) + 20 Return CStr(Temp) End Function....this parameter "InParam " is showing "Nothing" at run time..any help would be highly appreciated.. 
  	 	
How to run json script from c++ or how to create a xml script to make provsion for 'input' parameter?
Can any java,C++ expert solve prolem of my code
-Pankaj

GeneralRe: How to run a java script(json) from my vc++ code? Pin
Richard MacCutchan4-Jul-17 21:29
mveRichard MacCutchan4-Jul-17 21:29 
GeneralRe: How to run a java script(json) from my vc++ code? Pin
pankajkumar4-Jul-17 19:38
pankajkumar4-Jul-17 19:38 
GeneralRe: How to run a java script(json) from my vc++ code? Pin
pankajkumar4-Jul-17 19:42
pankajkumar4-Jul-17 19:42 
QuestionRe: How to run a java script(json) from my vc++ code? Pin
David Crow5-Jul-17 2:22
David Crow5-Jul-17 2:22 
AnswerRe: How to run a java script(json) from my vc++ code? Pin
pankajkumar5-Jul-17 3:08
pankajkumar5-Jul-17 3:08 
QuestionHelp with .lib for STD::COUT Pin
ForNow2-Jul-17 16:28
ForNow2-Jul-17 16:28 
AnswerRe: Help with .lib for STD::COUT Pin
Richard MacCutchan2-Jul-17 21:58
mveRichard MacCutchan2-Jul-17 21:58 
AnswerRe: Help with .lib for STD::COUT Pin
leon de boer4-Jul-17 2:54
leon de boer4-Jul-17 2:54 
GeneralRe: Help with .lib for STD::COUT Pin
ForNow4-Jul-17 3:38
ForNow4-Jul-17 3:38 
GeneralRe: Help with .lib for STD::COUT Pin
Randor 5-Jul-17 2:42
professional Randor 5-Jul-17 2:42 
GeneralRe: Help with .lib for STD::COUT Pin
ForNow5-Jul-17 3:12
ForNow5-Jul-17 3:12 
AnswerRe: Help with .lib for STD::COUT Pin
Randor 5-Jul-17 3:20
professional Randor 5-Jul-17 3:20 
QuestionSimple question about templates Pin
Richard MacCutchan2-Jul-17 5:25
mveRichard MacCutchan2-Jul-17 5:25 
QuestionRe: Simple question about templates Pin
David Crow2-Jul-17 17:44
David Crow2-Jul-17 17:44 
AnswerRe: Simple question about templates Pin
Richard MacCutchan2-Jul-17 21:55
mveRichard MacCutchan2-Jul-17 21:55 
AnswerRe: Simple question about templates Pin
jschell5-Jul-17 6:22
jschell5-Jul-17 6:22 
GeneralRe: Simple question about templates Pin
Richard MacCutchan5-Jul-17 6:28
mveRichard MacCutchan5-Jul-17 6:28 

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.