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

📄 webservice2.js

📁 ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.
💻 JS
📖 第 1 页 / 共 5 页
字号:
{return this._minOc;}
BiSchemaParticle.prototype.getMaxOccurs=function()
{return this._maxOc;}
BiSchemaParticle.loadParticle=function(aSchema,aNode)
{return new BiSchemaParticle(aSchema,aNode);}
BiSchemaParticle.prototype.toString=function()
{return this._term.toString()+"["+this._minOc+","+this._maxOc+"]";}
function BiSchemaModelGroup(aSchema,aNode,aAllowedParticleNodes)
{if(_biInPrototype)return;this._particles=[];if(!aNode)
return;var lPotentialParticles=aNode.selectNodes("*");for(var lIdx=0;lIdx<lPotentialParticles.length;lIdx++)
{if(lPotentialParticles[lIdx].baseName!="annotation")
{if(!aAllowedParticleNodes.contains(lPotentialParticles[lIdx].baseName))
{throw new BiSchemaError("Model group doesn't permit particle elements of name "+lPotentialParticles[lIdx].baseName);}else {this._particles.push(BiSchemaParticle.loadParticle(aSchema,lPotentialParticles[lIdx],true));}}}}
_p=_biExtend(BiSchemaModelGroup,Object,"BiSchemaModelGroup");BiSchemaModelGroup.loadModelGroup=function(aSchema,aSrcNode)
{if(aSrcNode.namespaceURI!="http://www.w3.org/2001/XMLSchema")
{throw new BiSchemaError("Invalid model group namespace: "+aSrcNode.namespaceURI);}
if(aSrcNode.baseName=="all")
{return new BiSchemaAllModelGroup(aSchema,aSrcNode);}else if(aSrcNode.baseName=="choice")
{return new BiSchemaChoiceModelGroup(aSchema,aSrcNode);}else if(aSrcNode.baseName=="sequence")
{return new BiSchemaSequenceModelGroup(aSchema,aSrcNode);}else {throw new BiSchemaError("Invalid model group: "+aSrcNode.baseName);}}
BiSchemaModelGroup.prototype.getParticles=function()
{return this._particles;}
function BiSchemaAllModelGroup(aSchema,aNode)
{if(_biInPrototype)return;BiSchemaModelGroup.call(this,aSchema,aNode,["element"]);}
_p=_biExtend(BiSchemaAllModelGroup,BiSchemaModelGroup,"BiSchemaAllModelGroup");BiSchemaAllModelGroup.prototype.toString=function()
{return"all";}
function BiSchemaChoiceModelGroup(aSchema,aNode)
{if(_biInPrototype)return;BiSchemaModelGroup.call(this,aSchema,aNode,["element","any","group","all","choice","sequence"]);}
_p=_biExtend(BiSchemaChoiceModelGroup,BiSchemaModelGroup,"BiSchemaChoiceModelGroup");BiSchemaChoiceModelGroup.prototype.toString=function()
{return"choice";}
function BiSchemaSequenceModelGroup(aSchema,aNode)
{if(_biInPrototype)return;BiSchemaModelGroup.call(this,aSchema,aNode,["element","any","group","all","choice","sequence"]);}
_p=_biExtend(BiSchemaSequenceModelGroup,BiSchemaModelGroup,"BiSchemaSequenceModelGroup");BiSchemaSequenceModelGroup.prototype.toString=function()
{return"sequence";}
function BiSchemaGroupDef(aSchema,aGroupDefNode)
{if(_biInPrototype)return;var lTestNode=aGroupDefNode.selectSingleNode("xsd:all");if(!lTestNode)lTestNode=aGroupDefNode.selectSingleNode("xsd:choice");if(!lTestNode)lTestNode=aGroupDefNode.selectSingleNode("xsd:sequence");this._loadedNode=lTestNode;this._schema=aSchema;}
_p=_biExtend(BiSchemaGroupDef,Object,"BiSchemaGroupDef");BiSchemaGroupDef.prototype.finishLoad=function()
{this._modelGroup=BiSchemaModelGroup.loadModelGroup(this._schema,this._loadedNode);}
BiSchemaGroupDef.prototype.getModelGroup=function()
{return this._modelGroup;}
function BiSchemaAttributeBag(aSchema,aSrcNode)
{if(_biInPrototype)return;this._attributes=[];this._attrByName={};this._prohibitedAttrByName={};this._anyAttrNamespaces={};this._schema=aSchema;this._loadAttributes(aSrcNode);}
_p=_biExtend(BiSchemaAttributeBag,Object,"BiSchemaAttributeBag");BiSchemaAttributeBag.prototype._loadAttributes=function(aSrcNode)
{var lAttributeRefs=aSrcNode.selectNodes("xsd:attribute");for(var lAttrIdx=0;lAttrIdx<lAttributeRefs.length;lAttrIdx++)
{var lAttr=null;var lAttrNode=lAttributeRefs[lAttrIdx];lAttr=new BiSchemaAttrUse(this._schema,lAttrNode);if(lAttr.getUseType()!=BiSchemaAttrUse.USE_TYPE_PROHIBITED)
{this._attributes.push(lAttr);this._attrByName[lAttr.getExpandedQName()]=lAttr;}else {this._prohibitedAttrByName[lAttr.getExpandedQName()]=true;}}
var lAnyAttribute=aSrcNode.selectSingleNode("xsd:anyAttribute/@namespace");if(lAnyAttribute)
{if(lAnyAttribute.nodeValue=="##any")
{this._anyAttrNamespaces={"_wcType":"any"};}else if(lAnyAttribute.nodeValue=="##other")
{this._anyAttrNamespaces={"_wcType":"not","_namespace":this._schema.getTargetNamespace()};}else {var lAnyAttrNamespaces=lAnyAttribute.nodeValue.split(" ");for(var lAnyAttrNsIdx=0;lAnyAttrNsIdx<lAnyAttrNamespaces.length;lAnyAttrNsIdx++)
{if(lAnyAttrNamespaces[lAnyAttrNsIdx]=="##targetNamespace")
{lAnyAttrNamespaces[lAnyAttrNsIdx]=this._schema.getTargetNamespace();}else if(lAnyAttrNamespaces[lAnyAttrNsIdx]=="##local")
{lAnyAttrNamespaces[lAnyAttrNsIdx]="##local";}}
this._anyAttrNamespaces={"_wcType":"list","_namespaces":lAnyAttrNamespaces};}}
var lAttributeGroupRefs=aSrcNode.selectNodes("xsd:attributeGroup[@ref]");for(var lAttrIdx=0;lAttrIdx<lAttributeGroupRefs.length;lAttrIdx++)
{lAttrGroupFullName=BiXmlDefinitionsDocument.expandQname(lAttributeGroupRefs[lAttrIdx].getAttribute("ref"),lAttributeGroupRefs[lAttrIdx]);this.composeBag(this._schema.getAttributeGroup(lAttrGroupFullName).getAttributes(),BiSchemaAttributeBag.COMPOSEBAG_REFERENCE_BAG);}}
BiSchemaAttributeBag.prototype.getAttrCount=function()
{return this._attributes.length;}
BiSchemaAttributeBag.prototype.getAttributes=function()
{return this._attributes;}
BiSchemaAttributeBag.prototype.getAttribute=function(aExpandedName)
{return this._attrByName[aExpandedName];}
BiSchemaAttributeBag.prototype.composeBag=function(aSrcBag,aComposeType)
{for(var lAttrIdx=0;lAttrIdx<0;lAttrIdx++)
{var lAttr=aSrcBag._attributes[lAttrIdx];if(aComposeType!=BiSchemaAttributeBag.COMPOSEBAG_RESTRICT_BAG||!((lAttr.getExpandedQName()in this._attrByName)||(lAttr.getExpandedQName()in this._prohibitedAttrByName)))
{this._attributes.push(lAttr);this._attrByName[lAttr.getExpandedQName()]=lAttr;}}
if(aComposeType==BiSchemaAttributeBag.COMPOSEBAG_REFERENCE_BAG)
{if(!this._anyAttrNamespaces)
{this._anyAttrNamespaces=aSrcBag._anyAttrNamespaces;}else if(aSrcBag._anyAttrNamespaces)
{if(this._anyAttrNamespaces._wcType=="any")
{this._anyAttrNamespaces=aSrcBag._anyAttrNamespaces;}else if(aSrcBag._anyAttrNamespaces._wcType=="any")
{}else if(this._anyAttrNamespaces._wcType=="not"&&aSrcBag._anyAttrNamespaces._wcType=="list")
{var lRemovedNs=this._anyAttrNamespaces._namespace;var lSrcSet=aSrcBag._anyAttrNamespaces._namespaces;var lNewSet=[];for(var lIdx=0;lIdx<lSrcSet.length;lIdx++)
{if(lSrcSet[lIdx]!=lRemovedNs)
{lNewSet.push(lSrcSet[lIdx]);}}}else if(this._anyAttrNamespaces._wcType=="list"&&aSrcBag._anyAttrNamespaces._wcType=="not")
{var lRemovedNs=aSrcBag._anyAttrNamespaces._namespace;var lSrcSet=this._anyAttrNamespaces._namespaces;var lNewSet=[];for(var lIdx=0;lIdx<lSrcSet.length;lIdx++)
{if(lSrcSet[lIdx]!=lRemovedNs)
{lNewSet.push(lSrcSet[lIdx]);}}}else if(this._anyAttrNamespaces._wcType=="list"&&aSrcBag._anyAttrNamespaces._wcType=="list")
{var lIdx=0;while(lIdx<this._anyAttrNamespaces._namespaces.length)
{if(aSrcBag._anyAttrNamespaces._namespaces.contains(this._anyAttrNamespaces._namespaces[lIdx]))
{lIdx++;}else {this._anyAttrNamespaces.removeAt(lIdx);}}}else if(this._anyAttrNamespaces._wcType=="not"&&aSrcBag._anyAttrNamespaces._wcType=="not"&&this._anyAttrNamespaces._namespace!=aSrcBag._anyAttrNamespaces._namespace)
{throw new BiSchemaError("Intersection of attribute wildcards is inexpressible.");}}}else if(aComposeType==BiSchemaAttributeBag.COMPOSEBAG_RESTRICT_BAG)
{}else if(aComposeType==BiSchemaAttributeBag.COMPOSEBAG_EXTEND_BAG)
{if(!this._anyAttrNamespaces)
{this._anyAttrNamespaces=aSrcBag._anyAttrNamespaces;}else if(aSrcBag._anyAttrNamespaces)
{if(this._anyAttrNamespaces._wcType=="any"||aSrcBag._anyAttrNamespaces._wcType=="any")
{this._anyAttrNamespaces={_wcType:"any"};}else if(this._anyAttrNamespaces._wcType=="not"&&aSrcBag._anyAttrNamespaces._wcType=="list")
{if(aSrcBag._anyAttrNamespaces._namespaces.contains(this._anyAttrNamespaces._namespace))
{this._anyAttrNamespaces={_wcType:"any"};}}else if(this._anyAttrNamespaces._wcType=="list"&&aSrcBag._anyAttrNamespaces._wcType=="not")
{if(this._anyAttrNamespaces._namespaces.contains(aSrcBag._anyAttrNamespaces._namespace))
{this._anyAttrNamespaces={_wcType:"any"};}else {this._anyAttrNamespaces=aSrcBag._anyAttrNamespaces;}}else if(this._anyAttrNamespaces._wcType=="list"&&aSrcBag._anyAttrNamespaces._wcType=="list")
{var lIdx=0;while(lIdx<aSrcBag._anyAttrNamespaces._namespaces.length)
{if(!this._anyAttrNamespaces._namespaces.contains(aSrcBag._anyAttrNamespaces._namespaces[lIdx]))
{this._anyAttrNamespaces._namespaces.push(aSrcBag._anyAttrNamespaces);}}}else if(this._anyAttrNamespaces._wcType=="not"&&aSrcBag._anyAttrNamespaces._wcType=="not"&&this._anyAttrNamespaces._namespace!=aSrcBag._anyAttrNamespaces._namespace)
{throw new BiSchemaError("Union of attribute wildcards is inexpressible.");}}}}
BiSchemaAttributeBag.COMPOSEBAG_REFERENCE_BAG=0;BiSchemaAttributeBag.COMPOSEBAG_EXTEND_BAG=1;BiSchemaAttributeBag.COMPOSEBAG_RESTRICT_BAG=2;function BiSchemaAttrUse(aSchema,aSrcNode)
{if(_biInPrototype)return;var lTextualUseType=aSrcNode.getAttribute("use");if(!lTextualUseType)
{lTextualUseType="optional";}
if(lTextualUseType=="optional")
{this._useType=BiSchemaAttrUse.USE_TYPE_OPTIONAL;}else if(lTextualUseType=="prohibited")
{this._useType=BiSchemaAttrUse.USE_TYPE_PROHIBITED;}else if(lTextualUseType=="required")
{this._useType=BiSchemaAttrUse.USE_TYPE_REQUIRED;}else {throw new BiSchemaError("Invalid attribute use type specified: "+lTextualUseType);}
var lArrTypeNode=aSrcNode.selectSingleNode("@wsdl:arrayType");if(lArrTypeNode)
{var lArrType= /([^\[\]]*)(\[.*)/.exec(lArrTypeNode.nodeValue);if(!lArrType.length||lArrType.length!=3)
{throw new BiSchemaError("Invalid wsdl:arrayType value: "+lArrTypeNode.nodeValue);}
this._wsdlArrayBaseType=BiXmlDefinitionsDocument.expandQname(lArrType[1],aSrcNode);this._wsdlArraySubscripts=lArrType[2];}
if(aSrcNode.getAttribute("ref"))
{var lAttrFullName=BiXmlDefinitionsDocument.expandQname(aSrcNode.getAttribute("ref"),aSrcNode);this._attr=aSchema.getAttribute(lAttrFullName);if(!this._attr)
{throw new BiSchemaError("Referenced attribute "+lAttrFullName+" not found.");}}else {this._attr=new BiSchemaAttr(aSchema,aSrcNode,false);this._attr.finishLoad();}}
_p=_biExtend(BiSchemaAttrUse,Object,"BiSchemaAttrUse");BiSchemaAttrUse.prototype.getAttr=function()
{return this._attr;}
BiSchemaAttrUse.prototype.getWsdlArrayBaseType=function()
{return this._wsdlArrayBaseType;}
BiSchemaAttrUse.prototype.getWsdlArraySubscripts=function()
{return this._wsdlArraySubscripts;}
BiSchemaAttrUse.prototype.getExpandedQName=function()
{return this._attr.getExpandedQName();}
BiSchemaAttrUse.prototype.getUseType=function()
{return this._useType;}
BiSchemaAttrUse.USE_TYPE_OPTIONAL=0;BiSchemaAttrUse.USE_TYPE_REQUIRED=1;BiSchemaAttrUse.USE_TYPE_PROHIBITED=2;function BiSchemaSimpleType(aSchema,aSimpleTypeNode)
{if(_biInPrototype)return;BiSchemaSimpleContentType.call(this,aSimpleTypeNode.getAttribute("name"));this._schema=aSchema;this._xmlSrc=aSimpleTypeNode;}
_p=_biExtend(BiSchemaSimpleType,BiSchemaSimpleContentType,"BiSchemaSimpleType");BiSchemaSimpleType.prototype.finishLoad=function()
{var lTestNode=this._xmlSrc.selectSingleNode("xsd:restriction");if(lTestNode)
{this._loadRestriction(lTestNode);}else {lTestNode=_xmlSrc.selectSingleNode("xsd:list");if(lTestNode)
{this._loadList(lTestNode);}else {lTestNode=_xmlSrc.selectSingleNode("xsd:union");if(lTestNode)
{this._loadUnion(lTestNode);}else {throw new BiSchemaError("Invalid simple type defintion: "+"expected content (xsd:restriction | xsd:list | xsd:union); "+"type: "+(this._name?this._name:"(unnamed simple type)"));}}}}
BiSchemaSimpleType.prototype.encodeJsValue=function(aVal)
{var lRes;var lIdx;switch(this._derivationMethod)
{case BiSchemaSimpleType.DERIVATION_METHOD_RESTRICTION:lRes=this._baseTypes[0].encodeJsValue(aVal);break;case BiSchemaSimpleType.DERIVATION_METHOD_LIST:if(aVal instanceof Array)
{if(!aVal.length)
{lRes="";}else {lRes=this._baseTypes[0].encodeJsValue(aVal[0]);for(lIdx=1;lIdx<aVal.length;lIdx++)
{lRes+=" "+this._baseTypes[0].encodeJsValue(aVal[lIdx]);}}}else {lRes=this._baseTypes[0].encodeJsValue(aVal);}
break;case BiSchemaSimpleType.DERIVATION_METHOD_UNION:lIdx=0;lRes=null;while(lRes==null&&lIdx<this._baseTypes.length)
{lRes=this._baseTypes[lIdx].encodeJsValue(aVal);lRes++;}
break;}
return lRes;}
BiSchemaSimpleType.prototype.decodeJsValue=function(aVal)
{var lRes;var lIdx;switch(this._derivationMethod)
{case BiSchemaSimpleType.DERIVATION_METHOD_RESTRICTION:lRes=this._baseTypes[0].decodeJsValue(aVal);break;case BiSchemaSimpleType.DERIVATION_METHOD_LIST:var lTokens=aVal.split(' ');lRes=new Array();for(var lTokenIdx=0;lTokenIdx<lTokens.length;lTokenIdx++)

⌨️ 快捷键说明

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