Я уже давно контактировал с Webservice, но у вас не так много учебных пособий, и я не часто преодолел в JSON.
Сначала определите данные SOAP, затем создайте объект HTTP, затем отправьте его с помощью post и получите код состояния 200, что означает, что вызов успешен, а затем перейдите к следующей операции ...
Посмотрите на конкретный код реализации
<!-#include virtual =/include/json.min.asp-> <%dim strxmldim str'definition soap message strxml = <? Xml version = '1.0' Encoding = 'utf-8'?> Strxml = strxml & <SOAP: Overvelope xmlns: xsi = 'http: //www.w3.org/2001/xmlschema-instance' xmlns: xsd = 'http: //www.w3.org/2001/xmlschema' xmlns: soap = ' http://schemas.xmlsoap.org/soap/envelope/ '> strxml = strxml & <SOAP: Body> strxml = strxml & <getcategories xmlns = 'http: //tempuri.org/'> strxml = strxml & <reqcode> 30000001 </reqcode> 'Параметр 1strxml = strxml & <cign> sssssss </signt>' 'Parameter 2strxml = strxml & </getCategories> strxml = strxml & </soap: body> strxml = strxml & </soap: envelope> set h = createObject (microsoft.xmlhttp)' Отправить сообщение H.Open на указанный URL ПОЧТА, http://www.domain.com/webservice.asmx, falseh.setrequestheader content-type, text/xml; .org/getCategoriessh.send (strxml) 'Покажите возвращенную информацию XML, если H.Status = 200, затем установите xmldoc = server.createObject (msxml.domdocument) xmldoc.load (h.responsexml) jsontext = xmldoc.childnodes (1) .Text 'конвертируется в json, вызовите json.min.asp set Categories = json.parse (jsontext) для i = 0 в категории. i) .categoryname)) 'Свойство для j = 0 к категориям. Get (i) .labels.length - 1' Ответ сбора. Next Next <pre name = code class = vb> <script Language = javascript runat = server> if (! array.prototype.get) {array.prototype.get = function (prop) {return this [prop];}} strict; if (! this.json) {json = {{ };} (function () {function f (n) {return n <10? function (key) {return isfinite (this.valueof ())? this.getUtcfyear ()+'-'+f (this.getUtcmonth ()+1)+'-'+f (this.getUtcdate ())+'t'+f (это .getTchours ())+':'+f (this.getUtcminutes ())+':'+f (this.getUtcseconds ())+'z': null;}; string.prototype.tojson = number.prototype. tojson = boolean.prototype.tojson = function (key) {return this.valueof ();};} var cx =/[/?/?/?-/?/?/?/?/?-/?/?-/?/?-/?/?-/?/?-/?/?-/?] /g, Escapable =/[//// x00-/x1f/x7f-/x9f/?/?-/?/?/?/?/?-/?-/?/?-/?/? -/?/?-/?/?-/?/? , '/n': '// n', '/f': '// f': '// f', '/r': '// r', '': '//', '/ /':' /// '}, rep; функция QUOTE (string) {exapable.lastIndex = 0; return expable.test (string)? '+a.charcodeat (0) .toString (16)). slice (-4);})+' ':' '+string+' ';} function str (key, holder) {var i, k, v, длина, разум = разрыв, частичный, value = holder [key]; if (value && typeof value === 'Object' && typeof value.tojson === 'function') {value = value.tojson (key);} if (typeof rep === 'function') {value = rep.call (holder, keid, value);} switch (typeof value) {case'String ': return Quote (value); case'number': return isfinite (value)? string (value): 'null'; case'boolean ': case'null': return String (value); case'Object ': if (! Value) {return'null';} Gap+= addent; partial = []; if (object.prototype.tostring.apply (value) === '[объект Array] ') {length = value.length; for (i = 0; i <length; i+= 1) {Partial [i] = str (i, value) ||' null ';} v = partial.length = ==0? ',')+']'; gap = mind; return v;} if (rep && typeof rep === 'obj k = rep [i]; if (typeof k === 'string') {v = str (k, value); if (v) {partial.push (quote (k)+(gap? ':': ':')+v);}}} } else {for (k in value) {if (object.hasownproperty.call (value, k)) {v = str (k, value); if (v) {partial.push (quote (k)+(GAP? ': ':': ')+v);}}}}} v = partial.length === 0? Gap)+'/n'+mind+'}': '{'+partial.join (',')+'}'; gap = mind; return v;}} if (typeof json.stringify! == 'Функция ') {Json.stringify = function (value, space, space) {var i; gap =' '; addent =' '; if (typeof space ===' number ') {for (i = 0; i <space ; ';}} else if (typeof space ===' string ') {addent = space;} rep = replacer; if (replacer && typeof replacer! ==' function '&& (typeOf Replacer! ==' объект '|| typeOf Replacer .length! == 'Number')) {Throw New Error ('json.stringify');} return str ('', {'': value});};} if (typeof json.parse! == ' function ') {json.parse = function (text, reviver) {var j; function Walk (holder, key) {var k, v, value = holder [key]; if (value && typeof value === 'obj ) {v = walk (value, k); if (v! == undefined) {value [k] = v;} else {delete value [k];}}}} return reviver.call (holder, key, value);} cx.lastindex = 0; if (cx.test (text)) {text = text.replace (cx, function (a) {return '// u'+('' 0000 '+a.charcodeat (0) .toString (16)). Slice (-4);});} if (/^[/],: {}/s]*$/. Тест (текст. Заменить (/// (? *| true | false | null |-?/d+(?: /./ d*)? (?: [ee] [+/-]?/d+)?/g, ']'). Замените (/(/( ?:^|: |,) (? TypeOf Reviver === 'function'? Walk ({'': j}, ''): j;} бросить новый синтаксисратор ('json.parse');};}} ()); </script> set xmldoc = NothroTeLse Repsonce.Write H.Status & Response.Write H.StatuStextend, если%> Приложение: json.min.asp <script language = javascript runat = server> if (! array.prototype.get) {array.prototype.get = function (prop) {return [prop];}} strict; if (! this.json) {json = {};} (function () {function f (n) {return n <10? tojson = function (key) {return isfinite (this.valueof ())? this.getUtcfyear ()+'-'+f (this.getUtcmonth ()+1)+'-'+f (this.getUtcdate ())+'t'+f (это .getTchours ())+':'+f (this.getUtcminutes ())+':'+f (this.getUtcseconds ())+'z': null;}; string.prototype.tojson = number.prototype. tojson = boolean.prototype.tojson = function (key) {return this.valueof ();};} var cx =/[/?/?/?-/?/?/?/?/?-/?/?-/?/?-/?/?-/?/?-/?/?-/?] /g, Escapable =/[//// x00-/x1f/x7f-/x9f/?/?-/?/?/?/?/?-/?-/?/?-/?/? -/?/?-/?/?-/?/? , '/n': '// n', '/f': '// f': '// f', '/r': '// r', '': '//', '/ /':' /// '}, rep; функция QUOTE (string) {exapable.lastIndex = 0; return expable.test (string)? '+a.charcodeat (0) .toString (16)). slice (-4);})+' ':' '+string+' ';} function str (key, holder) {var i, k, v, длина, разум = разрыв, частичный, value = holder [key]; if (value && typeof value === 'Object' && typeof value.tojson === 'function') {value = value.tojson (key);} if (typeof rep === 'function') {value = rep.call (holder, keid, value);} switch (typeof value) {case'String ': return Quote (value); case'number': return isfinite (value)? string (value): 'null'; case'boolean ': case'null': return String (value); case'Object ': if (! Value) {return'null';} Gap+= addent; partial = []; if (object.prototype.tostring.apply (value) === '[объект Array] ') {length = value.length; for (i = 0; i <length; i+= 1) {Partial [i] = str (i, value) ||' null ';} v = partial.length = ==0? ',')+']'; gap = mind; return v;} if (rep && typeof rep === 'obj k = rep [i]; if (typeof k === 'string') {v = str (k, value); if (v) {partial.push (quote (k)+(gap? ':': ':')+v);}}} } else {for (k in value) {if (object.hasownproperty.call (value, k)) {v = str (k, value); if (v) {partial.push (quote (k)+(GAP? ': ':': ')+v);}}}}} v = partial.length === 0? Gap)+'/n'+mind+'}': '{'+partial.join (',')+'}'; gap = mind; return v;}} if (typeof json.stringify! == 'Функция ') {Json.stringify = function (value, space, space) {var i; gap =' '; addent =' '; if (typeof space ===' number ') {for (i = 0; i <space ; ';}} else if (typeof space ===' string ') {addent = space;} rep = replacer; if (replacer && typeof replacer! ==' function '&& (typeOf Replacer! ==' объект '|| typeOf Replacer .length! == 'Number')) {Throw New Error ('json.stringify');} return str ('', {'': value});};} if (typeof json.parse! == ' function ') {json.parse = function (text, reviver) {var j; function Walk (holder, key) {var k, v, value = holder [key]; if (value && typeof value === 'obj ) {v = walk (value, k); if (v! == undefined) {value [k] = v;} else {delete value [k];}}}} return reviver.call (holder, key, value);} cx.lastindex = 0; if (cx.test (text)) {text = text.replace (cx, function (a) {return '// u'+('' 0000 '+a.charcodeat (0) .toString (16)). Slice (-4);});} if (/^[/],: {}/s]*$/. Тест (текст. Заменить (/// (? *| true | false | null |-?/d+(?: /./ d*)? (?: [ee] [+/-]?/d+)?/g, ']'). Замените (/(/( ?:^|: |,) (? typeof Reviver === 'function'? Walk ({'': j}, ''): j;} бросить новый синтаксисеррор ('json.parse');};}} ()); </script>