Home > Software engineering >  [for] about VB to invoke the web service
[for] about VB to invoke the web service

Time:10-19

Using VB to invoke the web service interface definition String submit (String message)
The message is an XML format string
I use MSSOAPLib30 SoapClient30 instance is created, no call MSSoapInit method error
But to invoke the interface
The returned error is "element Found {http://service.ws.ctcoss.ctc.com/} arg0 but could not find matching RPC/Literal part"
Consult ace this is the reason why
Be urgent!

CodePudding user response:

I can't pass the MSSoapInit, depressed,

CodePudding user response:

In fact you don't have to call soap webservice call.net can call other written language is often good,
Actually webservices is an XML file, the return value and can undertake js parsing,
The function RequestWebService () {
//this is we created in the first step of the Web service address
Var URL="http://10.20.50.80:8080/cc_yunda/services/WebServiceHost? WSDL/sendCallcountToService ";
//in which we stitching
Var data;
Data="https://bbs.csdn.net/topics/<? The XML version="1.0" encoding="utf-8"?> ';
Data=https://bbs.csdn.net/topics/data + '& lt; Soap12: Envelope XMLNS: xsi="http://www.w3.org/2001/XMLSchema-instance" XMLNS: XSD="http://www.w3.org/2001/XMLSchema" XMLNS: soap12="http://www.w3.org/2003/05/soap-envelope" & gt; ';
Data=https://bbs.csdn.net/topics/data + '& lt; Soap12: Body> ';
Data=https://bbs.csdn.net/topics/data + '& lt; The HelloWorld XMLNS="http://tempuri.org/"/& gt; ';
Data=https://bbs.csdn.net/topics/data + '& lt;/soap12: Body> ';
Data=https://bbs.csdn.net/topics/data + '& lt;/soap12: Envelope> ';

//create asynchronous object
Var XMLHTTP=new ActiveXObject (" Microsoft. XMLHTTP ");
XMLHTTP. Open (" POST ", URL, false);
XMLHTTP. SetRequestHeader (" the content-type ", "application/soap + XML");

XMLHTTP. Send (data);
Document. The getElementById (" data "). The innerHTML=XMLHTTP. The responseText;
}
  • Related