⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 webservice2.js

📁 ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.
💻 JS
📖 第 1 页 / 共 5 页
字号:
{this._targetNs=lTnsNode.nodeValue;}
this._elementFormDefault=this._xmlSource.getAttribute("elementFormDefault");this._attrFormDefault=this._xmlSource.getAttribute("attributeFormDefault");}
BiSchema.prototype._getImports=function()
{var lResImports=[];var lIncludes=this._xmlSource.selectNodes("xsd:include");for(var lImportIdx=0;lImportIdx<lIncludes.length;lImportIdx++)
{var lImportNode=lIncludes[lImportIdx];var lImportedDoc=new BiSchema();var lImportDesc=new BiXmlDefinitionsDocumentImportDesc(lImportedDoc);lImportDesc.importType="include";var lLocation=new BiUri(this._baseLocation,lImportNode.getAttribute("schemaLocation")).toString();lImportedDoc.setSource(lLocation);lResImports.push(lImportDesc);}
var lImports=this._xmlSource.selectNodes("xsd:import[@schemaLocation]");for(var lImportIdx=0;lImportIdx<lImports.length;lImportIdx++)
{var lImportNode=lImports[lImportIdx];var lImportedDoc=new BiSchema();var lImportDesc=new BiXmlDefinitionsDocumentImportDesc(lImportedDoc);lImportDesc.importType="import";lImportDesc.importNamespace=lImportNode.getAttribute("namespace");var lLocation=new BiUri(this._baseLocation,lImportNode.getAttribute("schemaLocation")).toString();lImportedDoc.setSource(lLocation);lResImports.push(lImportDesc);}
return lResImports;}
BiSchema.prototype._processImport=function(aImportedDoc,aImportDesc)
{if(aImportDesc.importType=="include")
{if(this.getTargetNamespace()!=aImportedDoc.getTargetNamespace())
{throw new BiSchemaError("<xsd:include>ed schema's target namespace doesn't "+"match the including schema's target namespace in "+this._baseLocation);}}else {if(aImportedDoc.getTargetNamespace()!=aImportDesc.importNamespace)
{throw new BiSchemaError("<xsd:import>ed schema "+aImportedDoc._baseLocation+" defines in target namespace "+aImportedDoc.getTargetNamespace()+" but imported to namespace "+aImportDesc.importNamespace);}}
this.importSchema(aImportedDoc);}
BiSchema.prototype._processLocalDefinitions=function()
{this._simpleTypes.loadDefinitions();this._complexTypes.loadDefinitions();this._attrs.loadDefinitions();this._elements.loadDefinitions();this._groupDefs.loadDefinitions();this._attrGroupDefs.loadDefinitions();}
BiSchema.prototype.importSchema=function(aImportedDoc)
{this._simpleTypes.addImport(aImportedDoc._simpleTypes);this._complexTypes.addImport(aImportedDoc._complexTypes);this._attrs.addImport(aImportedDoc._attrs);this._elements.addImport(aImportedDoc._elements);this._groupDefs.addImport(aImportedDoc._groupDefs);this._attrGroupDefs.addImport(aImportedDoc._attrGroupDefs);}
BiSchema.prototype.getTargetNamespace=function()
{return this._targetNs;}
BiSchema.prototype.getElementFormDefault=function()
{return this._elementFormDefault;}
BiSchema.prototype.getAttrFormDefault=function()
{return this._attrFormDefault;}
BiSchema.prototype.getSimpleType=function(aItemName)
{return this._simpleTypes.getItem(aItemName);}
BiSchema.prototype.getComplexType=function(aItemName)
{return this._complexTypes.getItem(aItemName);}
BiSchema.prototype.getAttribute=function(aItemName)
{return this._attrs.getItem(aItemName);}
BiSchema.prototype.getElement=function(aItemName)
{return this._elements.getItem(aItemName);}
BiSchema.prototype.getGroupDef=function(aItemName)
{return this._groupDefs.getItem(aItemName);}
BiSchema.prototype.getAttributeGroup=function(aItemName)
{return this._attrGroupDefs.getItem(aItemName);}
BiSchema.prototype.getType=function(aItemName)
{var lRes=this._simpleTypes.getItem(aItemName);if(!lRes)
{lRes=this._complexTypes.getItem(aItemName);}
return lRes;}
function BiWebServiceError(aMessage)
{if(_biInPrototype)return;Error.call(this,aMessage);this.errMessage=aMessage;}
_p=_biExtend(BiWebServiceError,Error,"BiWebServiceError");BiWebServiceError.prototype.toString=function()
{return this.errMessage;}
function BiWsdlProtocolInfoFactory(aBindingTypeDetector,aBindingProtocolInfoClass,aBindingOpProtocolInfoClass,aPortProtocolInfoClass)
{if(_biInPrototype)return;this.detectBindingType=aBindingTypeDetector;this._bindingInfoClass=aBindingProtocolInfoClass;this._bindingOpInfoClass=aBindingOpProtocolInfoClass;this._portInfoClass=aPortProtocolInfoClass;}
_p=_biExtend(BiWsdlProtocolInfoFactory,Object,"BiWsdlProtocolInfoFactory");BiWsdlProtocolInfoFactory.prototype.createBindingProtocolInfo=function(aParentBinding,aBindingNode)
{return new this._bindingInfoClass(aParentBinding,aBindingNode);}
BiWsdlProtocolInfoFactory.prototype.createBindingOpProtocolInfo=function(aParentOp,aBindingOpNode)
{return new this._bindingOpInfoClass(aParentOp,aBindingOpNode);}
BiWsdlProtocolInfoFactory.prototype.createPortProtocolInfo=function(aParentPort,aPortNode)
{return new this._portInfoClass(aParentPort,aPortNode);}
ShowDalert=false;function dalert(aMsg)
{if(ShowDalert)
{WScript.Echo(aMsg);}}
function BiWsdlBinding(aParent,aSrcNode)
{if(_biInPrototype)return;this._srcXml=aSrcNode;this._portType=aParent.getPortTypes().getItem(BiXmlDefinitionsDocument.expandQname(this._srcXml.getAttribute("type"),this._srcXml));this._bindingProtocol=BiWsdlBinding.detectBindingProtocolType(this._srcXml);this._protocolInfo=this.getBindingProtocolInfoFactory().createBindingProtocolInfo(this,this._srcXml);this._operations=new Object();var lBindingOps=this._srcXml.selectNodes("wsdl:operation");for(var lOpIdx=0;lOpIdx<lBindingOps.length;lOpIdx++)
{var lOpNode=lBindingOps[lOpIdx];this._operations[lOpNode.getAttribute("name")]=new BiWsdlBindingOperation(this,lOpNode);}}
_p=_biExtend(BiWsdlBinding,Object,"BiWsdlBinding");BiWsdlBinding.prototype.getPortType=function()
{return this._portType;}
BiWsdlBinding.prototype.getBindingProtocol=function()
{return this._bindingProtocol;}
BiWsdlBinding.prototype.getBindingProtocolInfoFactory=function()
{return BiWsdlBinding.getProtocolInfoFactory(this._bindingProtocol);}
BiWsdlBinding.prototype.getBindingProtocolInfo=function()
{return this._protocolInfo;}
BiWsdlBinding.prototype.getOperationNames=function()
{return this._portType.getOperationNames();}
BiWsdlBinding.prototype.getOperation=function(aOpName)
{return this._operations[aOpName];}
BiWsdlBinding.registerBindingProtocol=function(aProtocolType,aFactory)
{BiWsdlBinding.protocolInfoFactories[aProtocolType]=aFactory;}
BiWsdlBinding.getProtocolInfoFactory=function(aProtocolType)
{return BiWsdlBinding.protocolInfoFactories[aProtocolType];}
BiWsdlBinding.detectBindingProtocolType=function(aBindingNode)
{for(var lProtoType=1;lProtoType<BiWsdlBinding.protocolInfoFactories.length;lProtoType++)
{if(BiWsdlBinding.protocolInfoFactories[lProtoType].detectBindingType(aBindingNode))
{return lProtoType;}}
return BiWsdlBinding.BINDING_PROTOCOL_UNKNOWN;}
BiWsdlBinding.BINDING_PROTOCOL_UNKNOWN=0;BiWsdlBinding.BINDING_PROTOCOL_SOAP=1;BiWsdlBinding.protocolInfoFactories=new Array();function BiWsdlBindingUnknownProtocolInfoFactory()
{if(_biInPrototype)return;this.createBindingProtocolInfo=function(aParentBinding,aBindingNode){return null;}
this.createBindingOpProtocolInfo=function(aParentOp,aBindingOpNode){return null;}
this.createPortProtocolInfo=function(aParentPort,aPortNode){return null;}}
BiWsdlBinding.registerBindingProtocol(BiWsdlBinding.BINDING_PROTOCOL_UNKNOWN,new BiWsdlBindingUnknownProtocolInfoFactory());function BiWsdlServicePort(aService,aSrcNode)
{if(_biInPrototype)return;this._service=aService;this._name=aSrcNode.getAttribute("name");var lPortFullName=BiXmlDefinitionsDocument.expandQname(aSrcNode.getAttribute("binding"),aSrcNode);var lPortBinding=aService.getWsdl().getBindings().getItem(lPortFullName);if(!lPortBinding)
{throw new BiWebServiceError("Service "+aService.getName()+": Could not find binding "+lPortFullName);}
this._binding=lPortBinding;this._protocolInfo=this.getBinding().getBindingProtocolInfoFactory().createPortProtocolInfo(this,aSrcNode);}
_p=_biExtend(BiWsdlServicePort,Object,"BiWsdlServicePort");BiWsdlServicePort.prototype.getBinding=function()
{return this._binding;}
BiWsdlServicePort.prototype.getService=function()
{return this._service;}
BiWsdlServicePort.prototype.getPortName=function()
{return this._name;}
BiWsdlServicePort.prototype.getProtocolInfo=function()
{return this._protocolInfo;}
function BiWsdlService(aWsdl,aNode)
{if(_biInPrototype)return;this._xmlSource=aNode;this._wsdl=aWsdl;this._name="["+aWsdl.getTargetNamespace()+"]"+aNode.getAttribute("name");this._documentation="";var lDocNode=this._xmlSource.selectSingleNode("wsdl:documentation");if(lDocNode!=null)
{this._documentation=lDocNode.text;}
this._portNames=new Array();this._ports=new Object();this._portBindings=new Object();var lPortNodes=this._xmlSource.selectNodes("wsdl:port");for(var lIdx=0;lIdx<lPortNodes.length;lIdx++)
{var lPortNode=lPortNodes[lIdx];var lPortName=lPortNode.getAttribute("name");this._portNames[lIdx]=lPortName;this._ports[lPortName]=new BiWsdlServicePort(this,lPortNode);}}
_p=_biExtend(BiWsdlService,Object,"BiWsdlService");BiWsdlService.prototype.getPortNames=function()
{return this._portNames;}
BiWsdlService.prototype.getPort=function(aPortName)
{return this._ports[aPortName];}
BiWsdlService.prototype.getPortDefinitionNode=function(aPortName)
{return this._portNodes[aPortName];}
BiWsdlService.prototype.getName=function()
{return this._name;}
BiWsdlService.prototype.getWsdl=function()
{return this._wsdl;}
function BiWsdlPortType(aParent,aNode)
{if(_biInPrototype)return;this._xmlSource=aNode;this._name=BiXmlDefinitionsDocument.expandQname(aNode.getAttribute("name"),aNode);var lOpNodes=aNode.selectNodes("wsdl:operation");this._operationNames=new Array();this._operations=new Object();for(var lOpIdx=0;lOpIdx<lOpNodes.length;lOpIdx++)
{var lOpNode=lOpNodes[lOpIdx];var lOpName=lOpNode.getAttribute("name");this._operationNames[lOpIdx]=lOpName;this._operations[lOpName]=new BiWsdlPortOperation(aParent,lOpNode);}}
_p=_biExtend(BiWsdlPortType,Object,"BiWsdlPortType");BiWsdlPortType.prototype.getOperationNames=function()
{return this._operationNames;}
BiWsdlPortType.prototype.getOperation=function(aName)
{return this._operations[aName];}
BiWsdlPortType.prototype.getName=function()
{return this._name;}
function BiWsdlBindingOperation(aParentBinding,aNode)
{if(_biInPrototype)return;this._binding=aParentBinding;this._loadFromBindingOpNode(aNode);}
_p=_biExtend(BiWsdlBindingOperation,Object,"BiWsdlBindingOperation");BiWsdlBindingOperation.prototype._loadFromBindingOpNode=function(aOpNode)
{this._opName=aOpNode.getAttribute("name");this._portOperation=this._binding.getPortType().getOperation(this._opName);this._protocolInfo=this.getBinding().getBindingProtocolInfoFactory().createBindingOpProtocolInfo(this,aOpNode);}
BiWsdlBindingOperation.prototype.getProtocolInfo=function()
{return this._protocolInfo;}
BiWsdlBindingOperation.prototype.getBinding=function()
{return this._binding;}
BiWsdlBindingOperation.prototype.getPortOperation=function()
{return this._portOperation;}
BiWsdlBindingOperation.prototype.getInputMessage=function()
{return this._portOperation.getInputMessage();}
BiWsdlBindingOperation.prototype.getOutputMessage=function()
{return this._portOperation.getOutputMessage();}
function BiWsdlPortOperation(aParent,aNode)
{if(_biInPrototype)return;this._name=aNode.getAttribute("name");var lNodeChildren=aNode.childNodes;if(lNodeChildren.length==1)
{if(lNo

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -