stefano     2003/03/15 14:21:55

  Added:       src/blocks/axis/samples status.xsp sitemap.xmap status.xsl
  Log:
  moving the soap samples into the axis block
  
  Revision  Changes    Path
  1.1                  cocoon-2.1/src/blocks/axis/samples/status.xsp
  
  Index: status.xsp
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <xsp:page
    language="java"
    xmlns:xsp="http://apache.org/xsp";
    xmlns:xsp-request="http://apache.org/xsp/request/2.0";
    xmlns:xscript="http://apache.org/xsp/xscript/1.0";
    xmlns:soap="http://apache.org/xsp/soap/3.0";>
  <page>
    <soap:call method="AdminService" url="rpcrouter">
      <m:list xmlns:m="http://xml.apache.org/axis/wsdd/"/>
    </soap:call>
  </page>
  </xsp:page>
  
  
  
  1.1                  cocoon-2.1/src/blocks/axis/samples/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  <?xml version="1.0"?>
  
  <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
  
  <!-- =========================== Components ================================ -->
  
  <map:components>
  
  <map:generators default="file"/>
  <map:transformers default="xslt"/>
  
  <map:readers default="resource">
  
    <!-- Defines a SOAP RPC reader that will serve SOAP requests via HTTP-POST. -->
    <map:reader logger="sitemap.reader.soap-rpc" name="soap-rpc"
                src="org.apache.cocoon.reading.AxisRPCReader"/>
  
  </map:readers>
  
  <map:serializers default="html"/>
  <map:matchers default="wildcard"/>
  <map:selectors default="browser"/>
  <map:actions/>
  
  
  </map:components>
  
  <!-- =========================== Pipelines ================================= -->
  
  <map:pipelines>
    
    <!-- sub-sitemap soap example pipeline -->
    <map:pipeline>
  
      <!-- Match SOAP RPC Router requests -->
      <map:match pattern="rpcrouter">
        <map:read type="soap-rpc" mime-type="text/xml"/>
      </map:match>
  
      <!-- Send all non qualified requests to the status page -->
      <map:match pattern="">
        <map:redirect-to uri="status.xsp"/>
      </map:match>
  
      <map:match pattern="status.xsp">
        <map:generate type="serverpages" src="status.xsp"/>
        <map:transform src="status.xsl"/>
        <map:serialize type="html"/>
      </map:match>
  
      <!-- Match any other xsp pages we've put in the directory -->
      <map:match pattern="*.xsp">
        <map:generate type="serverpages" src="{1}.xsp"/>
        <map:serialize type="xml"/>
      </map:match>
  
    </map:pipeline>
  </map:pipelines>
  
  </map:sitemap>
  
  <!-- end of file -->
  
  
  
  
  1.1                  cocoon-2.1/src/blocks/axis/samples/status.xsl
  
  Index: status.xsl
  ===================================================================
  <?xml version="1.0" encoding="iso-8859-1"?>
  
  <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
      xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
      xmlns:a="http://xml.apache.org/axis/wsdd/";>
      
      <xsl:template match="/page/soapenv:Envelope/soapenv:Body/a:deployment">
          <html>
              <head>
                  <title>SOAP Server</title>
              </head>
          <body>
              <center><h1>Cocoon SOAP Server Status</h1></center>
  
              <hr/>
  
              <p>Welcome to the Cocoon SOAP server status page</p>
  
              <p>
                  The SOAP server is currently active and the following
                  services are deployed:
              </p>
  
              <p>
                  <ul>
                      <xsl:apply-templates select="a:service"/>
                  </ul>
              </p>
          </body>
        </html>
      </xsl:template>
      
      <xsl:template match="a:service">
          <li>
              <p><b><xsl:value-of select="@name"/></b></p>
  
              <p>
                  Class:
  
                  <xsl:apply-templates select="a:[EMAIL PROTECTED]'className']"/>
  
                  <br/>
  
                  Provider:
  
                  <i><xsl:value-of select="@provider"/></i>
  
                  <br/>
  
                  Methods:
  
                  <xsl:apply-templates select="a:[EMAIL PROTECTED]'allowedMethods']"/>
              </p>
          </li>
      </xsl:template>
  
      <xsl:template match="a:parameter">
          <i><xsl:value-of select="@value"/></i>
      </xsl:template>
  
  </xsl:stylesheet>
  
  
  

Reply via email to