alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Axis 2 example source code file (SkelSourceTemplate.xsl)

This example Axis 2 source code file (SkelSourceTemplate.xsl) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Axis 2 tags/keywords

The Axis 2 SkelSourceTemplate.xsl source code

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="text"/>
    <xsl:template match="/interface">
    <xsl:variable name="svc_name">
    <xsl:variable name="method-prefix">
    <xsl:variable name="qname">

    /**
     * <xsl:value-of select="@name"/>.c
     *
     * This file was auto-generated from WSDL for "<xsl:value-of select="$qname"/>" service
     * by the Apache Axis2/C version: #axisVersion# #today#
     * <xsl:value-of select="@name"/> Axis2/C skeleton for the axisService
     */

     #include "<xsl:value-of select="@name"/>.h"

     <xsl:for-each select="method">
         <xsl:variable name="outputours">
         <xsl:variable name="count">
         <xsl:variable name="outputtype">
           <xsl:choose>
             <xsl:when test="output/param/@ours">adb__t*
             <xsl:otherwise>
           </xsl:choose>
         </xsl:variable>

		 <!-- regardless of the sync or async status, the generated method signature would be just a usual
	           c function-->
        /**
         * auto generated function definition signature
         * for "<xsl:value-of select="@qname"/>" operation.
         <!--  select only the body parameters  -->
         <xsl:for-each select="input/param[@type!='']">* @param 
         */
        <xsl:choose>
        <xsl:when test="$outputtype=''">axis2_status_t 
        <xsl:when test="$outputtype!=''">
        </xsl:choose>
        <xsl:text> 
        <xsl:value-of select="$method-prefix"/>_ (const axutil_env_t *env  ,
                                              <xsl:variable name="inputtype">
                                                  <xsl:if test="@ours">adb__t*
                                              </xsl:variable>
                                              <xsl:if test="position()>1">, 
                                          </xsl:for-each> )
        {
          /* TODO fill this with the necessary business logic */
          <xsl:if test="$outputtype!=''">return NULL;
          <xsl:if test="$outputtype=''">return AXIS2_SUCCESS;
        }
     </xsl:for-each>

    </xsl:template>
 </xsl:stylesheet>

Other Axis 2 examples (source code examples)

Here is a short list of links related to this Axis 2 SkelSourceTemplate.xsl source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.