private void ParseWsdlBindingOperation(WsdlBindingOperation op, ref bool bRpcBinding, ref bool bSoapEncoded) { Util.Log("WsdlParser.ParseWsdlBindingOperation"); int curDepth = _XMLReader.Depth; bool binput = false; bool boutput = false; WsdlBindingOperationSection opSec = null; ReadNextXmlElement(); while (_XMLReader.Depth > curDepth) { String elementName = _XMLReader.LocalName; if (MatchingNamespace(s_wsdlSudsNamespaceString) && MatchingStrings(elementName, s_methodString)) { op.methodAttributes = LookupAttribute(s_attributesString, null, true); ReadNextXmlElement(); continue; } else if (MatchingNamespace(s_wsdlSoapNamespaceString) && MatchingStrings(elementName, s_operationString)) { WsdlBindingSoapOperation soapOp = new WsdlBindingSoapOperation(); soapOp.soapAction = LookupAttribute(s_soapActionString, null, false); soapOp.style = LookupAttribute(s_styleString, null, false); if (soapOp.style == "rpc") bRpcBinding = true; { } op.soapOperation = soapOp; ReadNextXmlElement(); continue; } else if (MatchingNamespace(s_wsdlNamespaceString)) { if (MatchingStrings(elementName, s_inputString)) { binput = true; opSec = ParseWsdlBindingOperationSection(op, elementName, ref bSoapEncoded); continue; } else if (MatchingStrings(elementName, s_outputString)) { boutput = true; ParseWsdlBindingOperationSection(op, elementName, ref bSoapEncoded); continue; } else if (MatchingStrings(elementName, s_faultString)) { ParseWsdlBindingOperationSection(op, elementName, ref bSoapEncoded); continue; } } // Ignore others elements such as annotations SkipXmlElement(); } // if no output section then the default name is just the op name. if (opSec != null && binput && !boutput) opSec.name = op.name; }
private void ParseWsdlBindingOperation(WsdlBindingOperation op, ref bool bRpcBinding, ref bool bSoapEncoded) { int depth = this._XMLReader.Depth; bool flag = false; bool flag2 = false; WsdlBindingOperationSection section = null; this.ReadNextXmlElement(); while (this._XMLReader.Depth > depth) { string localName = this._XMLReader.LocalName; if (this.MatchingNamespace(s_wsdlSudsNamespaceString) && MatchingStrings(localName, s_methodString)) { op.methodAttributes = this.LookupAttribute(s_attributesString, null, true); this.ReadNextXmlElement(); } else { if (this.MatchingNamespace(s_wsdlSoapNamespaceString) && MatchingStrings(localName, s_operationString)) { WsdlBindingSoapOperation operation = new WsdlBindingSoapOperation { soapAction = this.LookupAttribute(s_soapActionString, null, false), style = this.LookupAttribute(s_styleString, null, false) }; if (operation.style == "rpc") { bRpcBinding = true; } op.soapOperation = operation; this.ReadNextXmlElement(); continue; } if (this.MatchingNamespace(s_wsdlNamespaceString)) { if (MatchingStrings(localName, s_inputString)) { flag = true; section = this.ParseWsdlBindingOperationSection(op, localName, ref bSoapEncoded); continue; } if (MatchingStrings(localName, s_outputString)) { flag2 = true; this.ParseWsdlBindingOperationSection(op, localName, ref bSoapEncoded); continue; } if (MatchingStrings(localName, s_faultString)) { this.ParseWsdlBindingOperationSection(op, localName, ref bSoapEncoded); continue; } } this.SkipXmlElement(); } } if (((section != null) && flag) && !flag2) { section.name = op.name; } }