" /> webservice call with userdata in composer to the native mode iwd WS CP - Genesys CTI User Forum

Author Topic: webservice call with userdata in composer to the native mode iwd WS CP  (Read 1649 times)

Offline bandorka

  • Full Member
  • ***
  • Posts: 120
  • Karma: 1
Advertisement
Hi,

I have the latest iwd, latest composer, eclipse juno with jre8. The webservice block is working well, I'm able to submit  a new interaction to iwd via webservice capture point operating in native mode (composer web service block). The problem is I can't find out how to pass userdata to the webservice. I have tried it in many ways: using custom soap envelope, service endpoint variable, using an array for example as input parameter:
-in the Entry block define: udata_array=[{"key": "udatakey","value": { "ValueString": "this is the subject of interaction" }},{"key": "IWD_ext_resultCode","value": { "ValueString": "0" }}], or define kvitem: '\<key\>Subject\</key\>\<value\>\<ValueString\>this is the subject of interaction\</ValueString\>\</value\>'
But as I traced with wireshark I had never seen the desired result for exampe (fully working with SOAPui and then with iWD):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:int="http://www.genesyslab.com/interaction">
  <soapenv:Header/>
  <soapenv:Body>
      <int:Submit>
        <int:ExternalId>extid000001</int:ExternalId>
        <int:UserData>
            <!--Zero or more repetitions:-->
            <int:kvitem>
              <int:key>udatakey</int:key>
              <int:value>
                  <int:ValueString>dfgdfgdfgdfgfdgdfg</int:ValueString>
              </int:value>
            </int:kvitem>
            <int:kvitem>
              <int:key>IWD_channel</int:key>
              <int:value>
                  <int:ValueString>web</int:ValueString>
              </int:value>
            </int:kvitem>
            <int:kvitem>
              <int:key>IWD_ext_resultCode</int:key>
              <int:value>
                  <int:ValueString>0</int:ValueString>
              </int:value>
            </int:kvitem>
            <int:kvitem>
              <int:key>SOME_URI</int:key>
              <int:value>
                  <int:ValueString>http://google.com</int:ValueString>
              </int:value>
            </int:kvitem>
        </int:UserData>
      </int:Submit>
  </soapenv:Body>
</soapenv:Envelope>

So i need help how to pass one or more userdata to the WS CP to process it in iwd

Thank you,
bandorka

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: webservice call with userdata in composer to the native mode iwd WS CP
« Reply #1 on: August 14, 2017, 02:33:59 PM »
Within WebService property window in Composer, you can define the input parameters - I guess this is exactly what you are looking for

Offline bandorka

  • Full Member
  • ***
  • Posts: 120
  • Karma: 1
Re: webservice call with userdata in composer to the native mode iwd WS CP
« Reply #2 on: August 14, 2017, 03:18:26 PM »
yes I know, but I'm not able to "force" composer to produce the proper output in the soap request. For example if I need two userdata I will except the following output (between UserData items):

<int:kvitem>
<int:key>udatakey</int:key>
<int:value>
<int:ValueString>dfgdfgdfgdfgfdgdfg</int:ValueString>
</int:value>
</int:kvitem>

<int:kvitem>
<int:key>IWD_channel</int:key>
<int:value>
<int:ValueString>web</int:ValueString>
</int:value>
</int:kvitem>

But if I use some array in the parameter list, as composer expects, this produce the following output for example:
<kvitem>
["element1","element2","element3","element4"]
</kvitem>

br,
bandorka