Forum Discussion

webserviceAutom's avatar
webserviceAutom
Occasional Contributor
11 years ago

SOAP UI 4.5.1 Response Encoding

Hi,

I am having issues with SOAP UI's SOAP response. The response doesn't display special characters as expected.

The database field contains: " M & M Holdings"

SOAP UI response displays that as: "M & M Holdings"

Why is it displaying & as &?

Is there a setting to turn this encoding off?

Please help.

Regards.

4 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Whould you please show the xml snippet from result recieved from sql query step?
  • webserviceAutom's avatar
    webserviceAutom
    Occasional Contributor
    Hi,

    Its a SOAP request test step. I am testing a WCF Service that takes in two parameters, performs a DB2 query and returns details in the response.

    The WCF service returns response as:

    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
    <CheckBatchStatusResponse xmlns="http://xxxxxxxxxxxxxxxxxxxxxxx/V1_0">
    <CheckBatchStatusResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <Code>Y</Code>
    <UserID>ABC001</UserID>
    <Number>5</Number>
    <StatusCode>F</StatusCode>
    <IsFree>N</IsFee>
    <Reference>M050508721</Reference>
    <Name>M &amp; M Holdings</Name>
    <State>N</State>
    </CheckBatchStatusResult>
    </CheckBatchStatusResponse>
    </s:Body>
    </s:Envelope>

    When I checked the NAME field in DB2, it is stored as: M & M Holdings
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    You missed a few steps here. How did the value get from the XML response into the database?

    Did you use a Property Transfer step? JDBC Test Step? Property Expansion?

    With property transfer you can usually control the encoding with "Entitize transferred value(s)" option.

    Thanks,
    Michael Giller
    SmartBear Software
  • webserviceAutom's avatar
    webserviceAutom
    Occasional Contributor
    Hi,

    Sorry about the confusion

    We are not writing to the database. The data is already in the database.

    The WCF service is just reading from the database, it sends this data to another system which performs validations based on the data received.

    I am just making sure that WCF service is pulling correct data from the DB and that's where I see the difference. SOAP response is displaying special chars differently.

    When I saw '&amp;' in the SOAP response, I manually queried the DB to check that field and that's when I noticed the special char '&' is displayed as '&amp;' in the SOAP Response