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

📄 webservice2.js

📁 ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.
💻 JS
📖 第 1 页 / 共 5 页
字号:
{lRes.push(this._baseTypes[0].decodeJsValue(lToken[lTokenIdx]));}
break;case BiSchemaSimpleType.DERIVATION_METHOD_UNION:lIdx=0;lRes=null;while(lRes==null&&lIdx<this._baseTypes.length)
{lRes=this._baseTypes[lIdx].decodeJsValue(aVal);lRes++;}
break;}
return lRes;}
BiSchemaSimpleType.prototype._loadRestriction=function(aNode)
{this._derivationMethod=BiSchemaSimpleType.DERIVATION_METHOD_RESTRICTION;if(aNode.getAttribute("base"))
{var lFullBaseTypeName=BiXmlDefinitionsDocument.expandQname(aNode.getAttribute("base"),aNode);this._baseTypes=[this._schema.getType(lFullBaseTypeName)];}else {var lSimpleTypeNode=aNode.selectSingleNode("xsd:simpleType");if(!lSimpleTypeNode)
{throw new BiSchemaError("Invalid base type for restricted simpleType.");}
var lTp=new BiSchemaSimpleType(this._schema,lSimpleTypeNode);lTp.finishLoad();this._baseTypes=[lTp];}}
BiSchemaSimpleType.prototype._loadList=function(aNode)
{this._derivationMethod=BiSchemaSimpleType.DERIVATION_METHOD_LIST;if(aNode.getAttribute("itemType"))
{var lFullBaseTypeName=BiXmlDefinitionsDocument.expandQname(this._schema.getType(aNode.getAttribute("itemType"),aNode));this._baseTypes=[this._schema.getType(lFullBaseTypeName)];}else {var lSimpleTypeNode=aNode.selectSingleNode("xsd:simpleType");if(!lSimpleTypeNode)
{throw new BiSchemaError("Invalid base type for list simpleType.");}
var lTp=new BiSchemaSimpleType(this._schema,lSimpleTypeNode);lTp.finishLoad();this._baseTypes=[lTp];}}
BiSchemaSimpleType.prototype._loadUnion=function(aNode)
{this._derivationMethod=BiSchemaSimpleType.DERIVATION_METHOD_UNION;this._baseTypes=[];if(aNode.getAttribute("memberTypes"))
{var lBaseTypeNames=aNode.getAttribute("memberTypes").split(" ");for(var lTypeIdx=0;lTypeIdx<lBaseTypeNames.length;lTypeIdx++)
{var lFullBaseTypeName=BiXmlDefinitionsDocument.expandQname(this._schema.getType(lBaseTypeNames[lTypeIdx],aNode));this._baseTypes.push(this._schema.getType(lFullBaseTypeName));}}
var lSimpleTypeElements=aNode.selectNodes("xsd:simpleType");for(var lSimpleTypeIdx=0;lSimpleTypeIdx<lSimpleTypeElements.length;lSimpleTypeIdx++)
{var lSimpleTypeNode=lSimpleTypeElements[lSimpleTypeIdx];var lTp=new BiSchemaSimpleType(this._schema,lSimpleTypeNode);lTp.finishLoad();this._baseTypes.push(lTp);}
if(!this._baseTypes.length)
{throw new BiSchemaError("Invalid simple type defintion: "+"expected at least one base simpleType for union simpleTypes. "+"type: "+(this._name?this._name:"(unnamed simple type)"));}}
BiSchemaSimpleType.prototype.getDerivationMethod=function()
{return this._derivationMethod;}
BiSchemaSimpleType.prototype.getBaseTypes=function()
{return this._baseTypes;}
BiSchemaSimpleType.DERIVATION_METHOD_RESTRICTION=0;BiSchemaSimpleType.DERIVATION_METHOD_LIST=1;BiSchemaSimpleType.DERIVATION_METHOD_UNION=2;function BiSchemaComplexType(aSchema,aComplexTypeNode)
{if(_biInPrototype)return;var lLocalTypeName=aComplexTypeNode.getAttribute("name");BiSchemaType.call(this,lLocalTypeName?("["+aSchema.getTargetNamespace()+"]"+lLocalTypeName):null);this._schema=aSchema;this._xmlSrc=aComplexTypeNode;}
_p=_biExtend(BiSchemaComplexType,BiSchemaType,"BiSchemaComplexType");BiSchemaComplexType.prototype._loadDirectModel=function(aSrcNode)
{this._contentType=BiSchemaComplexType.CONTENT_TYPE_PARTICLE;this._particle=BiSchemaParticle.loadParticle(this._schema,aSrcNode,false);}
BiSchemaComplexType.prototype._loadSimpleContentExtension=function(aSrcNode)
{var lExtensionNode=aSrcNode.selectSingleNode("xsd:extension");var lBaseTypeFullName=BiXmlDefinitionsDocument.expandQname(lExtensionNode.getAttribute("base"),lExtensionNode);this._baseType=this._schema.getType(lBaseTypeFullName);if(!this._baseType)
{throw new BiSchemaError("Base type not found: "+lBaseTypeFullName);}
this._contentType=BiSchemaComplexType.CONTENT_TYPE_SIMPLE;if(this._baseType instanceof BiSchemaSimpleContentType)
{this._contentSimpleType=this._baseType;}else {if(this._baseType.getContentType()!=BiSchemaComplexType.CONTENT_TYPE_SIMPLE)
{throw new BiSchemaError("simpleContent extended types must be derived from simpleContent complexTypes or simpleTypes.");}
this._contentSimpleType=this._baseType.getContentSimpleType();}
this._attributeBag=new BiSchemaAttributeBag(this._schema,lExtensionNode);if(this._baseType instanceof BiSchemaComplexType)
{this._attributeBag.composeBag(this._baseType.getAttributeBag(),BiSchemaAttributeBag.COMPOSEBAG_EXTEND_BAG);}}
BiSchemaComplexType.prototype._loadSimpleContentRestriction=function(aSrcNode)
{var lRestrictionNode=aSrcNode.selectSingleNode("xsd:restriction");var lBaseTypeFullName=BiXmlDefinitionsDocument.expandQname(lRestrictionNode.getAttribute("base"),lExtensionNode);this._baseType=this._schema.getType(lBaseTypeFullName);if(!this._baseType)
{throw new BiSchemaError("Base type not found: "+lBaseTypeFullName);}
this._contentType=BiSchemaComplexType.CONTENT_TYPE_SIMPLE;var lInlineSimpleTypeNode=lRestrictionNode.selectSingleNode("xsd:simpleType");if(lInlineSimpleTypeNode)
{this._contentSimpleType=new BiSchemaSimpleType(this._schema,lInlineSimpleTypeNode);this._contentSimpleType.finishLoad();}else {if(this._baseType.getContentType()!=BiSchemaComplexType.CONTENT_TYPE_SIMPLE)
{throw new BiSchemaError("simpleContent restricted types must be derived from simpleContent complexTypes.");}
this._contentSimpleType=this._baseType.getContentSimpleType();}
this._attributeBag=new BiSchemaAttributeBag(this._schema,lRestrictionNode);this._attributeBag.composeBag(this._baseType.getAttributeBag(),BiSchemaAttributeBag.COMPOSEBAG_RESTRICT_BAG);}
BiSchemaComplexType.prototype._loadComplexContentExtension=function(aSrcNode)
{var lExtensionNode=aSrcNode.selectSingleNode("xsd:extension");var lBaseTypeFullName=BiXmlDefinitionsDocument.expandQname(lExtensionNode.getAttribute("base"),lExtensionNode);this._baseType=this._schema.getComplexType(lBaseTypeFullName);if(!this._baseType)
{throw new BiSchemaError("Base type not found: "+lBaseTypeFullName);}
this._contentType=BiSchemaComplexType.CONTENT_TYPE_PARTICLE;var lExtParticle=null;lTestNode=lExtensionNode.selectSingleNode("xsd:group");if(!lTestNode)lTestNode=lExtensionNode.selectSingleNode("xsd:all");if(!lTestNode)lTestNode=lExtensionNode.selectSingleNode("xsd:choice");if(!lTestNode)lTestNode=lExtensionNode.selectSingleNode("xsd:sequence");if(lTestNode)
{lExtParticle=BiSchemaParticle.loadParticle(this._schema,lTestNode);}
if(!lExtParticle)
{this._particle=this._baseType.getParticle();}else {if(this._baseType.getParticle())
{this._particle=new BiSchemaSequenceParticle(this._schema,[this._baseType.getParticle(),lExtParticle]);}else {this._particle=lExtParticle;}}
this._attributeBag=new BiSchemaAttributeBag(this._schema,lExtensionNode);this._attributeBag.composeBag(this._baseType.getAttributeBag(),BiSchemaAttributeBag.COMPOSEBAG_EXTEND_BAG);}
BiSchemaComplexType.prototype._loadComplexContentRestriction=function(aSrcNode)
{var lRestrictionNode=aSrcNode.selectSingleNode("xsd:restriction");var lBaseTypeFullName=BiXmlDefinitionsDocument.expandQname(lRestrictionNode.getAttribute("base"),lRestrictionNode);this._baseType=this._schema.getComplexType(lBaseTypeFullName);if(!this._baseType)
{throw new BiSchemaError("Base type not found: "+lBaseTypeFullName);}
this._contentType=BiSchemaComplexType.CONTENT_TYPE_PARTICLE;var lRestParticle=null;lTestNode=lRestrictionNode.selectSingleNode("xsd:group");if(!lTestNode)lTestNode=lRestrictionNode.selectSingleNode("xsd:all");if(!lTestNode)lTestNode=lRestrictionNode.selectSingleNode("xsd:choice");if(!lTestNode)lTestNode=lRestrictionNode.selectSingleNode("xsd:sequence");if(lTestNode)
{lRestParticle=BiSchemaParticle.loadParticle(this._schema,lTestNode);}
this._particle=lRestParticle;this._attributeBag=new BiSchemaAttributeBag(this._schema,lRestrictionNode);this._attributeBag.composeBag(this._baseType.getAttributes(),BiSchemaAttributeBag.COMPOSEBAG_RESTRICT_BAG);}
BiSchemaComplexType.prototype.finishLoad=function()
{var lTestNode=this._xmlSrc.selectSingleNode("xsd:simpleContent");if(lTestNode)
{if(lTestNode.selectSingleNode("xsd:extension"))
{this._loadSimpleContentExtension(lTestNode);}else {this._loadSimpleContentRestriction(lTestNode);}}else {lTestNode=this._xmlSrc.selectSingleNode("xsd:complexContent");if(lTestNode)
{if(lTestNode.selectSingleNode("xsd:extension"))
{this._loadComplexContentExtension(lTestNode);}else {this._loadComplexContentRestriction(lTestNode);}}else {lTestNode=this._xmlSrc.selectSingleNode("xsd:group");if(!lTestNode)lTestNode=this._xmlSrc.selectSingleNode("xsd:all");if(!lTestNode)lTestNode=this._xmlSrc.selectSingleNode("xsd:choice");if(!lTestNode)lTestNode=this._xmlSrc.selectSingleNode("xsd:sequence");if(lTestNode)
{this._loadDirectModel(lTestNode);}else {this._contentType=BiSchemaComplexType.CONTENT_TYPE_PARTICLE;this._particle=null;}
this._attributeBag=new BiSchemaAttributeBag(this._schema,this._xmlSrc);}}}
BiSchemaComplexType.prototype.getContentType=function()
{return this._contentType;}
BiSchemaComplexType.prototype.getContentParticle=function()
{return this._particle;}
BiSchemaComplexType.prototype.getContentSimpleType=function()
{return this._contentSimpleType;}
BiSchemaComplexType.prototype.getAttributes=function()
{return this._attributeBag;}
BiSchemaComplexType.CONTENT_TYPE_SIMPLE=0;BiSchemaComplexType.CONTENT_TYPE_PARTICLE=1;function BiSchemaAttr(aSchema,aAttrDefNode,aGlobal)
{if(_biInPrototype)return;if(aGlobal||aAttrDefNode.getAttribute("form")=="qualified"||(!aAttrDefNode.getAttribute("form")&&aSchema.getAttrFormDefault()=="qualified"))
{this._targetNamespace=aSchema.getTargetNamespace();}else {this._targetNamespace="";}
this._name=aAttrDefNode.getAttribute("name");this._schema=aSchema;this._srcXml=aAttrDefNode;}
_p=_biExtend(BiSchemaAttr,Object,"BiSchemaAttr");BiSchemaAttr.prototype.finishLoad=function()
{var lTypeDefNode=this._srcXml.selectSingleNode("xsd:simpleType");if(lTypeDefNode)
{this._type=new BiSchemaSimpleType(this._schema,lTypeDefNode);this._type.finishLoad();}else if(this._srcXml.getAttribute("type"))
{this._type=this._schema.getType(BiXmlDefinitionsDocument.expandQname(this._srcXml.getAttribute("type"),this._srcXml));}else {this._type=this._schema.getType("[http://www.w3.org/2001/XMLSchema]anySimpleType");}
if(this._srcXml.getAttribute("fixed"))
{this._fixedVal=this._srcXml.getAttribute("fixed");}}
BiSchemaAttr.prototype.getName=function()
{return this._name;}
BiSchemaAttr.prototype.getFixed=function()
{return this._fixedVal;}
BiSchemaAttr.prototype.getExpandedQName=function()
{return"["+this._targetNamespace+"]"+this._name;}
BiSchemaAttr.prototype.getType=function()
{return this._type;}
function BiSchemaElement(aSchema,aElementDefNode,aGlobal)
{if(_biInPrototype)return;if(aGlobal||aElementDefNode.getAttribute("form")=="qualified"||(!aElementDefNode.getAttribute("form")&&aSchema.getElementFormDefault()=="qualified"))
{this._targetNamespace=aSchema.getTargetNamespace();}else {this._targetNamespace="";}
this._name=aElementDefNode.getAttribute("name");this._srcXml=aElementDefNode;this._schema=aSchema;this._type=null;}
_p=_biExtend(BiSchemaElement,Object,"BiSchemaElement");BiSchemaElement.prototype.finishLoad=function()
{if(this._srcXml.getAttribute("type"))
{var lExpandedTypeName=BiXmlDefinitionsDocument.expandQname(this._srcXml.getAttribute("type"),this._srcXml);this._type=this._schema.getType(lExpandedTypeName);}else {var lSimpleTypeNode=this._srcXml.selectSingleNode("xsd:simpleType");if(lSimpleTypeNode)
{this._type=new BiSchemaSimpleType(this._schema,lSimpleTypeNode);this._type.finishLoad();}else {var lComplexTypeNode=this._srcXml.selectSingleNode("xsd:complexType");if(lComplexTypeNode)
{this._type=new BiSchemaComplexType(this._schema,lComplexTypeNode);this._type.finishLoad();}}}
this._nillable=this._srcXml.getAttribute("nillable");}
BiSchemaElement.prototype.getName=function()
{return this._name;}
BiSchemaElement.prototype.getNamespace=function()
{return this._targetNamespace;}
BiSchemaElement.prototype.getExpandedQName=function()
{return"["+this._targetNamespace+"]"+this._name;}
BiSchemaElement.prototype.getNillable=function()
{return this._nillable;}
BiSchemaElement.prototype.getType=function()
{return this._type;}
BiSchemaElement.prototype.toString=function()
{return"Element "+this.getExpandedQName();}
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 BiSchemaAttrGroupDef(aSchema,aAttrGroupDefNode)
{if(_biInPrototype)return;this._schema=aSchema;this._srcXml=aAttrGroupDefNode;}
_p=_biExtend(BiSchemaAttrGroupDef,Object,"BiSchemaAttrGroupDef");BiSchemaAttrGroupDef.prototype.finishLoad=function()
{this._attrs=new BiSchemaAttributeBag(this._schema,this._srcXml);}
BiSchemaAttrGroupDef.prototype.getAttributes=function()
{return this._attrs;}
function BiSchema()
{if(_biInPrototype)return;BiXmlDefinitionsDocument.call(this);this._simpleTypes=new BiWsdlDefinitionDictionary(this,"xsd:simpleType","@name",function(aSimpleTypeNode,aSchema){return new BiSchemaSimpleType(aSchema,aSimpleTypeNode);});this._complexTypes=new BiWsdlDefinitionDictionary(this,"xsd:complexType","@name",function(aComplexTypeNode,aSchema){return new BiSchemaComplexType(aSchema,aComplexTypeNode);});this._attrs=new BiWsdlDefinitionDictionary(this,"xsd:attribute","@name",function(aAttrDefNode,aSchema){return new BiSchemaAttr(aSchema,aAttrDefNode,true);});this._elements=new BiWsdlDefinitionDictionary(this,"xsd:element","@name",function(aElementDefNode,aSchema){return new BiSchemaElement(aSchema,aElementDefNode,true);});this._groupDefs=new BiWsdlDefinitionDictionary(this,"xsd:group","@name",function(aGroupDefNode,aSchema){return new BiSchemaGroupDef(aSchema,aGroupDefNode);});this._attrGroupDefs=new BiWsdlDefinitionDictionary(this,"xsd:attributeGroup","@name",function(aAttrGroupDefNode,aSchema){return new BiSchemaAttrGroupDef(aSchema,aAttrGroupDefNode);});this._simpleTypes.addImport(BiSchemaPrimitiveType.PRIMITIVE_TYPES_DEFINITIONS_DICTIONARY);}
_p=_biExtend(BiSchema,BiXmlDefinitionsDocument,"BiSchema");BiSchema.prototype.dispose=function()
{this._simpleTypes.dispose();this._simpleTypes=null;this._complexTypes.dispose();this._complexTypes=null;this._attrs.dispose();this._attrs=null;this._elements.dispose();this._elements=null;this._groupDefs.dispose();this._groupDefs=null;this._attrGroupDefs.dispose();this._attrGroupDefs=null;BiXmlDefinitionsDocument.prototype.dispose.call(this);}
BiSchema.prototype._initiallyProcessDocument=function()
{var lSchemaRootQname=BiXmlDefinitionsDocument.parseExpandedQname(BiXmlDefinitionsDocument.expandQname(this._xmlSource.tagName,this._xmlSource));if((lSchemaRootQname.ns!="http://www.w3.org/2001/XMLSchema"&&lSchemaRootQname.ns!="http://www.w3.org/1999/XMLSchema")||lSchemaRootQname.localName!="schema")
{throw new BiWebServiceError("Invalid schema document; missing <xsd:schema> tag.");}
this._xmlSource.ownerDocument.setProperty("SelectionNamespaces","xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' "+"xmlns:xsd='"+lSchemaRootQname.ns+"' "+"xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'");this._xmlSource.ownerDocument.setProperty("SelectionLanguage","XPath");this._targetNs="";var lTnsNode=this._xmlSource.selectSingleNode("@targetNamespace");if(lTnsNode)

⌨️ 快捷键说明

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