Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 7dbb97048ebf07a07f14d36d61024b23 > files > 78

wsdlpull-doc-1.23-3.fc13.noarch.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>wsdlpull: /builddir/build/BUILD/wsdlpull-1.23/src/wsdlparser/WsdlDebug.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_02f058d422e7266632662d1436e7c90d.html">src</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_cc7944105668626785e4a1a985510ef5.html">wsdlparser</a>
  </div>
</div>
<div class="contents">
<h1>WsdlDebug.cpp</h1><a href="WsdlDebug_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* </span>
<a name="l00002"></a>00002 <span class="comment"> * wsdlpull - A C++ parser  for Wsdl  (Web services description language)</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2005-2007 Vivek Krishna</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment"> * modify it under the terms of the GNU Library General Public</span>
<a name="l00007"></a>00007 <span class="comment"> * License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"> *</span>
<a name="l00010"></a>00010 <span class="comment"> * This library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment"> * Library General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"> *</span>
<a name="l00015"></a>00015 <span class="comment"> * You should have received a copy of the GNU Library General Public</span>
<a name="l00016"></a>00016 <span class="comment"> * License along with this library; if not, write to the Free</span>
<a name="l00017"></a>00017 <span class="comment"> * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00018"></a>00018 <span class="comment"> *</span>
<a name="l00019"></a>00019 <span class="comment"> *</span>
<a name="l00020"></a>00020 <span class="comment"> */</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="WsdlParser_8h.html">wsdlparser/WsdlParser.h</a>&quot;</span>
<a name="l00023"></a>00023 
<a name="l00024"></a>00024 <span class="preprocessor">#ifdef LOGGING</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="keyword">using namespace </span>std;
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 <span class="keyword">namespace </span>WsdlPull {
<a name="l00029"></a>00029 <span class="comment">// just print all the stuff,for debugging</span>
<a name="l00030"></a>00030 <span class="keywordtype">void</span>  WsdlParser::print(std::ostream &amp; out)
<a name="l00031"></a>00031 {
<a name="l00032"></a>00032   Binding *bn = bindings_.front();
<a name="l00033"></a>00033   <span class="keywordtype">int</span> i = 0, soapBindingId, inId, outId, faultId;
<a name="l00034"></a>00034   <span class="keywordtype">int</span> numOps = bn-&gt;numOps();
<a name="l00035"></a>00035 
<a name="l00036"></a>00036   <span class="comment">/*</span>
<a name="l00037"></a>00037 <span class="comment">    Print all the  operations and messages and then the types of</span>
<a name="l00038"></a>00038 <span class="comment">    the Schema Parser</span>
<a name="l00039"></a>00039 <span class="comment">  */</span>
<a name="l00040"></a>00040   <span class="keywordflow">for</span> (i = 0; i &lt; <a class="code" href="classWsdlPull_1_1WsdlParser.html#a6750e4364022b1eac6cc49814644994f">getNumSchemas</a>(); i++)
<a name="l00041"></a>00041     schemaParser_[i]-&gt;print(out);
<a name="l00042"></a>00042   i = 0;
<a name="l00043"></a>00043   <span class="keywordflow">while</span> (i &lt; numOps)
<a name="l00044"></a>00044     {
<a name="l00045"></a>00045       <span class="keyword">const</span> <span class="keywordtype">int</span> *bindings = 0;
<a name="l00046"></a>00046       <span class="keywordtype">int</span> n = 0;
<a name="l00047"></a>00047       n = bn-&gt;getOpBinding(i, bindings);
<a name="l00048"></a>00048       soapBindingId = bindings[0];
<a name="l00049"></a>00049       n = bn-&gt;getInputBinding(i, bindings);
<a name="l00050"></a>00050       inId = bindings[0];
<a name="l00051"></a>00051       n = bn-&gt;getOutputBinding(i, bindings);
<a name="l00052"></a>00052       outId = bindings[0];
<a name="l00053"></a>00053       n = bn-&gt;getFaultBinding(i, bindings);
<a name="l00054"></a>00054       faultId = bindings[0];
<a name="l00055"></a>00055       <span class="keyword">const</span> Operation *op = bn-&gt;getOperation(i);
<a name="l00056"></a>00056       out &lt;&lt; op-&gt;getName() &lt;&lt; endl;
<a name="l00057"></a>00057       <span class="keyword">const</span> Message *inMessage = op-&gt;getMessage(<a class="code" href="namespaceWsdlPull.html#a164c5e09fcd6185de9350186f9210ca6a3a3f05921718283e80a57288e54f3c50">Input</a>);
<a name="l00058"></a>00058       <span class="keyword">const</span> Message *outMessage = op-&gt;getMessage(<a class="code" href="namespaceWsdlPull.html#a164c5e09fcd6185de9350186f9210ca6a34eb09cf6345ace24ca2471de932fa41">Output</a>);
<a name="l00059"></a>00059       <span class="keywordtype">int</span> nParams = 0, j = 0;
<a name="l00060"></a>00060       <span class="keywordtype">int</span> typeId = 0,schemaId;
<a name="l00061"></a>00061       <span class="keyword">const</span> <a class="code" href="classSchema_1_1XSDType.html">XSDType</a> *pType = 0;
<a name="l00062"></a>00062       nParams = inMessage-&gt;getNumParts();
<a name="l00063"></a>00063       <span class="keywordflow">for</span> (j = 0; j &lt; nParams; j++)
<a name="l00064"></a>00064         {
<a name="l00065"></a>00065           <span class="keywordflow">if</span> (inMessage-&gt;getPartRefType(j) == <a class="code" href="classWsdlPull_1_1Part.html#afea0ad11001f495a23133c7e8f26584ca2035ecfd4a1ed8bfe691c36c12d21170">Part::Elem</a>)
<a name="l00066"></a>00066             {
<a name="l00067"></a>00067               
<a name="l00068"></a>00068               typeId = inMessage-&gt;getPartType(j);
<a name="l00069"></a>00069               pType = schemaParser_[schemaId]-&gt;getType(typeId);
<a name="l00070"></a>00070 
<a name="l00071"></a>00071               <span class="keywordflow">if</span> (!pType-&gt;<a class="code" href="classSchema_1_1XSDType.html#a6f87708ce2ba5f5ec7a7b3f5e7e0007b">isSimple</a>())
<a name="l00072"></a>00072                 {
<a name="l00073"></a>00073                   <a class="code" href="classSchema_1_1ComplexType.html">ComplexType</a> * cType = (<a class="code" href="classSchema_1_1ComplexType.html">ComplexType</a> *) pType;
<a name="l00074"></a>00074 
<a name="l00075"></a>00075                   <a class="code" href="classSchema_1_1ContentModel.html#aa9cf695e363a4535c0ccc41870aeaada">ContentModel::ContentsIterator</a> cit_b=cType-&gt;<a class="code" href="classSchema_1_1ComplexType.html#a1a76250fcf51c807803c1fb929fdf628">getContents</a>()-&gt;<a class="code" href="classSchema_1_1ContentModel.html#a1166eb4700e09a650a5f9cc61f3f3e78">begin</a>();
<a name="l00076"></a>00076                   <a class="code" href="classSchema_1_1ContentModel.html#aa9cf695e363a4535c0ccc41870aeaada">ContentModel::ContentsIterator</a> cit_e=cType-&gt;<a class="code" href="classSchema_1_1ComplexType.html#a1a76250fcf51c807803c1fb929fdf628">getContents</a>()-&gt;<a class="code" href="classSchema_1_1ContentModel.html#a5803621eed500493c49a3aa8d40fb0da">end</a>();
<a name="l00077"></a>00077                   <a class="code" href="classSchema_1_1ContentModel.html#aa9cf695e363a4535c0ccc41870aeaada">ContentModel::ContentsIterator</a> ci=cit_b;
<a name="l00078"></a>00078   
<a name="l00079"></a>00079                   <span class="keywordflow">for</span> (ci=cit_b;ci!=cit_e;ci++){
<a name="l00080"></a>00080                     <span class="keywordflow">if</span>(ci-&gt;second==ContentModel::Particle){
<a name="l00081"></a>00081                       out&lt;&lt;ci-&gt;first.e-&gt;getName()&lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt;
<a name="l00082"></a>00082                         ci-&gt;first.e-&gt;getType();
<a name="l00083"></a>00083                     }
<a name="l00084"></a>00084                   }
<a name="l00085"></a>00085                  
<a name="l00086"></a>00086                 }
<a name="l00087"></a>00087             }
<a name="l00088"></a>00088 
<a name="l00089"></a>00089           <span class="keywordflow">else</span>
<a name="l00090"></a>00090             out &lt;&lt; inMessage-&gt;getPartName(j) &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; inMessage-&gt;
<a name="l00091"></a>00091               getPartType(j) &lt;&lt; <a class="code" href="namespaceXmlUtils.html#ae0e3faa27567770a885ba4e4e187844e">XmlUtils::dbsp</a>;
<a name="l00092"></a>00092         }
<a name="l00093"></a>00093       out &lt;&lt; endl;
<a name="l00094"></a>00094       nParams = outMessage-&gt;getNumParts();
<a name="l00095"></a>00095       <span class="keywordflow">for</span> (j = 0; j &lt; nParams; j++)
<a name="l00096"></a>00096         {
<a name="l00097"></a>00097           <span class="keywordflow">if</span> (outMessage-&gt;getPartRefType(j) == <a class="code" href="classWsdlPull_1_1Part.html#afea0ad11001f495a23133c7e8f26584ca2035ecfd4a1ed8bfe691c36c12d21170">Part::Elem</a>)
<a name="l00098"></a>00098             {
<a name="l00099"></a>00099 
<a name="l00100"></a>00100               <span class="keyword">const</span> <a class="code" href="classSchema_1_1Element.html">Element</a> * e =outMessage-&gt;getPartElement(j);
<a name="l00101"></a>00101               out &lt;&lt; e-&gt;<a class="code" href="classSchema_1_1Element.html#a7d60f62e4e0b17c1fb5d6729f813b0f7">getName</a>() &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; e-&gt;<a class="code" href="classSchema_1_1Element.html#a5a3acbc55a5739e80b1f2855b62e94f9">getType</a>() &lt;&lt; <a class="code" href="namespaceXmlUtils.html#ae0e3faa27567770a885ba4e4e187844e">XmlUtils::dbsp</a>;
<a name="l00102"></a>00102             }
<a name="l00103"></a>00103 
<a name="l00104"></a>00104           <span class="keywordflow">else</span>
<a name="l00105"></a>00105             out &lt;&lt; outMessage-&gt;getPartName(j) &lt;&lt; <span class="stringliteral">&quot;:&quot;</span> &lt;&lt; outMessage-&gt;
<a name="l00106"></a>00106               getPartType(j) &lt;&lt; <a class="code" href="namespaceXmlUtils.html#ae0e3faa27567770a885ba4e4e187844e">XmlUtils::dbsp</a>;
<a name="l00107"></a>00107         }
<a name="l00108"></a>00108       out &lt;&lt; <a class="code" href="namespaceXmlUtils.html#a15eef68f86d86bc17f4ea640f948ebd7">XmlUtils::blk</a>;
<a name="l00109"></a>00109       i++;
<a name="l00110"></a>00110     }
<a name="l00111"></a>00111 }
<a name="l00112"></a>00112 }
<a name="l00113"></a>00113 <span class="preprocessor">#endif</span>
</pre></div></div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>