| ## Copyright 2007-2008 Cisco Systems Inc. |
| ## |
| ## Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| ## use this file except in compliance with the License. You may obtain a copy |
| ## of the License at |
| ## |
| ## http://www.apache.org/licenses/LICENSE-2.0 |
| ## |
| ## Unless required by applicable law or agreed to in writing, software |
| ## distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| ## WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| ## License for the specific language governing permissions and limitations |
| ## under the License. |
| <?xml version="1.0" encoding="utf-8" ?> |
| |
| <!-- |
| // This file automatically generated by: |
| // $version |
| // $now |
| // This file is automatically created and should not be edited! |
| --> |
| |
| <module name="$intf.parent().name()"> |
| #if ($intf.parent().descr().size() > 0) |
| <description>$helper.emitXml($intf.parent().descr())</description> |
| #end |
| <service name="$intf.name()"> |
| #if ($intf.parent().descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($intf.descr()))</description> |
| #end |
| ## iterate through externs, grouping them together |
| <consts> |
| #foreach( $n in $intf.iterator() ) |
| #if ($n.isConstant()) |
| <const name="$n.name()" type="$helper.getNativeTypeName( $n.type() )" value="$helper.protectAttr($helper.getTypeValue( $n.type(), $n.value() ))"> |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| </const> |
| |
| #end |
| #end |
| ## --- constants from mixed-in interfaces --- |
| #foreach( $x in $intf.iterator() ) |
| #if( $x.isMixin() ) |
| #set( $m = $x.getModule() ) |
| #set( $z = $m.iterator().next() ) |
| #foreach( $n in $z.constants( true ) ) |
| #if ($n.isConstant()) |
| |
| <const name="$n.name()" type="$helper.getNativeTypeName( $n.type() )" value="$helper.protectAttr($helper.getTypeValue( $n.type(), $n.value() ))"> |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| </const> |
| #end |
| #end |
| #end |
| #end |
| </consts> |
| |
| ## iterate through externs, grouping them together |
| <externs> |
| #foreach( $n in $intf.iterator() ) |
| #if ($n.isExtern()) |
| <extern name="$n.name()" typeId="$helper.id( $n )" typeName="$n.fqname()"> |
| #foreach ( $opt in $n.opts() ) |
| <externmap language="$opt.getLanguage().toString()" name="$opt.getXname().toString()" nImport="$opt.getXnameImport().toString()" serializer="$opt.getSerializer().toString()" sImport="$opt.getSerializerImport().toString()"> |
| </externmap> |
| #end |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| </extern> |
| |
| #end |
| #end |
| ## --- externs from mixed-in interfaces |
| #foreach( $x in $intf.iterator() ) |
| #if( $x.isMixin() ) |
| #set( $m = $x.getModule() ) |
| #set( $z = $m.iterator().next() ) |
| #foreach( $n in $z.externs( true ) ) |
| #if ($n.isExtern()) |
| |
| <extern name="$n.name()" typeId="$helper.id( $n )" typeName="$n.fqname()"> |
| #foreach ( $opt in $n.opts() ) |
| <externmap language="$opt.getLanguage().toString()" name="$opt.getXname().toString()" nImport="$opt.getXnameImport().toString()" serializer="$opt.getSerializer().toString()" sImport="$opt.getSerializerImport().toString()"> |
| </externmap> |
| #end |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| </extern> |
| #end |
| #end |
| #end |
| #end |
| </externs> |
| |
| ## iterate through enums, grouping them together |
| <enums> |
| #foreach( $n in $intf.iterator() ) |
| #if ($n.isEnumx()) |
| <enum name="$n.name()" typeId="$helper.id( $n )" typeName="$n.fqname()"> |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #foreach( $param in $n.iterator() ) |
| <entry value="$param.name()" entryId="$helper.id( $param )" /> |
| #end |
| </enum> |
| |
| #end |
| #end |
| ## --- enums from mixed-in interfaces |
| #foreach( $x in $intf.iterator() ) |
| #if( $x.isMixin() ) |
| #set( $m = $x.getModule() ) |
| #set( $z = $m.iterator().next() ) |
| #foreach( $n in $z.enums( true ) ) |
| #if ($n.isEnumx()) |
| |
| <enum name="$n.name()" typeId="$helper.id( $n )" typeName="$n.fqname()"> |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #foreach( $param in $n.iterator() ) |
| <entry value="$param.name()" entryId="$helper.id( $param )" /> |
| #end |
| </enum> |
| #end |
| #end |
| #end |
| #end |
| </enums> |
| |
| ## iterate through structures, grouping them together |
| <structs> |
| #foreach( $n in $intf.iterator() ) |
| #if ($n.isStruct()) |
| <struct name="$n.name()" typeId="$helper.id( $n )" typeName="$n.fqname()" #if($n.hasExtends())baseType="$n.getExtends().fqname()"#else baseType="null"#end> |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #foreach( $param in $n.iterator() ) |
| <field name="$param.name()" fieldId="$helper.id( $param )" fieldName="$param.fqname()" type="$helper.getTypeName($param.type())" isPrimitiveType="$helper.isBasicType($param.type())" isArray="$param.type().isArray()" #if($param.type().isArray())dimension="$param.type().dim()"#end> |
| #if ($param.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($param.descr()))</description> |
| #end |
| </field> |
| #end |
| </struct> |
| #end |
| #end |
| |
| #foreach( $x in $intf.iterator() ) |
| #if( $x.isMixin() ) |
| #set( $m = $x.getModule() ) |
| #set( $z = $m.iterator().next() ) |
| #foreach( $n in $z.structs( true ) ) |
| #if ($n.isStruct()) |
| |
| <struct name="$n.name()" typeId="$helper.id( $n )" typeName="$n.fqname()" #if($n.hasExtends())baseType="$n.getExtends().fqname()"#else baseType="null"#end> |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #foreach( $param in $n.iterator() ) |
| <field name="$param.name()" fieldId="$helper.id( $param )" fieldName="$param.fqname()" type="$helper.getTypeName($param.type())" isPrimitiveType="$helper.isBasicType($param.type())" isArray="$param.type().isArray()" #if($param.type().isArray())dimension="$param.type().dim()"#end> |
| #if ($param.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($param.descr()))</description> |
| #end |
| </field> |
| #end |
| </struct> |
| #end |
| #end |
| #end |
| #end |
| </structs> |
| |
| ## iterate through exceptions, grouping them together |
| <exceptions> |
| #foreach( $n in $intf.iterator() ) |
| #if ($n.isExcept()) |
| <exception name="$n.name()" isUnchecked="$n.isUnchecked()" typeId="$helper.id( $n )" typeName="$n.fqname()" #if($n.hasExtends())baseType="$n.getExtends().fqname()"#else baseType="null"#end> |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #foreach( $param in $n.iterator() ) |
| <field name="$param.name()" fieldId="$helper.id( $param )" fieldName="$param.fqname()" type="$param.type().type()" isArray="$param.type().isArray()" #if($param.type().isArray())dimension="$param.type().dim()"#end> |
| #if ($param.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($param.descr()))</description> |
| #end |
| </field> |
| #end |
| </exception> |
| #end |
| #end |
| #foreach( $x in $intf.iterator() ) |
| #if( $x.isMixin() ) |
| #set( $m = $x.getModule() ) |
| #set( $z = $m.iterator().next() ) |
| #foreach( $n in $z.exceptions( true ) ) |
| #if ($n.isExcept()) |
| |
| <exception name="$n.name()" isUnchecked="$n.isUnchecked()" typeId="$helper.id( $n )" typeName="$n.fqname()" #if($n.hasExtends())baseType="$n.getExtends().fqname()"#else baseType="null"#end> |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #foreach( $param in $n.iterator() ) |
| <field name="$param.name()" fieldId="$helper.id( $param )" fieldName="$param.fqname()" type="$param.type().type()" isArray="$param.type().isArray()" #if($param.type().isArray())dimension="$param.type().dim()"#end> |
| #if ($param.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($param.descr()))</description> |
| #end |
| </field> |
| #end |
| </exception> |
| #end |
| #end |
| #end |
| #end |
| </exceptions> |
| |
| ## -------------------------------------------------- |
| ## iterate through messages, grouping them together |
| ## -------------------------------------------------- |
| <methods> |
| #foreach( $n in $intf.iterator() ) |
| #if ($n.isMessage()) |
| #if (!$n.isHidden()) |
| #if (!$n.isOneway()) |
| #set( $r = $n.getResultMessage() ) |
| #end |
| <method name="$n.name()" typeId="$helper.id( $n )" typeName="$n.fqname()" asyncReceiverMode="$n.getAsyncReceiver().toString().toLowerCase()" isOneway="$n.isOneway()" messageDirection="$n.getMessageDirection().toString().toLowerCase()" > |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #if ($n.hasThrown()) |
| #foreach( $thrownItem in $n.thrown().iterator() ) |
| <exception name="$thrownItem" type="$thrownItem.getNamed().efqname($helper)"> |
| <description>$helper.protectCData($helper.emitXml($thrownItem.descr()))</description> |
| </exception> |
| #end |
| #end |
| #if ($n.hasAuth()) |
| <authorize methodName="$n.getAuth().method()"> |
| #foreach( $authArg in $n.getAuth().args() ) |
| <argument name="$authArg.value()" /> |
| #end |
| </authorize> |
| #end |
| #foreach( $param in $n.iterator() ) |
| <field name="$param.name()" fieldId="$helper.id( $param )" fieldName="$param.fqname()" type="$helper.getNativeTypeName($param.type())" isPrimitiveType="$helper.isBasicType($param.type())" isArray="$param.type().isArray()" #if($param.type().isArray())dimension="$param.type().dim()"#end> |
| #if ($param.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($param.descr()))</description> |
| #end |
| </field> |
| #end |
| <result #if (!$n.isOneway())fieldId="$helper.id( $n.getResultMessage() )" fieldName="$n.getResultMessage().fqname()"#end type="$helper.getNativeTypeName($n.type())" isPrimitiveType="$helper.isBasicType($n.type())" isArray="$n.type().isArray()" #if($n.type().isArray())dimension="$n.type().dim()"#end> |
| #if ($n.returnDescr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.returnDescr()))</description> |
| #end |
| </result> |
| </method> |
| |
| ## ------------------ |
| ## result message |
| ## ------------------ |
| #if (!$n.isOneway()) |
| <method name="$r.name()" typeId="$helper.id( $r )" typeName="$r.fqname()" asyncReceiverMode="$r.getAsyncReceiver().toString().toLowerCase()" isOneway="true" messageDirection="$r.msgDir().toString().toLowerCase()" timeout="$n.getTimeout()" responseField="result"> |
| #if ($r.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #foreach( $param in $r.iterator() ) |
| <field name="$param.name()" fieldId="$helper.id( $param )" fieldName="$param.fqname()" type="$helper.getNativeTypeName($param.type())" isPrimitiveType="$helper.isBasicType($param.type())" isArray="$param.type().isArray()" #if($param.type().isArray())dimension="$param.type().dim()"#end> |
| #if ($param.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($param.descr()))</description> |
| #end |
| </field> |
| #end |
| </method> |
| #end |
| #end |
| #end |
| #end |
| |
| ## ----------------------- |
| ## add mixin stuff here |
| ## ----------------------- |
| #foreach( $x in $intf.iterator() ) |
| #if( $x.isMixin() ) |
| #set( $m = $x.getModule() ) |
| #set( $z = $m.iterator().next() ) |
| #foreach( $n in $z.messages( true ) ) |
| #if(!$n.isHidden()) |
| #if (!$n.isOneway()) |
| #set( $r = $n.getResultMessage() ) |
| #end |
| <method name="$n.name()" typeId="$helper.id( $n )" typeName="$n.fqname()" asyncReceiverMode="$n.getAsyncReceiver().toString().toLowerCase()" isOneway="$n.isOneway()" messageDirection="$n.getMessageDirection().toString().toLowerCase()" > |
| #if ($n.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #if ($n.hasThrown()) |
| #foreach( $thrownItem in $n.thrown().iterator() ) |
| <exception name="$thrownItem" type="$thrownItem.getNamed().efqname($helper)"> |
| <description>$helper.protectCData($helper.emitXml($thrownItem.descr()))</description> |
| </exception> |
| #end |
| #end |
| #if ($n.hasAuth()) |
| <authorize methodName="$n.getAuth().method()"> |
| #foreach( $authArg in $n.getAuth().args() ) |
| <argument name="$authArg.value()" /> |
| #end |
| </authorize> |
| #end |
| #foreach( $param in $n.iterator() ) |
| <field name="$param.name()" fieldId="$helper.id( $param )" fieldName="$param.fqname()" type="$helper.getNativeTypeName($param.type())" isPrimitiveType="$helper.isBasicType($param.type())" isArray="$param.type().isArray()" #if($param.type().isArray())dimension="$param.type().dim()"#end> |
| #if ($param.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($param.descr()))</description> |
| #end |
| </field> |
| #end |
| <result #if (!$n.isOneway())fieldId="$helper.id( $n.getResultMessage() )" fieldName="$n.getResultMessage().fqname()"#end type="$helper.getNativeTypeName($n.type())" isPrimitiveType="$helper.isBasicType($n.type())" isArray="$n.type().isArray()" #if($n.type().isArray())dimension="$n.type().dim()"#end> |
| #if ($n.returnDescr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.returnDescr()))</description> |
| #end |
| </result> |
| </method> |
| |
| ## -------------------------- |
| ## result mixed-in message |
| ## -------------------------- |
| #if (!$n.isOneway()) |
| <method name="$r.name()" typeId="$helper.id( $r )" typeName="$r.fqname()" asyncReceiverMode="$r.getAsyncReceiver().toString().toLowerCase()" isOneway="true" messageDirection="$r.msgDir().toString().toLowerCase()" timeout="$n.getTimeout()" responseField="result" > |
| #if ($r.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($n.descr()))</description> |
| #end |
| #foreach( $param in $r.iterator() ) |
| <field name="$param.name()" fieldId="$helper.id( $param )" fieldName="$param.fqname()" type="$helper.getNativeTypeName($param.type())" isPrimitiveType="$helper.isBasicType($param.type())" isArray="$param.type().isArray()" #if($param.type().isArray())dimension="$param.type().dim()"#end> |
| #if ($param.descr().size() > 0) |
| <description>$helper.protectCData($helper.emitXml($param.descr()))</description> |
| #end |
| </field> |
| #end |
| </method> |
| #end |
| #end |
| #end |
| #end |
| #end |
| |
| ## ------ end mixin stuff here ------ |
| </methods> |
| ## iterate over raw messages, and define them all here |
| |
| </service> |
| </module> |
| |
| |