ivelin      2002/07/28 07:06:31

  Modified:    src/webapp/samples/xmlform overview.html sitemap.xmap
  Log:
  added WSDL and REST style Web Service support for the XMLForm demo
  
  Revision  Changes    Path
  1.2       +17 -1     xml-cocoon2/src/webapp/samples/xmlform/overview.html
  
  Index: overview.html
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/xmlform/overview.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- overview.html     17 Jun 2002 09:11:07 -0000      1.1
  +++ overview.html     28 Jul 2002 14:06:31 -0000      1.2
  @@ -6,7 +6,23 @@
   <h1>Demonstration of XMLForm</h1>
   
   <p>
  -Here is the <a href="wizard.html">XMLForm Demonstration</a>
  +Here is the <a href="wizard">XMLForm Demonstration</a>
  +</p>
  +
  +<p>
  +Here is the 
  +<a  href="UsageFeedbackService/WSDL">
  +  WSDL descriptor
  +</a> 
  +for the same application, exposed as a Web Service (REST style).
  +<br/>
  +
  +Click 
  +<a href="UsageFeedbackService?publish=false">here for a valid sample request</a>
  + <br/>
  +
  +Click 
  +<a href="UsageFeedbackService?firstName=bad&publish=false">here for an invalid 
sample request</a>.
   </p>
   
   <p>
  
  
  
  1.7       +42 -1     xml-cocoon2/src/webapp/samples/xmlform/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/xmlform/sitemap.xmap,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sitemap.xmap      4 Jul 2002 20:57:47 -0000       1.6
  +++ sitemap.xmap      28 Jul 2002 14:06:31 -0000      1.7
  @@ -5,6 +5,7 @@
     <map:components> 
       <map:actions>
         <map:action name="WizardAction" 
src="org.apache.cocoon.samples.xmlform.WizardAction"  logger="webapp.xmlform"/>
  +      <map:action name="UsageFeedbackAction" 
src="org.apache.cocoon.samples.xmlform.UsageFeedbackAction"  logger="webapp.xmlform"/>
       </map:actions>
       <map:generators default="file"/>
       <map:transformers default="xslt">
  @@ -43,6 +44,7 @@
   
     <!-- =========================== Pipelines ================================= -->
     <map:pipelines> 
  +  
       <map:pipeline>
   
         <map:match pattern="">
  @@ -54,7 +56,11 @@
          <map:serialize type="html"/>
         </map:match>
   
  -      <!-- A non-trivial example - Feedback Wizard -->
  +    </map:pipeline>
  +  
  +    <map:pipeline>
  +
  +      <!-- A non-trivial interactive example - Cocoon Usage Feedback Wizard -->
         <map:match pattern="wizard*">
           <map:act type="WizardAction">
   
  @@ -74,7 +80,42 @@
           </map:act>
         </map:match>  
       </map:pipeline>
  +    
  +    <map:pipeline>
  +
  +      <!-- The same application, exposed as a Web Service (REST style) -->
  +      
  +      
  +      <!-- WSDL descriptor -->
  +      <map:match pattern="UsageFeedbackService/WSDL">
  +          <map:generate src="webservice/usagefeedback.wsdl"/>
  +          <map:serialize type="xml"/>
  +       </map:match>
  +      
  +      
  +      <!-- The REST resource (or Web Service) itself -->
  +      <map:match pattern="UsageFeedbackService">
  +        <map:act type="UsageFeedbackAction">
  +
  +          <!-- XMLForm parameters for the AbstractXMLFormAction -->
  +          <map:parameter name="xmlform-validator-schema-ns" 
value="http://www.ascc.net/xml/schematron"/>
  +          <map:parameter name="xmlform-validator-schema" 
value="schematron/wizard-xmlform-sch-report.xml"/>
  +          <map:parameter name="xmlform-id" value="form-feedback"/>
  +          <map:parameter name="xmlform-scope" value="request"/>
  +          <map:parameter name="xmlform-model" 
value="org.apache.cocoon.samples.xmlform.UserBean"/>
  +
  +          <!-- Response content and transformation logic -->
  +          <map:generate src="webservice/{page}.xml"/>
  +          <map:transform type="xmlform"  label="debug, xml"/>
  +          <map:serialize type="xml"/>
  +        </map:act>
  +      </map:match>  
  +    </map:pipeline>
  +    
  +    
     </map:pipelines> 
  +  
  +  
   </map:sitemap>
   <!-- end of file -->
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to