You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by di...@apache.org on 2005/03/09 17:10:17 UTC

cvs commit: ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization BasicSerializerFactory.html package-frame.html package-summary.html RSTDeserializer.html RSTDeserializerFactory.html RSTResponseDeserializer.html RSTResponseDeserializerFactory.html RSTResponseSerializer.html RSTResponseSerializerFactory.html RSTSerializer.html RSTSerializerFactory.html SecurityTokenMessageSerializer.html TestSerialization.html

dims        2005/03/09 08:10:17

  Added:       targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization
                        BasicSerializerFactory.html package-frame.html
                        package-summary.html RSTDeserializer.html
                        RSTDeserializerFactory.html
                        RSTResponseDeserializer.html
                        RSTResponseDeserializerFactory.html
                        RSTResponseSerializer.html
                        RSTResponseSerializerFactory.html
                        RSTSerializer.html RSTSerializerFactory.html
                        SecurityTokenMessageSerializer.html
                        TestSerialization.html
  Log:
  Update WSS4J web site.
  
  Revision  Changes    Path
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/BasicSerializerFactory.html
  
  Index: BasicSerializerFactory.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>BasicSerializerFactory xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/BasicSerializerFactory.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> org.apache.axis.Constants;
  <a name="21" href="#21">21</a>  <strong>import</strong> org.apache.axis.encoding.DeserializerFactory;
  <a name="22" href="#22">22</a>  <strong>import</strong> org.apache.axis.encoding.SerializerFactory;
  <a name="23" href="#23">23</a>  
  <a name="24" href="#24">24</a>  <strong>import</strong> javax.xml.rpc.encoding.Deserializer;
  <a name="25" href="#25">25</a>  <strong>import</strong> javax.xml.rpc.encoding.Serializer;
  <a name="26" href="#26">26</a>  <strong>import</strong> java.util.Iterator;
  <a name="27" href="#27">27</a>  <strong>import</strong> java.util.Vector;
  <a name="28" href="#28">28</a>  
  <a name="29" href="#29">29</a>  <em>/**<em>*</em></em>
  <a name="30" href="#30">30</a>  <em> * @author ddelvecc</em>
  <a name="31" href="#31">31</a>  <em> *         &lt;p/></em>
  <a name="32" href="#32">32</a>  <em> *         An abstract base class for creating Axis-SAX serializers.</em>
  <a name="33" href="#33">33</a>  <em> */</em>
  <a name="34" href="#34">34</a>  <strong>public</strong> <strong>abstract</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/BasicSerializerFactory.html">BasicSerializerFactory</a> implements SerializerFactory, DeserializerFactory {
  <a name="35" href="#35">35</a>      <strong>private</strong> Vector mechanisms;
  <a name="36" href="#36">36</a>  
  <a name="37" href="#37">37</a>      <strong>public</strong> Iterator getSupportedMechanismTypes() {
  <a name="38" href="#38">38</a>          <strong>if</strong> (mechanisms == <strong>null</strong>) {
  <a name="39" href="#39">39</a>              mechanisms = <strong>new</strong> Vector();
  <a name="40" href="#40">40</a>              mechanisms.add(Constants.AXIS_SAX);
  <a name="41" href="#41">41</a>          }
  <a name="42" href="#42">42</a>          <strong>return</strong> mechanisms.iterator();
  <a name="43" href="#43">43</a>      }
  <a name="44" href="#44">44</a>  
  <a name="45" href="#45">45</a>      <strong>public</strong> Serializer getSerializerAs(String arg0) {
  <a name="46" href="#46">46</a>          <strong>return</strong> <strong>null</strong>;
  <a name="47" href="#47">47</a>      }
  <a name="48" href="#48">48</a>  
  <a name="49" href="#49">49</a>      <strong>public</strong> Deserializer getDeserializerAs(String arg0) {
  <a name="50" href="#50">50</a>          <strong>return</strong> <strong>null</strong>;
  <a name="51" href="#51">51</a>      }
  <a name="52" href="#52">52</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/package-frame.html
  
  Index: package-frame.html
  ===================================================================
  
  
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
    <html lang="en">
      <head>
        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
        <title>Apache WSS4J 1.0 Reference Package org.apache.ws.security.trust2.serialization</title>
        <link rel="stylesheet" href="../../../../../../stylesheet.css" type="text/css" title="style"></link>
      </head>
      <body>
  
        <h3>
          <a href="package-summary.html" target="classFrame">org.apache.ws.security.trust2.serialization</a>
        </h3>
  
        <h3>Classes</h3>
  
        <ul>
          
            <li>
              <a href="BasicSerializerFactory.html" target="classFrame">BasicSerializerFactory</a>
            </li>
          
            <li>
              <a href="RSTDeserializer.html" target="classFrame">RSTDeserializer</a>
            </li>
          
            <li>
              <a href="RSTDeserializerFactory.html" target="classFrame">RSTDeserializerFactory</a>
            </li>
          
            <li>
              <a href="RSTResponseDeserializer.html" target="classFrame">RSTResponseDeserializer</a>
            </li>
          
            <li>
              <a href="RSTResponseDeserializerFactory.html" target="classFrame">RSTResponseDeserializerFactory</a>
            </li>
          
            <li>
              <a href="RSTResponseSerializer.html" target="classFrame">RSTResponseSerializer</a>
            </li>
          
            <li>
              <a href="RSTResponseSerializerFactory.html" target="classFrame">RSTResponseSerializerFactory</a>
            </li>
          
            <li>
              <a href="RSTSerializer.html" target="classFrame">RSTSerializer</a>
            </li>
          
            <li>
              <a href="RSTSerializerFactory.html" target="classFrame">RSTSerializerFactory</a>
            </li>
          
            <li>
              <a href="SecurityTokenMessageSerializer.html" target="classFrame">SecurityTokenMessageSerializer</a>
            </li>
          
            <li>
              <a href="TestSerialization.html" target="classFrame">TestSerialization</a>
            </li>
          
        </ul>
  
      </body>
    </html>
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/package-summary.html
  
  Index: package-summary.html
  ===================================================================
  
  
    
  
    
      
  
      
  
      
  
    
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
        <html lang="en">
          <head>
            <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></meta>
            <title>Apache WSS4J 1.0 Reference Package </title>
            <link rel="stylesheet" href="../../../../../../stylesheet.css" type="text/css" title="style"></link>
          </head>
          <body>
  
            
        
        
  
        <div class="overview">
          <ul>
            <li>
              <a href="../../../../../../overview-summary.html">Overview</a>
            </li>
            <li class="selected">Package</li>
          </ul>
        </div>
        <div class="framenoframe">
          <ul>
            <li>
              <a href="../../../../../../index.html" target="_top">FRAMES</a>
            </li>
            <li>
              <a href="package-summary.html" target="_top">NO FRAMES</a>
            </li>
          </ul>
        </div>
  
        
  
      
        
        <h2>Package org.apache.ws.security.trust2.serialization</h2>
  
        <table class="summary">
          <thead>
            <tr>
              <th>Class Summary</th>
            </tr>
          </thead>
  
          <tbody>
            
              <tr>
                <td>
                  <a href="BasicSerializerFactory.html" target="classFrame">BasicSerializerFactory</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="RSTDeserializer.html" target="classFrame">RSTDeserializer</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="RSTDeserializerFactory.html" target="classFrame">RSTDeserializerFactory</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="RSTResponseDeserializer.html" target="classFrame">RSTResponseDeserializer</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="RSTResponseDeserializerFactory.html" target="classFrame">RSTResponseDeserializerFactory</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="RSTResponseSerializer.html" target="classFrame">RSTResponseSerializer</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="RSTResponseSerializerFactory.html" target="classFrame">RSTResponseSerializerFactory</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="RSTSerializer.html" target="classFrame">RSTSerializer</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="RSTSerializerFactory.html" target="classFrame">RSTSerializerFactory</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="SecurityTokenMessageSerializer.html" target="classFrame">SecurityTokenMessageSerializer</a>
                </td>
              </tr>
            
              <tr>
                <td>
                  <a href="TestSerialization.html" target="classFrame">TestSerialization</a>
                </td>
              </tr>
            
          </tbody>
        </table>
  
      
        
        
  
        <div class="overview">
          <ul>
            <li>
              <a href="../../../../../../overview-summary.html">Overview</a>
            </li>
            <li class="selected">Package</li>
          </ul>
        </div>
        <div class="framenoframe">
          <ul>
            <li>
              <a href="../../../../../../index.html" target="_top">FRAMES</a>
            </li>
            <li>
              <a href="package-summary.html" target="_top">NO FRAMES</a>
            </li>
          </ul>
        </div>
  
        
  
      
      
  
            <hr></hr>
  
            Copyright &copy;  Apache Web Services. All Rights Reserved.
          </body>
        </html>
      
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/RSTDeserializer.html
  
  Index: RSTDeserializer.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>RSTDeserializer xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/RSTDeserializer.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> org.apache.axis.encoding.DeserializationContext;
  <a name="21" href="#21">21</a>  <strong>import</strong> org.apache.axis.encoding.DeserializerImpl;
  <a name="22" href="#22">22</a>  <strong>import</strong> org.apache.ws.security.trust2.RequestSecurityToken;
  <a name="23" href="#23">23</a>  <strong>import</strong> org.apache.ws.security.trust2.TrustConstants;
  <a name="24" href="#24">24</a>  <strong>import</strong> org.xml.sax.Attributes;
  <a name="25" href="#25">25</a>  <strong>import</strong> org.xml.sax.SAXException;
  <a name="26" href="#26">26</a>  
  <a name="27" href="#27">27</a>  <strong>import</strong> javax.xml.namespace.QName;
  <a name="28" href="#28">28</a>  
  <a name="29" href="#29">29</a>  <em>/**<em>*</em></em>
  <a name="30" href="#30">30</a>  <em> * @author ddelvecc</em>
  <a name="31" href="#31">31</a>  <em> *         &lt;p/></em>
  <a name="32" href="#32">32</a>  <em> *         For deserializing RequestSecurityToken objects/elements.</em>
  <a name="33" href="#33">33</a>  <em> */</em>
  <a name="34" href="#34">34</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTDeserializer.html">RSTDeserializer</a> <strong>extends</strong> DeserializerImpl {
  <a name="35" href="#35">35</a>      <strong>public</strong> <strong>static</strong> <strong>final</strong> QName myTypeQName = TrustConstants.REQUEST_NAME;
  <a name="36" href="#36">36</a>  
  <a name="37" href="#37">37</a>      <strong>private</strong> <a href="../../../../../../org/apache/ws/security/trust2/RequestSecurityToken.html">RequestSecurityToken</a> tokenRequest;
  <a name="38" href="#38">38</a>  
  <a name="39" href="#39">39</a>      <strong>public</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTDeserializer.html">RSTDeserializer</a>() {
  <a name="40" href="#40">40</a>      }
  <a name="41" href="#41">41</a>  
  <a name="42" href="#42">42</a>      <strong>public</strong> <strong>void</strong> onStartElement(String namespace, String localName, String prefix, Attributes attributes, DeserializationContext context)
  <a name="43" href="#43">43</a>              throws SAXException {
  <a name="44" href="#44">44</a>  
  <a name="45" href="#45">45</a>          <strong>try</strong> {
  <a name="46" href="#46">46</a>              tokenRequest = <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/RequestSecurityToken.html">RequestSecurityToken</a>(context.getCurElement().getAsDOM(), context.getEnvelope().getAsDocument());
  <a name="47" href="#47">47</a>              value = tokenRequest;
  <a name="48" href="#48">48</a>          } <strong>catch</strong> (Exception e) {
  <a name="49" href="#49">49</a>              <strong>throw</strong> <strong>new</strong> SAXException(<span class="string">"Exception while processing RequestSecurityToken startElement: "</span> + e.getMessage());
  <a name="50" href="#50">50</a>          }
  <a name="51" href="#51">51</a>      }
  <a name="52" href="#52">52</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/RSTDeserializerFactory.html
  
  Index: RSTDeserializerFactory.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>RSTDeserializerFactory xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/RSTDeserializerFactory.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> javax.xml.rpc.encoding.Deserializer;
  <a name="21" href="#21">21</a>  
  <a name="22" href="#22">22</a>  <em>/**<em>*</em></em>
  <a name="23" href="#23">23</a>  <em> * @author ddelvecc</em>
  <a name="24" href="#24">24</a>  <em> *         &lt;p/></em>
  <a name="25" href="#25">25</a>  <em> *         For creating RSTDeserializers.</em>
  <a name="26" href="#26">26</a>  <em> */</em>
  <a name="27" href="#27">27</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTDeserializerFactory.html">RSTDeserializerFactory</a> <strong>extends</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/BasicSerializerFactory.html">BasicSerializerFactory</a> {
  <a name="28" href="#28">28</a>      <strong>public</strong> Deserializer getDeserializerAs(String arg0) {
  <a name="29" href="#29">29</a>          <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTDeserializer.html">RSTDeserializer</a>();
  <a name="30" href="#30">30</a>      }
  <a name="31" href="#31">31</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/RSTResponseDeserializer.html
  
  Index: RSTResponseDeserializer.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>RSTResponseDeserializer xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/RSTResponseDeserializer.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> org.apache.ws.security.trust2.RequestSecurityTokenResponse;
  <a name="21" href="#21">21</a>  <strong>import</strong> org.apache.ws.security.trust2.TrustConstants;
  <a name="22" href="#22">22</a>  <strong>import</strong> org.apache.axis.encoding.DeserializationContext;
  <a name="23" href="#23">23</a>  <strong>import</strong> org.apache.axis.encoding.DeserializerImpl;
  <a name="24" href="#24">24</a>  <strong>import</strong> org.apache.axis.message.SOAPHandler;
  <a name="25" href="#25">25</a>  <strong>import</strong> org.xml.sax.Attributes;
  <a name="26" href="#26">26</a>  <strong>import</strong> org.xml.sax.SAXException;
  <a name="27" href="#27">27</a>  
  <a name="28" href="#28">28</a>  <strong>import</strong> javax.xml.namespace.QName;
  <a name="29" href="#29">29</a>  
  <a name="30" href="#30">30</a>  <em>/**<em>*</em></em>
  <a name="31" href="#31">31</a>  <em> * @author ddelvecc</em>
  <a name="32" href="#32">32</a>  <em> *         &lt;p/></em>
  <a name="33" href="#33">33</a>  <em> *         For deserializing RequestSecurityTokenResponse objects/elements.</em>
  <a name="34" href="#34">34</a>  <em> */</em>
  <a name="35" href="#35">35</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTResponseDeserializer.html">RSTResponseDeserializer</a> <strong>extends</strong> DeserializerImpl {
  <a name="36" href="#36">36</a>      <strong>public</strong> <strong>static</strong> <strong>final</strong> QName myTypeQName = TrustConstants.RESPONSE_NAME;
  <a name="37" href="#37">37</a>  
  <a name="38" href="#38">38</a>      <strong>private</strong> <a href="../../../../../../org/apache/ws/security/trust2/RequestSecurityTokenResponse.html">RequestSecurityTokenResponse</a> tokenResponse;
  <a name="39" href="#39">39</a>  
  <a name="40" href="#40">40</a>      <strong>public</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTResponseDeserializer.html">RSTResponseDeserializer</a>() {
  <a name="41" href="#41">41</a>      }
  <a name="42" href="#42">42</a>  
  <a name="43" href="#43">43</a>      <strong>public</strong> SOAPHandler onStartChild(String namespace, String localName, String prefix, Attributes attributes, DeserializationContext context)
  <a name="44" href="#44">44</a>              throws SAXException {
  <a name="45" href="#45">45</a>  
  <a name="46" href="#46">46</a>          <strong>try</strong> {
  <a name="47" href="#47">47</a>              tokenResponse = <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/RequestSecurityTokenResponse.html">RequestSecurityTokenResponse</a>(context.getCurElement().getAsDOM(), context.getEnvelope().getAsDocument());
  <a name="48" href="#48">48</a>              value = tokenResponse;
  <a name="49" href="#49">49</a>          } <strong>catch</strong> (Exception e) {
  <a name="50" href="#50">50</a>              <strong>throw</strong> <strong>new</strong> SAXException(<span class="string">"Exception while processing RequestSecurityTokenResponse startElement: "</span> + e.getMessage());
  <a name="51" href="#51">51</a>          }
  <a name="52" href="#52">52</a>  
  <a name="53" href="#53">53</a>          <strong>return</strong> <strong>null</strong>;
  <a name="54" href="#54">54</a>      }
  <a name="55" href="#55">55</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/RSTResponseDeserializerFactory.html
  
  Index: RSTResponseDeserializerFactory.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>RSTResponseDeserializerFactory xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/RSTResponseDeserializerFactory.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> javax.xml.rpc.encoding.Deserializer;
  <a name="21" href="#21">21</a>  
  <a name="22" href="#22">22</a>  <em>/**<em>*</em></em>
  <a name="23" href="#23">23</a>  <em> * @author ddelvecc</em>
  <a name="24" href="#24">24</a>  <em> *         &lt;p/></em>
  <a name="25" href="#25">25</a>  <em> *         For creating RSTResponseDeserializers.</em>
  <a name="26" href="#26">26</a>  <em> */</em>
  <a name="27" href="#27">27</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTResponseDeserializerFactory.html">RSTResponseDeserializerFactory</a> <strong>extends</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/BasicSerializerFactory.html">BasicSerializerFactory</a> {
  <a name="28" href="#28">28</a>      <strong>public</strong> Deserializer getDeserializerAs(String arg0) {
  <a name="29" href="#29">29</a>          <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTResponseDeserializer.html">RSTResponseDeserializer</a>();
  <a name="30" href="#30">30</a>      }
  <a name="31" href="#31">31</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/RSTResponseSerializer.html
  
  Index: RSTResponseSerializer.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>RSTResponseSerializer xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/RSTResponseSerializer.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> org.apache.ws.security.trust2.RequestSecurityTokenResponse;
  <a name="21" href="#21">21</a>  <strong>import</strong> org.apache.axis.encoding.SerializationContext;
  <a name="22" href="#22">22</a>  <strong>import</strong> org.xml.sax.Attributes;
  <a name="23" href="#23">23</a>  
  <a name="24" href="#24">24</a>  <strong>import</strong> javax.xml.namespace.QName;
  <a name="25" href="#25">25</a>  <strong>import</strong> java.io.IOException;
  <a name="26" href="#26">26</a>  
  <a name="27" href="#27">27</a>  <em>/**<em>*</em></em>
  <a name="28" href="#28">28</a>  <em> * @author ddelvecc</em>
  <a name="29" href="#29">29</a>  <em> *         &lt;p/></em>
  <a name="30" href="#30">30</a>  <em> *         For serializing RequestSecurityTokenResponse objects into their XML representation.</em>
  <a name="31" href="#31">31</a>  <em> */</em>
  <a name="32" href="#32">32</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTResponseSerializer.html">RSTResponseSerializer</a> <strong>extends</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/SecurityTokenMessageSerializer.html">SecurityTokenMessageSerializer</a> {
  <a name="33" href="#33">33</a>  
  <a name="34" href="#34">34</a>      <em>/**<em>*</em></em>
  <a name="35" href="#35">35</a>  <em>     * Serialize an element named name, with the indicated attributes</em>
  <a name="36" href="#36">36</a>  <em>     * and value.</em>
  <a name="37" href="#37">37</a>  <em>     *</em>
  <a name="38" href="#38">38</a>  <em>     * @param name       is the element name</em>
  <a name="39" href="#39">39</a>  <em>     * @param attributes are the attributes...serialize is free to add more.</em>
  <a name="40" href="#40">40</a>  <em>     * @param value      is the value</em>
  <a name="41" href="#41">41</a>  <em>     * @param context    is the SerializationContext</em>
  <a name="42" href="#42">42</a>  <em>     */</em>
  <a name="43" href="#43">43</a>      <strong>public</strong> <strong>void</strong> serialize(QName name, Attributes attributes, Object value, SerializationContext context) throws IOException {
  <a name="44" href="#44">44</a>          <strong>if</strong> (!(value instanceof RequestSecurityTokenResponse))
  <a name="45" href="#45">45</a>              <strong>throw</strong> <strong>new</strong> IOException(<span class="string">"Can't serialize a "</span> + value.getClass().getName() + <span class="string">" with a RSTResponseSerializer."</span>);
  <a name="46" href="#46">46</a>  
  <a name="47" href="#47">47</a>          <strong>super</strong>.serialize(name, attributes, value, context);
  <a name="48" href="#48">48</a>      }
  <a name="49" href="#49">49</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/RSTResponseSerializerFactory.html
  
  Index: RSTResponseSerializerFactory.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>RSTResponseSerializerFactory xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/RSTResponseSerializerFactory.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> javax.xml.rpc.encoding.Serializer;
  <a name="21" href="#21">21</a>  
  <a name="22" href="#22">22</a>  <em>/**<em>*</em></em>
  <a name="23" href="#23">23</a>  <em> * @author ddelvecc</em>
  <a name="24" href="#24">24</a>  <em> *         &lt;p/></em>
  <a name="25" href="#25">25</a>  <em> *         For creating RSTResponseSerializers.</em>
  <a name="26" href="#26">26</a>  <em> */</em>
  <a name="27" href="#27">27</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTResponseSerializerFactory.html">RSTResponseSerializerFactory</a> <strong>extends</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/BasicSerializerFactory.html">BasicSerializerFactory</a> {
  <a name="28" href="#28">28</a>  
  <a name="29" href="#29">29</a>      <strong>public</strong> Serializer getSerializerAs(String arg0) {
  <a name="30" href="#30">30</a>          <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTResponseSerializer.html">RSTResponseSerializer</a>();
  <a name="31" href="#31">31</a>      }
  <a name="32" href="#32">32</a>  
  <a name="33" href="#33">33</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/RSTSerializer.html
  
  Index: RSTSerializer.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>RSTSerializer xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/RSTSerializer.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> org.apache.ws.security.trust2.RequestSecurityToken;
  <a name="21" href="#21">21</a>  <strong>import</strong> org.apache.axis.encoding.SerializationContext;
  <a name="22" href="#22">22</a>  <strong>import</strong> org.xml.sax.Attributes;
  <a name="23" href="#23">23</a>  
  <a name="24" href="#24">24</a>  <strong>import</strong> javax.xml.namespace.QName;
  <a name="25" href="#25">25</a>  <strong>import</strong> java.io.IOException;
  <a name="26" href="#26">26</a>  
  <a name="27" href="#27">27</a>  <em>/**<em>*</em></em>
  <a name="28" href="#28">28</a>  <em> * @author ddelvecc</em>
  <a name="29" href="#29">29</a>  <em> *         &lt;p/></em>
  <a name="30" href="#30">30</a>  <em> *         For serializing RequestSecurityToken objects into their XML representation.</em>
  <a name="31" href="#31">31</a>  <em> */</em>
  <a name="32" href="#32">32</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTSerializer.html">RSTSerializer</a> <strong>extends</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/SecurityTokenMessageSerializer.html">SecurityTokenMessageSerializer</a> {
  <a name="33" href="#33">33</a>  
  <a name="34" href="#34">34</a>      <em>/**<em>*</em></em>
  <a name="35" href="#35">35</a>  <em>     * Serialize an element named name, with the indicated attributes</em>
  <a name="36" href="#36">36</a>  <em>     * and value.</em>
  <a name="37" href="#37">37</a>  <em>     *</em>
  <a name="38" href="#38">38</a>  <em>     * @param name       is the element name</em>
  <a name="39" href="#39">39</a>  <em>     * @param attributes are the attributes...serialize is free to add more.</em>
  <a name="40" href="#40">40</a>  <em>     * @param value      is the value</em>
  <a name="41" href="#41">41</a>  <em>     * @param context    is the SerializationContext</em>
  <a name="42" href="#42">42</a>  <em>     */</em>
  <a name="43" href="#43">43</a>      <strong>public</strong> <strong>void</strong> serialize(QName name, Attributes attributes, Object value, SerializationContext context) throws IOException {
  <a name="44" href="#44">44</a>          <strong>if</strong> (!(value instanceof RequestSecurityToken))
  <a name="45" href="#45">45</a>              <strong>throw</strong> <strong>new</strong> IOException(<span class="string">"Can't serialize a "</span> + value.getClass().getName() + <span class="string">" with a RSTSerializer."</span>);
  <a name="46" href="#46">46</a>  
  <a name="47" href="#47">47</a>          <strong>super</strong>.serialize(name, attributes, value, context);
  <a name="48" href="#48">48</a>      }
  <a name="49" href="#49">49</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/RSTSerializerFactory.html
  
  Index: RSTSerializerFactory.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>RSTSerializerFactory xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/RSTSerializerFactory.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> javax.xml.rpc.encoding.Serializer;
  <a name="21" href="#21">21</a>  
  <a name="22" href="#22">22</a>  <em>/**<em>*</em></em>
  <a name="23" href="#23">23</a>  <em> * @author ddelvecc</em>
  <a name="24" href="#24">24</a>  <em> *         &lt;p/></em>
  <a name="25" href="#25">25</a>  <em> *         For creating RSTSerializers.</em>
  <a name="26" href="#26">26</a>  <em> */</em>
  <a name="27" href="#27">27</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTSerializerFactory.html">RSTSerializerFactory</a> <strong>extends</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/BasicSerializerFactory.html">BasicSerializerFactory</a> {
  <a name="28" href="#28">28</a>  
  <a name="29" href="#29">29</a>      <strong>public</strong> Serializer getSerializerAs(String arg0) {
  <a name="30" href="#30">30</a>          <strong>return</strong> <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTSerializer.html">RSTSerializer</a>();
  <a name="31" href="#31">31</a>      }
  <a name="32" href="#32">32</a>  
  <a name="33" href="#33">33</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/SecurityTokenMessageSerializer.html
  
  Index: SecurityTokenMessageSerializer.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>SecurityTokenMessageSerializer xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/SecurityTokenMessageSerializer.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> org.apache.ws.security.trust2.SecurityTokenMessage;
  <a name="21" href="#21">21</a>  <strong>import</strong> org.apache.ws.security.trust2.TrustConstants;
  <a name="22" href="#22">22</a>  <strong>import</strong> org.apache.ws.security.trust2.exception.TrustException;
  <a name="23" href="#23">23</a>  <strong>import</strong> org.apache.axis.Constants;
  <a name="24" href="#24">24</a>  <strong>import</strong> org.apache.axis.encoding.SerializationContext;
  <a name="25" href="#25">25</a>  <strong>import</strong> org.apache.axis.encoding.Serializer;
  <a name="26" href="#26">26</a>  <strong>import</strong> org.apache.axis.wsdl.fromJava.Types;
  <a name="27" href="#27">27</a>  <strong>import</strong> org.w3c.dom.Attr;
  <a name="28" href="#28">28</a>  <strong>import</strong> org.w3c.dom.Element;
  <a name="29" href="#29">29</a>  <strong>import</strong> org.w3c.dom.NodeList;
  <a name="30" href="#30">30</a>  <strong>import</strong> org.xml.sax.Attributes;
  <a name="31" href="#31">31</a>  <strong>import</strong> org.xml.sax.helpers.AttributesImpl;
  <a name="32" href="#32">32</a>  
  <a name="33" href="#33">33</a>  <strong>import</strong> javax.xml.namespace.QName;
  <a name="34" href="#34">34</a>  <strong>import</strong> java.io.IOException;
  <a name="35" href="#35">35</a>  
  <a name="36" href="#36">36</a>  <em>/**<em>*</em></em>
  <a name="37" href="#37">37</a>  <em> * @author ddelvecc</em>
  <a name="38" href="#38">38</a>  <em> *         &lt;p/></em>
  <a name="39" href="#39">39</a>  <em> *         For serializing any SecurityTokenMessage objects into their XML representation.</em>
  <a name="40" href="#40">40</a>  <em> */</em>
  <a name="41" href="#41">41</a>  <strong>public</strong> <strong>abstract</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/SecurityTokenMessageSerializer.html">SecurityTokenMessageSerializer</a> implements Serializer {
  <a name="42" href="#42">42</a>  
  <a name="43" href="#43">43</a>      <em>/**<em>*</em></em>
  <a name="44" href="#44">44</a>  <em>     * Serialize an element named name, with the indicated attributes</em>
  <a name="45" href="#45">45</a>  <em>     * and value.</em>
  <a name="46" href="#46">46</a>  <em>     *</em>
  <a name="47" href="#47">47</a>  <em>     * @param name       is the element name</em>
  <a name="48" href="#48">48</a>  <em>     * @param attributes are the attributes...serialize is free to add more.</em>
  <a name="49" href="#49">49</a>  <em>     * @param value      is the value</em>
  <a name="50" href="#50">50</a>  <em>     * @param context    is the SerializationContext</em>
  <a name="51" href="#51">51</a>  <em>     */</em>
  <a name="52" href="#52">52</a>      <strong>public</strong> <strong>void</strong> serialize(QName name, Attributes attributes, Object value, SerializationContext context) throws IOException {
  <a name="53" href="#53">53</a>          <strong>if</strong> (!(value instanceof SecurityTokenMessage))
  <a name="54" href="#54">54</a>              <strong>throw</strong> <strong>new</strong> IOException(<span class="string">"Can't serialize a "</span> + value.getClass().getName() + <span class="string">" with a SecurityTokenMessageSerializer."</span>);
  <a name="55" href="#55">55</a>  
  <a name="56" href="#56">56</a>          context.setPretty(false);
  <a name="57" href="#57">57</a>  
  <a name="58" href="#58">58</a>          <a href="../../../../../../org/apache/ws/security/trust2/SecurityTokenMessage.html">SecurityTokenMessage</a> tokenRequest = (SecurityTokenMessage) value;
  <a name="59" href="#59">59</a>          <strong>try</strong> {
  <a name="60" href="#60">60</a>  
  <a name="61" href="#61">61</a>              Element element = tokenRequest.getElement();
  <a name="62" href="#62">62</a>              <strong>if</strong> (name.equals(<strong>new</strong> QName(element.getNamespaceURI(), element.getLocalName()))) {
  <a name="63" href="#63">63</a>                  AttributesImpl attrs = <strong>null</strong>;
  <a name="64" href="#64">64</a>                  <strong>if</strong> (attributes != <strong>null</strong>)
  <a name="65" href="#65">65</a>                      attrs = <strong>new</strong> AttributesImpl(attributes);
  <a name="66" href="#66">66</a>                  <strong>else</strong>
  <a name="67" href="#67">67</a>                      attrs = <strong>new</strong> AttributesImpl();
  <a name="68" href="#68">68</a>                  Attr ctxt = element.getAttributeNodeNS(TrustConstants.WST_NS, TrustConstants.CONTEXT_ATTR);
  <a name="69" href="#69">69</a>                  <strong>if</strong> (ctxt != <strong>null</strong>)
  <a name="70" href="#70">70</a>                      attrs.addAttribute(ctxt.getNamespaceURI(), ctxt.getLocalName(), ctxt.getName(), <span class="string">"CDATA"</span>, ctxt.getValue());
  <a name="71" href="#71">71</a>  
  <a name="72" href="#72">72</a>                  context.startElement(name, attrs);
  <a name="73" href="#73">73</a>                  NodeList children = element.getChildNodes();
  <a name="74" href="#74">74</a>                  <strong>if</strong> (children != <strong>null</strong>) {
  <a name="75" href="#75">75</a>                      <strong>for</strong> (<strong>int</strong> i = 0; i &lt; children.getLength(); i++)
  <a name="76" href="#76">76</a>                          context.writeDOMElement((Element) children.item(i));
  <a name="77" href="#77">77</a>                  }
  <a name="78" href="#78">78</a>              } <strong>else</strong> {
  <a name="79" href="#79">79</a>                  context.startElement(name, attributes);
  <a name="80" href="#80">80</a>                  context.writeDOMElement(element);
  <a name="81" href="#81">81</a>              }
  <a name="82" href="#82">82</a>  
  <a name="83" href="#83">83</a>              context.endElement();
  <a name="84" href="#84">84</a>          } <strong>catch</strong> (TrustException e) {
  <a name="85" href="#85">85</a>              <strong>throw</strong> <strong>new</strong> IOException(<span class="string">"TrustException during SecurityTokenMessage serialization: "</span> + e.getMessage());
  <a name="86" href="#86">86</a>          } <strong>catch</strong> (Exception e) {
  <a name="87" href="#87">87</a>              <strong>throw</strong> <strong>new</strong> IOException(<span class="string">"Exception during SecurityTokenMessage serialization: "</span> + e.getMessage());
  <a name="88" href="#88">88</a>          }
  <a name="89" href="#89">89</a>      }
  <a name="90" href="#90">90</a>  
  <a name="91" href="#91">91</a>      <strong>public</strong> Element writeSchema(Class javaType, Types types) throws Exception {
  <a name="92" href="#92">92</a>          <strong>return</strong> <strong>null</strong>;
  <a name="93" href="#93">93</a>      }
  <a name="94" href="#94">94</a>  
  <a name="95" href="#95">95</a>      <strong>public</strong> String getMechanismType() {
  <a name="96" href="#96">96</a>          <strong>return</strong> Constants.AXIS_SAX;
  <a name="97" href="#97">97</a>      }
  <a name="98" href="#98">98</a>  
  <a name="99" href="#99">99</a>  }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>
  
  
  
  
  1.1                  ws-site/targets/ws-fx/wss4j/docs/xref/org/apache/ws/security/trust2/serialization/TestSerialization.html
  
  Index: TestSerialization.html
  ===================================================================
  <!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" xml:lang="en" lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>TestSerialization xref</title>
  <link type="text/css" rel="stylesheet" href="../../../../../../stylesheet.css" />
  </head>
  <body>
  <div id="overview"><a href="../../../../../../../apidocs/org/apache/ws/security/trust2/serialization/TestSerialization.html">View Javadoc</a></div><pre>
  
  <a name="1" href="#1">1</a>   <em class="comment">/*</em>
  <a name="2" href="#2">2</a>   <em class="comment"> * Copyright  2003-2004 The Apache Software Foundation.</em>
  <a name="3" href="#3">3</a>   <em class="comment"> *</em>
  <a name="4" href="#4">4</a>   <em class="comment"> *  Licensed under the Apache License, Version 2.0 (the "License");</em>
  <a name="5" href="#5">5</a>   <em class="comment"> *  you may not use this file except in compliance with the License.</em>
  <a name="6" href="#6">6</a>   <em class="comment"> *  You may obtain a copy of the License at</em>
  <a name="7" href="#7">7</a>   <em class="comment"> *</em>
  <a name="8" href="#8">8</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
  <a name="9" href="#9">9</a>   <em class="comment"> *</em>
  <a name="10" href="#10">10</a>  <em class="comment"> *  Unless required by applicable law or agreed to in writing, software</em>
  <a name="11" href="#11">11</a>  <em class="comment"> *  distributed under the License is distributed on an "AS IS" BASIS,</em>
  <a name="12" href="#12">12</a>  <em class="comment"> *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
  <a name="13" href="#13">13</a>  <em class="comment"> *  See the License for the specific language governing permissions and</em>
  <a name="14" href="#14">14</a>  <em class="comment"> *  limitations under the License.</em>
  <a name="15" href="#15">15</a>  <em class="comment"> *</em>
  <a name="16" href="#16">16</a>  <em class="comment"> */</em>
  <a name="17" href="#17">17</a>  
  <a name="18" href="#18">18</a>  <strong>package</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/package-summary.html">org.apache.ws.security.trust2.serialization</a>;
  <a name="19" href="#19">19</a>  
  <a name="20" href="#20">20</a>  <strong>import</strong> org.apache.ws.security.trust2.RequestSecurityTokenResponse;
  <a name="21" href="#21">21</a>  <strong>import</strong> org.apache.ws.security.trust2.SecurityTokenOrReference;
  <a name="22" href="#22">22</a>  <strong>import</strong> org.apache.ws.security.trust2.TokenTypes;
  <a name="23" href="#23">23</a>  <strong>import</strong> org.apache.ws.security.trust2.TrustConstants;
  <a name="24" href="#24">24</a>  <strong>import</strong> org.apache.axis.Constants;
  <a name="25" href="#25">25</a>  <strong>import</strong> org.apache.axis.MessageContext;
  <a name="26" href="#26">26</a>  <strong>import</strong> org.apache.axis.encoding.DeserializationContext;
  <a name="27" href="#27">27</a>  <strong>import</strong> org.apache.axis.encoding.SerializationContext;
  <a name="28" href="#28">28</a>  <strong>import</strong> org.apache.axis.encoding.TypeMapping;
  <a name="29" href="#29">29</a>  <strong>import</strong> org.apache.axis.encoding.TypeMappingRegistry;
  <a name="30" href="#30">30</a>  <strong>import</strong> org.apache.axis.message.RPCElement;
  <a name="31" href="#31">31</a>  <strong>import</strong> org.apache.axis.message.RPCParam;
  <a name="32" href="#32">32</a>  <strong>import</strong> org.apache.axis.message.SOAPEnvelope;
  <a name="33" href="#33">33</a>  <strong>import</strong> org.apache.axis.server.AxisServer;
  <a name="34" href="#34">34</a>  <strong>import</strong> org.apache.ws.security.message.token.UsernameToken;
  <a name="35" href="#35">35</a>  <strong>import</strong> org.apache.ws.security.WSSConfig;
  <a name="36" href="#36">36</a>  <strong>import</strong> org.w3c.dom.Document;
  <a name="37" href="#37">37</a>  <strong>import</strong> org.xml.sax.InputSource;
  <a name="38" href="#38">38</a>  
  <a name="39" href="#39">39</a>  <strong>import</strong> java.io.FileReader;
  <a name="40" href="#40">40</a>  <strong>import</strong> java.io.Reader;
  <a name="41" href="#41">41</a>  <strong>import</strong> java.io.StringReader;
  <a name="42" href="#42">42</a>  <strong>import</strong> java.io.StringWriter;
  <a name="43" href="#43">43</a>  <strong>import</strong> java.io.Writer;
  <a name="44" href="#44">44</a>  <strong>import</strong> java.net.URI;
  <a name="45" href="#45">45</a>  
  <a name="46" href="#46">46</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/TestSerialization.html">TestSerialization</a> {
  <a name="47" href="#47">47</a>  
  <a name="48" href="#48">48</a>      <strong>public</strong> <strong>static</strong> <strong>void</strong> main(String[] args) throws Exception {
  <a name="49" href="#49">49</a>          MessageContext msgContext = <strong>new</strong> MessageContext(<strong>new</strong> AxisServer());
  <a name="50" href="#50">50</a>          SOAPEnvelope msg = <strong>new</strong> SOAPEnvelope();
  <a name="51" href="#51">51</a>          RPCParam arg1 = <strong>new</strong> RPCParam(<span class="string">"urn:myNamespace"</span>, <span class="string">"testParam"</span>, <span class="string">"this is a string"</span>);
  <a name="52" href="#52">52</a>          <em class="comment">//QName dataQName = new QName("typeNS", "Data");</em>
  <a name="53" href="#53">53</a>  
  <a name="54" href="#54">54</a>          Document doc = msg.getAsDocument();
  <a name="55" href="#55">55</a>  
  <a name="56" href="#56">56</a>          <a href="../../../../../../org/apache/ws/security/message/token/UsernameToken.html">UsernameToken</a> userToken = <strong>new</strong> <a href="../../../../../../org/apache/ws/security/message/token/UsernameToken.html">UsernameToken</a>(WSSConfig.getDefaultWSConfig(),doc);
  <a name="57" href="#57">57</a>          userToken.setName(<span class="string">"bob"</span>);
  <a name="58" href="#58">58</a>          userToken.setPassword(<span class="string">"bobspass"</span>);
  <a name="59" href="#59">59</a>  
  <a name="60" href="#60">60</a>          <a href="../../../../../../org/apache/ws/security/trust2/RequestSecurityTokenResponse.html">RequestSecurityTokenResponse</a> tokenResponse = <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/RequestSecurityTokenResponse.html">RequestSecurityTokenResponse</a>(doc, <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/SecurityTokenOrReference.html">SecurityTokenOrReference</a>(userToken));
  <a name="61" href="#61">61</a>          tokenResponse.setContext(<strong>new</strong> URI(<span class="string">"http://context.context"</span>));
  <a name="62" href="#62">62</a>          tokenResponse.setTokenType(TokenTypes.USERNAME);
  <a name="63" href="#63">63</a>  		
  <a name="64" href="#64">64</a>          <em class="comment">/*</em>
  <a name="65" href="#65">65</a>  <em class="comment">        Data data = new Data();</em>
  <a name="66" href="#66">66</a>  <em class="comment">        Data data2 = new Data();</em>
  <a name="67" href="#67">67</a>  <em class="comment">        data.stringMember = "String member";</em>
  <a name="68" href="#68">68</a>  <em class="comment">        data.floatMember = new Float("1.23");</em>
  <a name="69" href="#69">69</a>  <em class="comment">        data.dataMember = data2;</em>
  <a name="70" href="#70">70</a>  <em class="comment">        </em>
  <a name="71" href="#71">71</a>  <em class="comment">        data2.stringMember = "another str member";</em>
  <a name="72" href="#72">72</a>  <em class="comment">        data2.floatMember = new Float("4.56");</em>
  <a name="73" href="#73">73</a>  <em class="comment">        data2.dataMember = null;  // "data;" for loop-test of multi-refs</em>
  <a name="74" href="#74">74</a>  <em class="comment">*/</em>
  <a name="75" href="#75">75</a>          RPCParam arg2 = <strong>new</strong> RPCParam(<span class="string">""</span>, <span class="string">"struct"</span>, tokenResponse);
  <a name="76" href="#76">76</a>          RPCElement body = <strong>new</strong> RPCElement(<span class="string">"urn:myNamespace"</span>, <span class="string">"method1"</span>, <strong>new</strong> Object[]{arg1, arg2});
  <a name="77" href="#77">77</a>          msg.addBodyElement(body);
  <a name="78" href="#78">78</a>  
  <a name="79" href="#79">79</a>          <strong>try</strong> {
  <a name="80" href="#80">80</a>              Reader reader = <strong>null</strong>;
  <a name="81" href="#81">81</a>  
  <a name="82" href="#82">82</a>              <strong>if</strong> (args.length == 0) {
  <a name="83" href="#83">83</a>                  Writer stringWriter = <strong>new</strong> StringWriter();
  <a name="84" href="#84">84</a>                  SerializationContext context = <strong>new</strong> SerializationContext(stringWriter, msgContext);
  <a name="85" href="#85">85</a>  
  <a name="86" href="#86">86</a>                  TypeMappingRegistry reg = context.getTypeMappingRegistry();
  <a name="87" href="#87">87</a>                  TypeMapping tm = (TypeMapping) reg.getTypeMapping(Constants.URI_SOAP11_ENC);
  <a name="88" href="#88">88</a>                  <strong>if</strong> (tm == <strong>null</strong>) {
  <a name="89" href="#89">89</a>                      tm = (TypeMapping) reg.createTypeMapping();
  <a name="90" href="#90">90</a>                      reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);
  <a name="91" href="#91">91</a>                  }
  <a name="92" href="#92">92</a>                  tm.register(RequestSecurityTokenResponse.<strong>class</strong>, TrustConstants.RESPONSE_NAME, <strong>new</strong> <a href="../../../../../../org/apache/ws/security/trust2/serialization/RSTResponseSerializerFactory.html">RSTResponseSerializerFactory</a>(), <strong>new</strong> RSTResponseDeserializerFactory());
  <a name="93" href="#93">93</a>  
  <a name="94" href="#94">94</a>                  msg.output(context);
  <a name="95" href="#95">95</a>  
  <a name="96" href="#96">96</a>                  String msgString = stringWriter.toString();
  <a name="97" href="#97">97</a>                  System.out.println(<span class="string">"Serialized msg:"</span>);
  <a name="98" href="#98">98</a>                  System.out.println(msgString);
  <a name="99" href="#99">99</a>  
  <a name="100" href="#100">100</a>                 System.out.println(<span class="string">"-------"</span>);
  <a name="101" href="#101">101</a>                 System.out.println(<span class="string">"Testing deserialization..."</span>);
  <a name="102" href="#102">102</a> 
  <a name="103" href="#103">103</a>                 reader = <strong>new</strong> StringReader(msgString);
  <a name="104" href="#104">104</a>             } <strong>else</strong> {
  <a name="105" href="#105">105</a>                 reader = <strong>new</strong> FileReader(args[0]);
  <a name="106" href="#106">106</a>             }
  <a name="107" href="#107">107</a> 
  <a name="108" href="#108">108</a>             DeserializationContext dser = <strong>new</strong> DeserializationContext(<strong>new</strong> InputSource(reader), msgContext, org.apache.axis.Message.REQUEST);
  <a name="109" href="#109">109</a>             dser.parse();
  <a name="110" href="#110">110</a>             SOAPEnvelope env = dser.getEnvelope();
  <a name="111" href="#111">111</a>             <em class="comment">//System.out.println("********\n" + DOM2Writer.nodeToString(env, true) + "\n********");</em>
  <a name="112" href="#112">112</a>             
  <a name="113" href="#113">113</a>             RPCElement rpcElem = (RPCElement) env.getFirstBody();
  <a name="114" href="#114">114</a>             RPCParam struct = rpcElem.getParam(<span class="string">"struct"</span>);
  <a name="115" href="#115">115</a>             <strong>if</strong> (struct == <strong>null</strong>)
  <a name="116" href="#116">116</a>                 <strong>throw</strong> <strong>new</strong> Exception(<span class="string">"No &lt;struct> param"</span>);
  <a name="117" href="#117">117</a> 
  <a name="118" href="#118">118</a>             <strong>if</strong> (!(struct.getObjectValue() instanceof RequestSecurityTokenResponse)) {
  <a name="119" href="#119">119</a>                 System.out.println(<span class="string">"Not a RST object! "</span>);
  <a name="120" href="#120">120</a>                 System.out.println(struct.getValue());
  <a name="121" href="#121">121</a>                 System.exit(1);
  <a name="122" href="#122">122</a>             }
  <a name="123" href="#123">123</a> 
  <a name="124" href="#124">124</a>             <a href="../../../../../../org/apache/ws/security/trust2/RequestSecurityTokenResponse.html">RequestSecurityTokenResponse</a> val = (RequestSecurityTokenResponse) struct.getObjectValue();
  <a name="125" href="#125">125</a>             <strong>if</strong> (val == <strong>null</strong>)
  <a name="126" href="#126">126</a>                 <strong>throw</strong> <strong>new</strong> Exception(<span class="string">"No value for struct param"</span>);
  <a name="127" href="#127">127</a> 
  <a name="128" href="#128">128</a>             System.out.println(val.toString());
  <a name="129" href="#129">129</a>         } <strong>catch</strong> (Exception e) {
  <a name="130" href="#130">130</a>             e.printStackTrace();
  <a name="131" href="#131">131</a>         }
  <a name="132" href="#132">132</a>     }
  <a name="133" href="#133">133</a> }
  </pre>
  <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
  </html>