Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!
SOLVED

Error in SOAP API request for select records using xtk:queryDef#ExecuteQuery in SOAP UI tool

Avatar

Level 2

<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

   <SOAP-ENV:Body>

      <SOAP-ENV:Fault>

         <faultcode>SOAP-ENV:MustUnderstand</faultcode>

         <faultstring xsi:type="xsd:string">'MustUnderstand' attribute not supported (service 'ExecuteQuery', method 'xtk:queryDef').</faultstring>

      </SOAP-ENV:Fault>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

I got the error while using SOAP API for selecting records from Adobe Campaign DB. Please help on the same ASAP. Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 2

Hi nithyanandhanm47835011 ,

For the schema attribute under "queryDef", you don't need to have "urn" included there too. This should allow your soap call to work "

schema="nms:recipient">"

So your full Soap Call:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xtk:queryDef">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:ExecuteQuery>

         <urn:sessiontoken>admin/neolane</urn:sessiontoken>

         <urn:entity>

         <queryDef operation="select" schema="nms:recipient">

          <select>

            <node expr="@email"/>

            <node expr="@lastName"/>

            <node expr="@firstName"/>

          </select>

           <where>

            <condition expr="@email = '***********'"/>

         </where>

        </queryDef>

         </urn:entity>

      </urn:ExecuteQuery>

   </soapenv:Body>

</soapenv:Envelope>

Thanks,

Donald

View solution in original post

4 Replies

Avatar

Employee

Can you please post your SOAP request XML as well?

Avatar

Level 2

I tried using SOAP UI. If possible will you please share me a sample program on how to read/write data from adobe campaign. That will be helpful for me. Thanks.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xtk:queryDef">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:ExecuteQuery>

         <urn:sessiontoken>admin/admin</urn:sessiontoken>

         <urn:entity>

            <!--You may enter ANY elements at this point-->

         <queryDef operation="select" schema="urn:nms:recipient">

          <select>

            <node expr="@email"/>

            <node expr="@lastName"/>

            <node expr="@firstName"/>

          </select>

           <where>

            <condition expr="@email = '#########'"/>

         </where>

        </queryDef>

         </urn:entity>

      </urn:ExecuteQuery>

   </soapenv:Body>

</soapenv:Envelope>

Avatar

Correct answer by
Level 2

Hi nithyanandhanm47835011 ,

For the schema attribute under "queryDef", you don't need to have "urn" included there too. This should allow your soap call to work "

schema="nms:recipient">"

So your full Soap Call:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xtk:queryDef">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:ExecuteQuery>

         <urn:sessiontoken>admin/neolane</urn:sessiontoken>

         <urn:entity>

         <queryDef operation="select" schema="nms:recipient">

          <select>

            <node expr="@email"/>

            <node expr="@lastName"/>

            <node expr="@firstName"/>

          </select>

           <where>

            <condition expr="@email = '***********'"/>

         </where>

        </queryDef>

         </urn:entity>

      </urn:ExecuteQuery>

   </soapenv:Body>

</soapenv:Envelope>

Thanks,

Donald

Avatar

Level 1

Hi Donald,

I am getting below mention error. I have replace myuserid and mypassword in Soap call.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xtk:queryDef">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:ExecuteQuery>

         <urn:sessiontoken>myuserid/mypassword</urn:sessiontoken>

         <urn:entity>

         <queryDef operation="select" schema="nms:recipient">

          <select>

            <node expr="@email"/>

            <node expr="@lastName"/>

            <node expr="@firstName"/>

          </select>

           <where>

            <condition expr="@email = 'xyz@gmail.com'"/>

         </where>

        </queryDef>

         </urn:entity>

      </urn:ExecuteQuery>

   </soapenv:Body>

</soapenv:Envelope>

"An error occurred. You don't have the required rights to view the detail.  "