Topic
  • 19 replies
  • Latest Post - ‏2015-02-19T17:28:38Z by ealdwairi
SystemAdmin
SystemAdmin
6772 Posts

Pinned topic SOMA scripts

‏2010-04-01T02:48:08Z |
Hello everyone ,
I have some questions about SOMA. The place i work they have told me to create the domain,create MQ and create DB2 with SOMA scripts.
and then pass the soap header using perl, and for that i have to write perl script .

Does anyone can help in this ?

Thanks
Pramod
Updated on 2010-04-04T22:11:29Z at 2010-04-04T22:11:29Z by SystemAdmin
  • swlinn
    swlinn
    1395 Posts

    Re: SOMA scripts

    ‏2010-04-01T14:26:09Z  
    There is a redpaper on the XML Management Interface at http://www.redbooks.ibm.com/abstracts/redp4446.html?Open. Chapter 3 is about SOMA. Chapter 3 has a lot of sample SOMA requests and responses, but unfortunately, it doesn't have an example of what you probably need which is a

    <dp:set-config>DataPower object configuration nodes go here </dp:set-config>

    The best way to get examples of what the DataPower object configurations look like is to create an object(s) with the web-gui and export it. In the resulting zip file, extract the export.xml file and have a xml reformatter indent things so the file can be readable. You'll see the xml for a particular object you wish to create in your own SOMA. You can cut/paste that object and wrap in within a SOMA XML with the dp:set-config node to create your desired object.

    There is also a <dp:modify-config>, but use this with caution. It is a very good mechanism to update simple nodes within the object, for example the admin-state, but if you have complex nodes within an object you must update every subnode within in or those subnodes you don't set will be set to a default value.

    Regards,
    Steve
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: SOMA scripts

    ‏2010-04-01T21:14:27Z  
    Hey Steve ,
    I have attached the export.xml . My questions to you how it can xml reformatted and from this how can i check dp:set-config command ...

    Can you please explain with one example, it will be great if you can explain with the xml file i have send you .
  • swlinn
    swlinn
    1395 Posts

    Re: SOMA scripts

    ‏2010-04-02T13:35:12Z  
    Hey Steve ,
    I have attached the export.xml . My questions to you how it can xml reformatted and from this how can i check dp:set-config command ...

    Can you please explain with one example, it will be great if you can explain with the xml file i have send you .
    Attached is a sample soma xml to create a domain based upon your export.xml that you attached previously. You can note the SOAP request and set-config node that wraps the DataPower object, in this case, your Domain object. Any DataPower object or group of objects can be provided. All I did was to take your export.xml, format it for readability, and cut/paste the Domain object into an existing soma file I already had, and reformat of course.

    A few comments:
    If you have objects that need to be created in different domains, those are specified in different files to be sent to the XML Management Interface. You can't have one file that creates a domain (created in the default domain) and then creates other objects as you had indicated you wished to create in your initial post, which should be created in the application domain you just created.

    Given the sample XML I provided has multiple actions (a set-config for the domain and a do-action for the save of the config), you need to use the legacy URI of the XML Management Interface, ie, https://yourappliance:5550/service/mgmt/2004, as the support accessed with the /service/mgmt/current only allows one action per interaction. Depending upon how the XML Management Interface is configured on your appliance, one of these two URIs is the default if a URI isn't provided.

    As for reformatting, every XML tool (XML Spy, Oxygen, Stylus Studio to name a few) can format XML so it is more readable. These tools can be pricy, but you're getting more functionality than just reformatting XML. If reformatting is all you require, some text editors can be purchased that can provide this capability at a nominal price. I personally use Textpad which has a plug-in you can download from the internet called XML-Tidy that can be configured. It does a good job at reformatting XML and will warn you if the XML you're attempting to reformat in mal-formed.

    Regards,
    Steve
  • SystemAdmin
    SystemAdmin
    6772 Posts

    Re: SOMA scripts

    ‏2010-04-04T22:11:29Z  
    Thanks for the help Mr.Steve ...

    Thanks for your suggestions :)
  • DPUser14
    DPUser14
    89 Posts

    Re: SOMA scripts

    ‏2014-09-22T14:53:48Z  
    Thanks for the help Mr.Steve ...

    Thanks for your suggestions :)

    Hi,

    I also able to create a domain. But not able to add the default domain in visible domains using SOMA request. Can someone has this code, plase share. Thanks.

    ~DPUser

  • kenhygh
    kenhygh
    2034 Posts

    Re: SOMA scripts

    ‏2014-09-22T15:04:16Z  
    • DPUser14
    • ‏2014-09-22T14:53:48Z

    Hi,

    I also able to create a domain. But not able to add the default domain in visible domains using SOMA request. Can someone has this code, plase share. Thanks.

    ~DPUser

            <dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="default">
                <dp:set-config>
                    <Domain name="New Domain">
                        <UserSummary>blah blah blah</UserSummary>
                        <NeighborDomain class="Domain">default</NeighborDomain>
                    </Domain>
                </dp:set-config>
            </dp:request>
     
  • DPUser14
    DPUser14
    89 Posts

    Re: SOMA scripts

    ‏2014-09-23T05:54:24Z  
    • kenhygh
    • ‏2014-09-22T15:04:16Z
            <dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="default">
                <dp:set-config>
                    <Domain name="New Domain">
                        <UserSummary>blah blah blah</UserSummary>
                        <NeighborDomain class="Domain">default</NeighborDomain>
                    </Domain>
                </dp:set-config>
            </dp:request>
     

    Hi,

    It worked. Thank you.

    ~DPUser

    Updated on 2014-09-23T09:01:04Z at 2014-09-23T09:01:04Z by DPUser14
  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-17T20:53:01Z  
    • kenhygh
    • ‏2014-09-22T15:04:16Z
            <dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="default">
                <dp:set-config>
                    <Domain name="New Domain">
                        <UserSummary>blah blah blah</UserSummary>
                        <NeighborDomain class="Domain">default</NeighborDomain>
                    </Domain>
                </dp:set-config>
            </dp:request>
     

    Hello;

    I have two questions:

    1- where can I find a list of all soma method (e.g  do-action, set-config, do-export....ect), IBM red book has mentioned only few. I wish I can get my hands on a full list.

     

    2- I am trying to create WSGateWay using set-config method, I was able to create everything else I needed using this metho, e.g LoadBalancerGroups, XML-Manager, user Agent...ect), but it fails with WSGateWay Object only with error ( invalid element), you would think it's some invalid element :). but it's not bc I crossed checked with object xsd and crossed checked with the export file. I even used get-config method to get the same object from another domain, then I got that structure and used it in set-config...still no luck....attached is my WSGateWay object structure, can you please tell me which element is the trouble maker? ( I am giving you the xml of the object which I used to create soma object).

    thank you

    Attachments

  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-17T21:22:28Z  
    • kenhygh
    • ‏2014-09-22T15:04:16Z
            <dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="default">
                <dp:set-config>
                    <Domain name="New Domain">
                        <UserSummary>blah blah blah</UserSummary>
                        <NeighborDomain class="Domain">default</NeighborDomain>
                    </Domain>
                </dp:set-config>
            </dp:request>
     

    Hello kenhygh

    I have two questions:

    1- where can I find a list of all soma method (e.g  do-action, set-config, do-export....ect), IBM red book has mentioned only few. I wish I can get my hands on a full list.

     

    2- I am trying to create WSGateWay using set-config method, I was able to create everything else I needed using this metho, e.g LoadBalancerGroups, XML-Manager, user Agent...ect), but it fails with WSGateWay Object only with error ( invalid element), you would think it's some invalid element :). but it's not bc I crossed checked with object xsd and crossed checked with the export file. I even used get-config method to get the same object from another domain, then I got that structure and used it in set-config...still no luck....attached is my WSGateWay object structure, can you please tell me which element is the trouble maker? ( I am giving you the xml of the object which I used to create soma object).

    thank you

    Attachments

  • kenhygh
    kenhygh
    2034 Posts

    Re: SOMA scripts

    ‏2015-02-18T13:40:21Z  
    • ealdwairi
    • ‏2015-02-17T21:22:28Z

    Hello kenhygh

    I have two questions:

    1- where can I find a list of all soma method (e.g  do-action, set-config, do-export....ect), IBM red book has mentioned only few. I wish I can get my hands on a full list.

     

    2- I am trying to create WSGateWay using set-config method, I was able to create everything else I needed using this metho, e.g LoadBalancerGroups, XML-Manager, user Agent...ect), but it fails with WSGateWay Object only with error ( invalid element), you would think it's some invalid element :). but it's not bc I crossed checked with object xsd and crossed checked with the export file. I even used get-config method to get the same object from another domain, then I got that structure and used it in set-config...still no luck....attached is my WSGateWay object structure, can you please tell me which element is the trouble maker? ( I am giving you the xml of the object which I used to create soma object).

    thank you

    1) store:/// on any device. Scroll down to the bottom of the list, you'll see WSDL and XSDs.

    2) Sorry, I have no easy way to do this. A PMR might be your best approach to getting that kind of answer.

  • HermannSW
    HermannSW
    6065 Posts

    Re: SOMA scripts

    ‏2015-02-18T14:42:55Z  
    • ealdwairi
    • ‏2015-02-17T21:22:28Z

    Hello kenhygh

    I have two questions:

    1- where can I find a list of all soma method (e.g  do-action, set-config, do-export....ect), IBM red book has mentioned only few. I wish I can get my hands on a full list.

     

    2- I am trying to create WSGateWay using set-config method, I was able to create everything else I needed using this metho, e.g LoadBalancerGroups, XML-Manager, user Agent...ect), but it fails with WSGateWay Object only with error ( invalid element), you would think it's some invalid element :). but it's not bc I crossed checked with object xsd and crossed checked with the export file. I even used get-config method to get the same object from another domain, then I got that structure and used it in set-config...still no luck....attached is my WSGateWay object structure, can you please tell me which element is the trouble maker? ( I am giving you the xml of the object which I used to create soma object).

    thank you

    Please see blog postings tagged with "management", especially the 1st one:
    https://www.ibm.com/developerworks/community/blogs/HermannSW/tags/management

    No need to create a PMR by the information from the 1st one hopefully.


    Hermann.

  • UlrikAndersen
    UlrikAndersen
    259 Posts

    Re: SOMA scripts

    ‏2015-02-18T14:43:45Z  
    • ealdwairi
    • ‏2015-02-17T21:22:28Z

    Hello kenhygh

    I have two questions:

    1- where can I find a list of all soma method (e.g  do-action, set-config, do-export....ect), IBM red book has mentioned only few. I wish I can get my hands on a full list.

     

    2- I am trying to create WSGateWay using set-config method, I was able to create everything else I needed using this metho, e.g LoadBalancerGroups, XML-Manager, user Agent...ect), but it fails with WSGateWay Object only with error ( invalid element), you would think it's some invalid element :). but it's not bc I crossed checked with object xsd and crossed checked with the export file. I even used get-config method to get the same object from another domain, then I got that structure and used it in set-config...still no luck....attached is my WSGateWay object structure, can you please tell me which element is the trouble maker? ( I am giving you the xml of the object which I used to create soma object).

    thank you

    Have you tried enabling internal logging (in the default domain) to see if that provides you with better error information?

  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-18T15:30:29Z  
    • kenhygh
    • ‏2015-02-18T13:40:21Z

    1) store:/// on any device. Scroll down to the bottom of the list, you'll see WSDL and XSDs.

    2) Sorry, I have no easy way to do this. A PMR might be your best approach to getting that kind of answer.

    thank you Ken

  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-18T15:33:24Z  

    Have you tried enabling internal logging (in the default domain) to see if that provides you with better error information?

    I did only for the target domain, with no luck. I'll try for default domain...thank you

  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-18T15:34:58Z  
    • HermannSW
    • ‏2015-02-18T14:42:55Z

    Please see blog postings tagged with "management", especially the 1st one:
    https://www.ibm.com/developerworks/community/blogs/HermannSW/tags/management

    No need to create a PMR by the information from the 1st one hopefully.


    Hermann.

    this is very helpful, thank you Hermann.

  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-18T18:27:02Z  
    • kenhygh
    • ‏2015-02-18T13:40:21Z

    1) store:/// on any device. Scroll down to the bottom of the list, you'll see WSDL and XSDs.

    2) Sorry, I have no easy way to do this. A PMR might be your best approach to getting that kind of answer.

    Hi ken,

    I am getting better at it slowly :).

    is there anyway to have soma-response printed out nicely formated at console or xml file?

     

    thank you

  • kenhygh
    kenhygh
    2034 Posts

    Re: SOMA scripts

    ‏2015-02-18T18:28:42Z  
    • ealdwairi
    • ‏2015-02-18T18:27:02Z

    Hi ken,

    I am getting better at it slowly :).

    is there anyway to have soma-response printed out nicely formated at console or xml file?

     

    thank you

    depending on what platform you're running your script on, there are XML pretty-printing routines in almost every language.

  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-18T18:46:27Z  
    • kenhygh
    • ‏2015-02-18T18:28:42Z

    depending on what platform you're running your script on, there are XML pretty-printing routines in almost every language.

    right now I am testing, so I am using my desktop (windows 7...kill me now :) ).

    but later I will be using AIX ( kill me one more time:) ).

    thanks again for your quick response. 

  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-18T22:06:51Z  
    • HermannSW
    • ‏2015-02-18T14:42:55Z

    Please see blog postings tagged with "management", especially the 1st one:
    https://www.ibm.com/developerworks/community/blogs/HermannSW/tags/management

    No need to create a PMR by the information from the 1st one hopefully.


    Hermann.

    Hello Hermann,

    so I got it to work ( set-config to create new object WSGateway). however I have to remove few elements from the xml file ( my xml file was based on get-config output for that same WSGateway from another domain)...

    few of those element are:

    <DebugMode persisted="false">off</DebugMode>

    <DebugHistory>25</DebugHistory>

    which does not make sense bc those are supported in wsdl for WSGateway.

     

    so any idea what I am doing wrong.

     

    attached is both xml.. the one that worked and the one that did not work. I would like the one that did not work to work :)..bc that is my requirement.

     

    the error I get is Internal Error.. nothing in the logs even after enabling debug mode for internal logging..ect

     

  • HermannSW
    HermannSW
    6065 Posts

    Re: SOMA scripts

    ‏2015-02-19T12:02:01Z  
    • ealdwairi
    • ‏2015-02-18T22:06:51Z

    Hello Hermann,

    so I got it to work ( set-config to create new object WSGateway). however I have to remove few elements from the xml file ( my xml file was based on get-config output for that same WSGateway from another domain)...

    few of those element are:

    <DebugMode persisted="false">off</DebugMode>

    <DebugHistory>25</DebugHistory>

    which does not make sense bc those are supported in wsdl for WSGateway.

     

    so any idea what I am doing wrong.

     

    attached is both xml.. the one that worked and the one that did not work. I would like the one that did not work to work :)..bc that is my requirement.

     

    the error I get is Internal Error.. nothing in the logs even after enabling debug mode for internal logging..ect

     

    Please either provide the promised attachments, or just create a PMR because it sounds something is wrong based on what you describe.


    Hermann.

  • ealdwairi
    ealdwairi
    20 Posts

    Re: SOMA scripts

    ‏2015-02-19T17:28:38Z  
    • HermannSW
    • ‏2015-02-19T12:02:01Z

    Please either provide the promised attachments, or just create a PMR because it sounds something is wrong based on what you describe.


    Hermann.

    Hello,

    trying to send the attachments again.