cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
664
Views
0
Helpful
3
Replies

AXL : Add Multiple Object in a single request

oksiazek
Level 5
Level 5

Hi All ,

Sorry , I'm a complete a newbie with AXL/SOAP request so I'm trying to recover my late by playing with a Sandbox .

Now I'm struggling with this kind of question. How can I configure/add multiple objects in an AXL/SOAP messages .

For example , I'm playing with the add of different partitions. So I have formatted the following message

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">

    <soapenv:Header/>

    <soapenv:Body>

        <ns:addRoutePartition>

        <routePartition>

             <name>PT1</name>

             <description>Partition 1 for Example</description>

        </routePartition>

        </ns:addRoutePartition>

    </soapenv:Body>

</soapenv:Envelope>

And this is working fine .

How should I manipulate this message to send/add multiple partitions at once ?

I have tried this

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">

    <soapenv:Header/>

    <soapenv:Body>

        <ns:addRoutePartition>

        <routePartition>

             <name>PT1</name>

             <description>Partition 1 for Example</description>

        </routePartition>

        <routePartition>

             <name>PT2</name>

             <description>Partition 2 for Example</description>

        </routePartition>

        </ns:addRoutePartition>

    </soapenv:Body>

</soapenv:Envelope>    

But only the first partition is added . So I need to know how I can format this thing so that I can be applied to other Add Request

In advance , thanks for your answer

Olivier

3 Replies 3

oksiazek
Level 5
Level 5

Apparently my quote have not been printed

so for the first message

it is

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">

    <soapenv:Header/>

    <soapenv:Body>

        <ns:addRoutePartition>

        <routePartition>

        <name>PT6</name>

        <description>Partition 6 for Routing</description>

        </routePartition>

        </ns:addRoutePartition>

    </soapenv:Body>

</soapenv:Envelope>

And for the second it should like

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5">

    <soapenv:Header/>

    <soapenv:Body>

        <ns:addRoutePartition>

        <routePartition>

        <name>PT6</name>

        <description>Partition 6 for Routing</description>

        </routePartition>

     <routePartition>

        <name>PT7</name>

        <description>Partition 7 for Routing</description>

        </routePartition>

        </ns:addRoutePartition>

    </soapenv:Body>

</soapenv:Envelope>

ok Can you confirm me that If I want to add 2 PT , I had to do this via a script with a for loops which will provide the structure defined in first example .So that it will add all partitions that I need ?

Thanks

Olivier

In general, you will need to make separate requests for each operation you wish to make.  The operation you are doing here is a good example of that.

Note that if you are willing/able to use <executeSqlUpdate> to create objects using raw SQL, you may be able to insert multiple objects (i.e. database rows) from a single request, using standard SQL INSERT techniques.