Am 08.06.22 um 22:49 schrieb Nuwan Galkissa Mudalige:

Thank you Felix for pointing out that. Now we are able to send the request successfully with hex encoded data.

Are there a way to make the response value to readable format ? (as the response body is also encoded)

You can do this using a Post-Processor and Groovy (via JSR223PostProcessor). In Groovy you can use the String#decodeHex() method on Strings to get back a byte array and work with that.

For example, the line "vars.putObject("decoded", prev.responseDataAsString.decodeHex())" used inside a Groovy (JSR223) Post Processor will store the decoded result as a byte array inside the variable named "decoded".

Felix

Regards,

Nuwan

*From:* Felix Schumacher <[email protected]>
*Sent:* Wednesday, June 8, 2022 1:15 AM
*To:* [email protected]
*Subject:* Re: Jmeter TCP script issue - Hex-encoded binary string contains an invalid hex digit

The attached text is not hex encoded. Have you encoded it yourself before pasting it into the text field?

Felix

Am 07.06.22 um 22:42 schrieb Nuwan Galkissa Mudalige:

    Hi Dmitri/Team,

    We want to use TCP sampler for testing.

    “Binary or LengthPrefixedBinary” TCPClientImpl work as a TCPClient
    classname. Without text body Jmeter communicate with the server
    and even tested with telnet that is also connected.

    The text which needs to be sent is attached. Since the entire
    content not copied (which are highlighted in black when you open
    it from Notepad++) to “Text to send” box, we manually added those
    missing info to the message body. Then we are getting below 500
    error when run it.

    Response code:500

    Response message:java.lang.IllegalArgumentException: *Hex-encoded
    binary string contains an invalid hex digit in 'SO'*

    Please help us to resolve it.

    (we are using Jmeter 5.4.3)

    Regards,

    Nuwan


------------------------------------------------------------------------

"Virtusa is a worldwide provider of digital business strategy, digital engineering, and information technology (IT) services and solutions, serving Global 2000 companies across multiple industries. We help clients change, disrupt, and unlock new value with unmatched speed."

------------------------------------------------------------------------

This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is intended for the addressee only. Any unauthorized disclosure, use, dissemination, copying, or distribution of this message or any of its attachments or the information contained in this e-mail, or the taking of any action based on it, is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail and delete this message.

------------------------------------------------------------------------

Attachment: OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to