VC6 calls WebService

xiaoxiao2021-03-06  75

"," "); // This is the local Web Services, actually specify the namespace Serializer-> StartElement (" Numberone ",", ",", "); Serializer-> Writestring (" 5 "); Serializer-> endelement (); Serializer-> StartElement ("Numbertwo", ",", ""); Serializer-> WriteString ("10"); serializer-> endelement (); serializer-> endelement (); Serializer-> EndBody (); Serializer-> EndEnvelope (); // Send the message to the XML Web service connector-> EndMessage ();. // Read the response Reader.CreateInstance (__ uuidof (SoapReader30));. // Connect The Reader to the Output. Reader-> Load (_variant_t ((iUnknown *) connector-> outputstream), ""); // Display the result. Printf ("Answer:% S / N", (const char *) reader-> rpcResult-> text);} int main () {Coinitialize (NULL); add (); couninitialize (); return 0;} Change the value of the endpointURL property. Specify your server in the URL Name. OK summarize the necessary key steps 1. Import Type Library 2. You need to create a SOAPCONNECTOR 3. Next, create SOAPSERIALIZER 4. Next to attach the message to the input stream of SOAPConnector 5. Next, read the result. To read the server Reply, client applications need to use SoapReader, 6.soapReader is connected to SOAP Connector output stream 7. Use the ixmldomelement object to read the server from SOAPReader

转载请注明原文地址:https://www.9cbs.com/read-93393.html

New Post(0)