Issues with paging during account aggregation for Web Service connector

I am having an issue with a web service connector I am building for a SOAP XML api, where the paging steps are not working as expected. I followed the examples here Paging Based on Limit-Offset to build the steps below

$limit$ = 100
TERMINATE_IF $RECORDS_COUNT$ < $limit$
$offset$ = $offset$ + $limit$
$request.soap:Envelope.soap:Body.ListUsers.offset.text()[1]$ = $offset$

When I run the aggregation I am only getting the first page, I tried swapping out the TERMINATE_IF part to be TERMINATE_IF $offset$ < 300 and I was able to get it to run multiple times however when looking in the logs the request body was not getting updated with the correct $offset$, here is what the body looks like:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ListUsers xmlns="PassportService">
      <limit>100</limit>
      <offset>0</offset>
      <sortByLastUpdated>false</sortByLastUpdated>
      <emailDomains>
      </emailDomains>
    </ListUsers>
  </soap:Body>
</soap:Envelope>

Is there any reason that a) the terminate wouldn’t work using $RECORDS_COUNT$ and/or b) why the request body is not getting updated properly with the offset?

@nadickey please share complete body of first page, like what is the url and what will be body according we need to set Paging. please remove sensitive information

I lowered the limit to 10 so it would be easier to view the total response body. Confirmed that it still just returning the first page so now it just returns the first 10. Paging now looks like this:

$limit$ = 10
TERMINATE_IF $RECORDS_COUNT$ < $limit$
$offset$ = $offset$ + $limit$
$request.soap:Envelope.soap:Body.ListUsers.offset.text()[1]$ = $offset$

Here is the complete response body I get back from the API with the sensitive data removed.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <ListUsersResponse xmlns="PassportService">
            <ListUsersResult>
                <PublicUser>
                    <Id>3eea4793-cd06-4c0a-ab3d-8bb8cc2b8fc9</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName></MiddleName>
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>29</int>
                        <int>132</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>e1816ebb-e705-477b-af80-5c18e1c8a965</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName />
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>29</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>88bf581e-bc76-40aa-a3a9-3411184bc6c4</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName />
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>8</int>
                        <int>29</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>6ee1ea67-81e0-4f0b-88cc-b2587f0cc576</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName />
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>7</int>
                        <int>29</int>
                        <int>42</int>
                        <int>43</int>
                        <int>69</int>
                        <int>72</int>
                        <int>81</int>
                        <int>87</int>
                        <int>92</int>
                        <int>98</int>
                        <int>101</int>
                        <int>107</int>
                        <int>109</int>
                        <int>125</int>
                        <int>140</int>
                        <int>158</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>4cfe076a-fff2-4e2d-8182-d1df8a6f4677</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName></MiddleName>
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>29</int>
                        <int>42</int>
                        <int>49</int>
                        <int>70</int>
                        <int>76</int>
                        <int>85</int>
                        <int>92</int>
                        <int>101</int>
                        <int>126</int>
                        <int>142</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>d9b11dc9-b1a2-453d-bc51-e5cdb41bf6eb</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName />
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>28</int>
                        <int>67</int>
                        <int>77</int>
                        <int>79</int>
                        <int>84</int>
                        <int>92</int>
                        <int>140</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>2ebd4808-3910-436d-9f64-5d272f630c02</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName></MiddleName>
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>8</int>
                        <int>8</int>
                        <int>32</int>
                        <int>32</int>
                        <int>40</int>
                        <int>40</int>
                        <int>67</int>
                        <int>67</int>
                        <int>71</int>
                        <int>71</int>
                        <int>89</int>
                        <int>89</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>b342b4df-b7ac-4a9d-b8d1-a7922c5b23f5</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName></MiddleName>
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>8</int>
                        <int>33</int>
                        <int>58</int>
                        <int>67</int>
                        <int>140</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>dd664b7d-1741-4b13-ab54-2a4f259fe4bb</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName></MiddleName>
                    <LastName></LastName>
                    <Enabled>false</Enabled>
                    <Roles>
                        <int>28</int>
                        <int>41</int>
                        <int>67</int>
                        <int>70</int>
                        <int>71</int>
                        <int>85</int>
                        <int>92</int>
                    </Roles>
                </PublicUser>
                <PublicUser>
                    <Id>e5416363-6a73-4baa-8848-0a84f48b2305</Id>
                    <Username></Username>
                    <FirstName></FirstName>
                    <MiddleName></MiddleName>
                    <LastName></LastName>
                    <Enabled>true</Enabled>
                    <Roles>
                        <int>29</int>
                        <int>47</int>
                        <int>70</int>
                        <int>77</int>
                        <int>86</int>
                        <int>92</int>
                        <int>125</int>
                    </Roles>
                </PublicUser>
            </ListUsersResult>
        </ListUsersResponse>
    </soap:Body>
</soap:Envelope>

The URL is https://testapps34/PassportService/Integrations/SailPoint.asmx

@nadickey i believe your api is different to send offset value you need to send in json body , so this is something u need to handle in before webservice rule. I do not think with passing on header it will resolve the issue.
send in before operation rule check there and then send it in body