Topic
  • 11 replies
  • Latest Post - ‏2011-10-06T14:07:55Z by Liv2luv
versionking
versionking
39 Posts

Pinned topic Soma to export count monitors

‏2011-10-05T00:58:33Z |
what is the class for countmonitors
I tried simply giving the object name. But nothing is exported.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <soapenv:Body>
                <dp:request
                        xmlns:dp="http://www.datapower.com/schemas/management"
                        domain="test">
                        <dp:do-export format="XML" >
                                        <dp:object name="abc-req-Count" 
                                                                ref-objects="true" ref-files="true"/>
                                        <dp:object name="abc-resp-Count" 
                                                                ref-objects="true" ref-files="true"/>                                                    
                        </dp:do-export>
                </dp:request>
        </soapenv:Body>
</soapenv:Envelope>
Updated on 2014-03-25T03:08:53Z at 2014-03-25T03:08:53Z by iron-man
  • Liv2luv
    Liv2luv
    573 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T01:25:09Z  
    Try with

    <dp:object class="CountMonitor" name="all-objects" ref-objects="true" ref-files="true"/>
    


    Thanks.
    Updated on 2014-03-25T03:09:29Z at 2014-03-25T03:09:29Z by iron-man
  • versionking
    versionking
    39 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T01:39:50Z  
    • Liv2luv
    • ‏2011-10-05T01:25:09Z
    Try with

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr"><dp:object class="CountMonitor" name="all-objects" ref-objects="true" ref-files="true"/> </pre>

    Thanks.
    Thanks
    that worked. Is there any document or link which shows all the class names.
  • Liv2luv
    Liv2luv
    573 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T01:47:03Z  
    Thanks
    that worked. Is there any document or link which shows all the class names.
    xml-mgmt-* wsdl and xsd files in store:/// directory may be referred.. Link to infocenter documentation http://publib.boulder.ibm.com/infocenter/wsdatap/v3r8m2/topic/xb60/xmlmgmt_soapinterface_concept.htm?resultof=%22%73%6f%61%70%22%20%22%69%6e%74%65%72%66%61%63%65%22%20%22%69%6e%74%65%72%66%61%63%22%20

    Thanks.
  • HermannSW
    HermannSW
    4655 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T08:17:56Z  
    Hi,

    > Is there any document or link which shows all the class names.
    >
    as Suresh pointed out you can find that information in "store:///xml-mgmt.xsd".

    These are the XPath queries giving what you look for:
    
    # xpath++ 
    "count(//xs:complexType[xs:complexContent/xs:extension[starts-with(@base,'tns:Config') or starts-with(@base,'Config')]])" xml-mgmt.xsd 175 # # xpath++ 
    "(//xs:complexType[xs:complexContent/xs:extension[starts-with(@base,'tns:Config') or starts-with(@base,'Config')]])[1]" xml-mgmt.xsd   ------------------------------------------------------------------------------- <xsd:complexType xmlns:tns=
    "http://www.datapower.com/schemas/management" xmlns:xsd=
    "http://www.w3.org/2001/XMLSchema" name=
    "ConfigAccessControl"> <xsd:complexContent> <xsd:extension base=
    "tns:ConfigConfigBase"/> </xsd:complexContent> </xsd:complexType> # # xpath++ 
    "(//xs:complexType[xs:complexContent/xs:extension[starts-with(@base,'tns:Config') or starts-with(@base,'Config')]])[175]/@name" xml-mgmt.xsd   ------------------------------------------------------------------------------- name=
    "ConfigZosNSSClient" #
    

    Find attached the "block" hierarchy diagram for the classes of a 4.0.1 XI50:
    
    # echo 
    "<x/>" | coproc2 classes.xsl - http:
    //dp3-l3:2223 -s > classes.401.html #
    


     
    Hermann<myXsltBlog/>
  • HermannSW
    HermannSW
    4655 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T08:24:10Z  
    • HermannSW
    • ‏2011-10-05T08:17:56Z
    Hi,

    > Is there any document or link which shows all the class names.
    >
    as Suresh pointed out you can find that information in "store:///xml-mgmt.xsd".

    These are the XPath queries giving what you look for:
    <pre class="jive-pre"> # xpath++ "count(//xs:complexType[xs:complexContent/xs:extension[starts-with(@base,'tns:Config') or starts-with(@base,'Config')]])" xml-mgmt.xsd 175 # # xpath++ "(//xs:complexType[xs:complexContent/xs:extension[starts-with(@base,'tns:Config') or starts-with(@base,'Config')]])[1]" xml-mgmt.xsd ------------------------------------------------------------------------------- <xsd:complexType xmlns:tns= "http://www.datapower.com/schemas/management" xmlns:xsd= "http://www.w3.org/2001/XMLSchema" name= "ConfigAccessControl"> <xsd:complexContent> <xsd:extension base= "tns:ConfigConfigBase"/> </xsd:complexContent> </xsd:complexType> # # xpath++ "(//xs:complexType[xs:complexContent/xs:extension[starts-with(@base,'tns:Config') or starts-with(@base,'Config')]])[175]/@name" xml-mgmt.xsd ------------------------------------------------------------------------------- name= "ConfigZosNSSClient" # </pre>
    Find attached the "block" hierarchy diagram for the classes of a 4.0.1 XI50:
    <pre class="jive-pre"> # echo "<x/>" | coproc2 classes.xsl - http: //dp3-l3:2223 -s > classes.401.html # </pre>

     
    Hermann<myXsltBlog/>
    Stylesheet classes.xsl below (also attached) generated the nice hierarchy diagram by this statement:
    
    echo 
    "<x/>" | coproc2 classes.xsl - http:
    //dp3-l3:2223 -s
    


    See the first comment on the steps classes.html does.
    Especially the block generation is done by a Depth-First-Search traversal of the extrated hierarchy graph.

    
    <!-- * read 
    "store:///xml-mgmt.xsl" * determine 
    
    class hierarchy * generate 
    "block" hierarchy HTML table output. --> <xsl:stylesheet version=
    "1.0" xmlns:xsl=
    "http://www.w3.org/1999/XSL/Transform" xmlns:func=
    "http://exslt.org/functions" xmlns:xsd=
    "http://www.w3.org/2001/XMLSchema" > <xsl:output method=
    "html"/>   <!-- auxiliary recursive function 
    
    for func:countN --> <func:function name=
    "func:countE"> <xsl:param name=
    "edges"/> <xsl:param name=
    "out"/>   <xsl:
    
    if test=
    "count($out)=0"> <func:result select=
    "1"/> </xsl:if>   <func:result select=
    "func:countN($edges,$out[1]/@to) +  func:countE($edges,$out[position()>1])
    "/> </func:function>     <!-- determine count of $node with all his descendents --> <func:function name=
    "func:countN"> <xsl:param name=
    "edges"/> <xsl:param name=
    "node"/>   <func:result select=
    "func:countE($edges,$edges[@from=$node])"/> </func:function>     <!-- recursive output starting at top level node 
    'ConfigBase' --> <xsl:template name=
    "output"> <xsl:param name=
    "edges"/> <xsl:param name=
    "node"  select=
    "'ConfigBase'"/> <xsl:param name=
    "level" select=
    "1"/>     <!-- output node with 
    "the needed" rowspan 
    
    for all descendents --> <tr> <td rowspan=
    "{func:countN($edges,$node)}" bgcolor=
    "#f0f0f0"> <xsl:value-of select=
    "$node"/> </td> </tr>     <!-- recursive output 
    
    for all childs of $node --> <xsl:for-each select=
    "$edges[@from=$node]"> <xsl:call-template name=
    "output"> <xsl:with-param name=
    "edges" select=
    "$edges"/> <xsl:with-param name=
    "node"  select=
    "@to"/> <xsl:with-param name=
    "level" select=
    "$level + 1"/> </xsl:call-template> </xsl:for-each> </xsl:template>     <!-- eliminate [tns:]Config from label --> <func:function name=
    "func:class"> <xsl:param name=
    "node"/>   <func:result select=
    "substring($node,7+4*starts-with($node,'tns:'))"/> </func:function>     <!-- drop text --> <xsl:template match=
    "text()"/>     <!-- determine all edges of hierarchy --> <xsl:template match=
    "//xsd:complexType[xsd:complexContent/xsd:extension [starts-with(@base,
    'tns:Config') or starts-with(@base,
    'Config')]]
    ">   <xsl:variable name=
    "parent" select=
    "func:class(xsd:complexContent/xsd:extension/@base)"/>   <xsl:variable name=
    "node" select=
    "func:class(@name)"/>   <!-- add to result edgeset --> <edge from=
    "{$parent}" to=
    "{$node}"/> </xsl:template>     <xsl:template match=
    "/"> <!-- all edges of 
    
    class hierarchy --> <xsl:variable name=
    "edgeset"> <xsl:apply-templates select=
    "document('store:///xml-mgmt.xsd')/*"/> </xsl:variable>   <!-- generate HTML table with border --> <html> <table border=
    "1"> <xsl:call-template name=
    "output"> <xsl:with-param name=
    "edges" select=
    "$edgeset/edge"/> </xsl:call-template> </table> </html> </xsl:template>   </xsl:stylesheet>
    


     
    Hermann<myXsltBlog/>
  • HermannSW
    HermannSW
    4655 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T11:26:28Z  
    • HermannSW
    • ‏2011-10-05T08:24:10Z
    Stylesheet classes.xsl below (also attached) generated the nice hierarchy diagram by this statement:
    <pre class="jive-pre"> echo "<x/>" | coproc2 classes.xsl - http: //dp3-l3:2223 -s </pre>

    See the first comment on the steps classes.html does.
    Especially the block generation is done by a Depth-First-Search traversal of the extrated hierarchy graph.

    <pre class="jive-pre"> <!-- * read "store:///xml-mgmt.xsl" * determine class hierarchy * generate "block" hierarchy HTML table output. --> <xsl:stylesheet version= "1.0" xmlns:xsl= "http://www.w3.org/1999/XSL/Transform" xmlns:func= "http://exslt.org/functions" xmlns:xsd= "http://www.w3.org/2001/XMLSchema" > <xsl:output method= "html"/> <!-- auxiliary recursive function for func:countN --> <func:function name= "func:countE"> <xsl:param name= "edges"/> <xsl:param name= "out"/> <xsl: if test= "count($out)=0"> <func:result select= "1"/> </xsl:if> <func:result select= "func:countN($edges,$out[1]/@to) + func:countE($edges,$out[position()>1]) "/> </func:function> <!-- determine count of $node with all his descendents --> <func:function name= "func:countN"> <xsl:param name= "edges"/> <xsl:param name= "node"/> <func:result select= "func:countE($edges,$edges[@from=$node])"/> </func:function> <!-- recursive output starting at top level node 'ConfigBase' --> <xsl:template name= "output"> <xsl:param name= "edges"/> <xsl:param name= "node" select= "'ConfigBase'"/> <xsl:param name= "level" select= "1"/> <!-- output node with "the needed" rowspan for all descendents --> <tr> <td rowspan= "{func:countN($edges,$node)}" bgcolor= "#f0f0f0"> <xsl:value-of select= "$node"/> </td> </tr> <!-- recursive output for all childs of $node --> <xsl:for-each select= "$edges[@from=$node]"> <xsl:call-template name= "output"> <xsl:with-param name= "edges" select= "$edges"/> <xsl:with-param name= "node" select= "@to"/> <xsl:with-param name= "level" select= "$level + 1"/> </xsl:call-template> </xsl:for-each> </xsl:template> <!-- eliminate [tns:]Config from label --> <func:function name= "func:class"> <xsl:param name= "node"/> <func:result select= "substring($node,7+4*starts-with($node,'tns:'))"/> </func:function> <!-- drop text --> <xsl:template match= "text()"/> <!-- determine all edges of hierarchy --> <xsl:template match= "//xsd:complexType[xsd:complexContent/xsd:extension [starts-with(@base, 'tns:Config') or starts-with(@base, 'Config')]] "> <xsl:variable name= "parent" select= "func:class(xsd:complexContent/xsd:extension/@base)"/> <xsl:variable name= "node" select= "func:class(@name)"/> <!-- add to result edgeset --> <edge from= "{$parent}" to= "{$node}"/> </xsl:template> <xsl:template match= "/"> <!-- all edges of class hierarchy --> <xsl:variable name= "edgeset"> <xsl:apply-templates select= "document('store:///xml-mgmt.xsd')/*"/> </xsl:variable> <!-- generate HTML table with border --> <html> <table border= "1"> <xsl:call-template name= "output"> <xsl:with-param name= "edges" select= "$edgeset/edge"/> </xsl:call-template> </table> </html> </xsl:template> </xsl:stylesheet> </pre>

     
    Hermann<myXsltBlog/>
    ups -- attachment was missing, here it is.
  • versionking
    versionking
    39 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T14:58:26Z  
    • HermannSW
    • ‏2011-10-05T11:26:28Z
    ups -- attachment was missing, here it is.
    Thanks Livluv and Hermann

    And while deleting the objects, do we need to specify each and every object name? . It returns error when I give ref-objects and ref-files.
    And it doesn't accept all-objects too, got the error as
    no monitor-count all-objects

    <dp:del-config>
    <CountMonitor name="all-objects" ref-objects="true" ref-files="true" />
    </dp:del-config>
    
    Updated on 2014-03-25T03:09:20Z at 2014-03-25T03:09:20Z by iron-man
  • Liv2luv
    Liv2luv
    573 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T15:25:37Z  
    Thanks Livluv and Hermann

    And while deleting the objects, do we need to specify each and every object name? . It returns error when I give ref-objects and ref-files.
    And it doesn't accept all-objects too, got the error as
    no monitor-count all-objects

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr"><dp:del-config> <CountMonitor name="all-objects" ref-objects="true" ref-files="true" /> </dp:del-config> </pre>
    >And while deleting the objects, do we need to specify each and every object name?

    Yes. Therefore you need to mention Message matching and message type objects as well if you wish to delete them.

    <dp:del-config>
        <CountMonitor name="some-name"/>
    <!--
        <MessageMatching name="some-name"/>
        <MessageType name="some-name"/>
    -->
    </dp:del-config>
    


    Thank you.
    Updated on 2014-03-25T03:09:16Z at 2014-03-25T03:09:16Z by iron-man
  • versionking
    versionking
    39 Posts

    Re: Soma to export count monitors

    ‏2011-10-05T20:08:20Z  
    • Liv2luv
    • ‏2011-10-05T15:25:37Z
    >And while deleting the objects, do we need to specify each and every object name?

    Yes. Therefore you need to mention Message matching and message type objects as well if you wish to delete them.

    <pre class="java dw" data-editor-lang="java" data-pbcklang="java" dir="ltr"><dp:del-config> <CountMonitor name="some-name"/> <!-- <MessageMatching name="some-name"/> <MessageType name="some-name"/> --> </dp:del-config> </pre>

    Thank you.
    thanks
    and a quickie

    Will there be any impact on performance if I enable the statistic settings on domain and device level
  • versionking
    versionking
    39 Posts

    Re: Soma to export count monitors

    ‏2011-10-06T13:57:34Z  
    thanks
    and a quickie

    Will there be any impact on performance if I enable the statistic settings on domain and device level
    And can we add the new objects like processing rule and those monitors to the existing policy and service thru soma.

    If yes, Please provide a sample soma
  • Liv2luv
    Liv2luv
    573 Posts

    Re: Soma to export count monitors

    ‏2011-10-06T14:07:55Z  
    And can we add the new objects like processing rule and those monitors to the existing policy and service thru soma.

    If yes, Please provide a sample soma
    > And can we add the new objects like processing rule and those monitors to the existing policy and service thru soma.

    Yes.

    You need to search through the forum and read thru the pointed WSDL and XSD files to be able to do that.

    thank you.