passing in the pipe (|) character from data source results in a 400

bryancoxbryancox Posts: 11

Hey Parasoft,

We are doing some testing where from our data source, we have to have the pipe character in it. Here is the request:
GET /voice/v1/accounts/f3c95d8d-36b6-4f79-bd15-10218171b011/billingAccounts/477963001|CAR/priTrunk HTTP/1.0
Host: enterprise.engnew-spectrum.net
Content-Type: application/json
X-DOMAIN-SESSION-IDENTITY: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkNjZkYjEzYi04M2FiLTRmMTMtYWZiNC1mNDUwNWViMjljNzgiLCJhdWQiOiJlbnRlcnByaXNlLmNoYXJ0ZXIuY29tIiwidXNlckRhdGEiOiJ7XCJwb3J0YWxBY2NvdW50R1VJRFwiOlwiMjhhNTkwZmUtNjJmMy00YzRhLTg0OWMtZTI1MWRlOTA0OGM1XCIsXCJwb3J0YWxVc2VyR1VJRFwiOlwiZDY2ZGIxM2ItODNhYi00ZjEzLWFmYjQtZjQ1MDVlYjI5Yzc4XCIsXCJlbnRpdGxlbWVudHNcIjpbXCJFWFRFUk5BTF9WSUVXXCIsXCJJTlRFUk5BTF9WSUVXXCIsXCJJTlRFUk5BTF9FRElUXCIsXCJWT0lDRV9DRFJcIl0sXCJpbnRlcm5hbFVzZXJcIjpcInRydWVcIn0iLCJpc3MiOiJlbnRlcnByaXNlLmNoYXJ0ZXIuY29tIiwiZXhwIjoxNTM4NzYxODQwLCJpYXQiOjE1MzgxNTcwNDAsImp0aSI6ImZhYjA5OTY2LWNiNjgtNDgxZS1hYzI5LWEzZDFjNTg4MzRiMyJ9.zUrTFUXEUuMqaoqBujsAqKkliLr1IqyKHnVOWDDwyg4
Accept: application/json

SOAtest returns a 400 error code:
HTTP/1.1 400
Date: Tue, 02 Oct 2018 16:39:38 GMT
Content-Length: 0
Connection: Close

But when a developer (who is using Postman), gets the desired results, of a 204 error code. Here is the call that the developer is doing using Postman:
curl -X GET \
'https://enterprise.engnew-spectrum.net/voice/v1/accounts/f3c95d8d-36b6-4f79-bd15-10218171b011/billingAccounts/477963001|CAR/priTrunk?=' \
-H 'Content-Type: application/json' \
-H 'Postman-Token: b719ead0-1878-4355-8db5-a57346d0edb7' \
-H 'X-DOMAIN-SESSION-IDENTITY: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkNjZkYjEzYi04M2FiLTRmMTMtYWZiNC1mNDUwNWViMjljNzgiLCJhdWQiOiJlbnRlcnByaXNlLmNoYXJ0ZXIuY29tIiwidXNlckRhdGEiOiJ7XCJwb3J0YWxBY2NvdW50R1VJRFwiOlwiMjhhNTkwZmUtNjJmMy00YzRhLTg0OWMtZTI1MWRlOTA0OGM1XCIsXCJwb3J0YWxVc2VyR1VJRFwiOlwiZDY2ZGIxM2ItODNhYi00ZjEzLWFmYjQtZjQ1MDVlYjI5Yzc4XCIsXCJlbnRpdGxlbWVudHNcIjpbXCJFWFRFUk5BTF9WSUVXXCIsXCJJTlRFUk5BTF9WSUVXXCIsXCJJTlRFUk5BTF9FRElUXCIsXCJWT0lDRV9DRFJcIl0sXCJpbnRlcm5hbFVzZXJcIjpcInRydWVcIn0iLCJpc3MiOiJlbnRlcnByaXNlLmNoYXJ0ZXIuY29tIiwiZXhwIjoxNTM4NzYxODQwLCJpYXQiOjE1MzgxNTcwNDAsImp0aSI6ImZhYjA5OTY2LWNiNjgtNDgxZS1hYzI5LWEzZDFjNTg4MzRiMyJ9.zUrTFUXEUuMqaoqBujsAqKkliLr1IqyKHnVOWDDwyg4' \
-H 'cache-control: no-cache'

It seems that SOAtest is doing something with the pipe character before sending it. Is there anyway to represent the pipe char (|) so that the endpoint sees the pipe as part of the passed in data?

Thanks,

Bryan

Tagged:

Comments

  • benken_parasoftbenken_parasoft Posts: 664 ✭✭✭
    edited October 2018

    SOAtest returns a 400 error code

    To clarify, an HTTP 400 error response is being returned by the application under test. SOAtest is only showing you what your service returned.

    It seems that SOAtest is doing something with the pipe character before sending it

    The REST Client is probably encoding (escaping) the character instead of treating it as a sub-delimiter. Instead of using the REST Client, you can try using the Messaging Client instead to see if that helps. Otherwise, see my other post about a similar issue involving commas: Commas in the parasoft API URL

  • bryancoxbryancox Posts: 11

    Hey Parasoft,

    Thanks for your quick response.

    Bryan

Sign In or Register to comment.