Forum Discussion

ivishalsinghal's avatar
ivishalsinghal
New Contributor
15 years ago

soapUI 3.5.1 automatically decodes UTF-8 encoded characters

Hi,

I am facing an issue with character encoding/decoding in SoapUI . Here is a brief.
I need to do an HTTP Post of a SoapUI request which has a credit card # encrypted as follows-
<credit-debit-card-account-number>CF4/+sT9tl7VNeVyWZBjqVBwOg3D+1v++TM/NcTUba2Zk8KUX/Fcb/6x092g==</credit-debit-card-account-number>

Now i send this request as an UTF-8 encoded but when my server receives this request, the + signs have been replaced with space already due to which my server code for decoding this request further fails. I have even tried replacing + with %2B, but since SoapUI decodes this before sending to server, hence my server receives the %2B as + and so decoding code on server further replaces the + with space. hence my server code fails further in processing the request.

Does someone know the solution.

Thanks,

4 Replies

  • Hi!

    How are you specifying this parameter value in soapUI ? Is it as a REST / HTTP parameter? Can you attach a screenshot?

    regards!

    /Ole
    eviware.com
  • Hi Support team,

    Thanks for acknowledging my issue.

    I am not able to upload zipped screenshot to the reply, getting following error-
    Could not upload attachment to ./files/24277_c9e3d6f91d52777c1bdd8f91d1f2acd4.

    My request is a HTTP post request.. If you can provide me an email id and contact #, I can provide details about this issue.

    My SoapUI configuartion for this request is as follows:
    1) Method is "POST"
    2) Media-type - form-urlencoded
    3)Encoding - UTF-8
    4) My request snippet is pasted below-
    message=<TXN CODE="XmlTxnSaveRetailTxn" TID="740" TYPE="pos">
    <PAYLOAD pojo="com.apple.ist.retail.pos.common.pojo.RetailTxnPOJO" REGISTER_ID="${RegisterID}" STORE_ID="${StoreID}" BUSINESS_DAY="${BusinessDate}" TXN_SEQUENCE_ID="${TxnSequenceNo}" LINE_ITEM_SEQUENCE="" TXN_DESCRIPTION="retail">
    <retail-txn-pOJO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" nae-encrypted="true" email-receipt="true" enable-ipad-subsidy-model="false" print-laser-receipt="false" iphone-complete-failed="false" encr-key-id="7" lava-txn="false" xsi:type="java:com.apple.ist.retail.pos.common.pojo.RetailTxnPOJO">
    <credit-debit-card-line-item debit="false" chargebacks="false">
    <credit-debit-auth-media-issuer-id>MASTERCARD</credit-debit-auth-media-issuer-id>
    <credit-debit-card-account-number>CF4%2BsT9tl7Vg3D%2B1v%2B%2BM/NcTX/Fcb/6x9cawsy/Bgr2f092g==</credit-debit-card-account-number>
    <credit-debit-card-expiration-date>12=2011</credit-debit-card-expiration-date>
    </credit-debit-card-line-item>
    </retail-txn-pOJO>
    </PAYLOAD>
    </TXN>


    6) When I tried sending %2B in my request, than %2B is replaced with + when the request hits my server.

    What I want is that soapUI should not decode this message and send it as such i.e. %2B should be sent as %2B only.
    OR
    Is it possible that I send + sign in my request and soapUI encodes it and the request my server receives has %2B instead?

    How can I turn off this decoding at SoapUI end? Appreciate all the help eviware support team can provide to me and looking forward to a solution for this issue at the earliest.

    Eviware team can contact me at following #'s-
    Cell- 408.409.0034
    Resi. - 408.216.7707

    Thanks,

    Vishal
  • Hi Support team,

    My username ivishalsinghal has been locked due to some issue and I am not able to unlock it or activate it again. Hence I had to create a new user- ivishal.

    Kindly unlock my account so that I can followup on the issue from my original a/c itself.

    Thanks,

    Vishal
  • HI Eviware team

    I am still searching for a solution for this problem. Please let me know the solution ASAP.

    Thanks,

    Vishal