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

Axis 2 example source code file (SkelHeaderTemplate.xsl)

This example Axis 2 source code file (SkelHeaderTemplate.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 SkelHeaderTemplate.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"/>.h
     *
     * 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- Header file
     */


	#include <axis2_svc_skeleton.h>
	#include <axutil_log_default.h>
	#include <axutil_error_default.h>
	#include <axiom_text.h>
	#include <axiom_node.h>
	#include <axiom_element.h>
    #include <stdio.h>


   <xsl:for-each select="method">
    <xsl:if test="output/param[@ours and @type!='']">
     <xsl:variable name="outputtype">adb_
     #include  "<xsl:value-of select="$outputtype"/>.h"
    </xsl:if>
    <xsl:for-each select="input/param[@type!='' and @ours]">
     <xsl:variable name="inputtype">adb_
     #include "<xsl:value-of select="$inputtype"/>.h"
    </xsl:for-each>
   </xsl:for-each>


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

		 <!-- regardless of the sync or async status, the generated method signature would be just a usual
	           c function-->
        /**
         * auto generated function declaration
         * 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> );
     </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 SkelHeaderTemplate.xsl source code file:

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

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 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.