1

I have simple RESTRequest node. In response I'm sending JSON from SOAP-UI mockup. JSON looks like this:

{
    "SnapshotVersion": "43f4acca-b11a-4afe-b9bb-30af9864c3a0",
    "TotalExtraPrice": 0,
    "TotalPrice": 0,
    "Příliš žluťoučký Kůň": "úpěl dábelské ódy"
}

If I send only first 3 elements, JSON parser doesn't throw a parser exception, but when is "Příliš žluťoučký Kůň": "úpěl dábelské ódy" element added, parser throws this message:

JSON
        Data
                SnapshotVersion:CHARACTER:43f4acca-b11a-4afe-b9bb-30af9864c3a0
                TotalExtraPrice:INTEGER:0
                TotalPrice:INTEGER:0
        CHARACTER:Unconvertable character
CHARACTER:JSON parsing errors have occurred

I tried this fix, but it doesn't work:

SET OutputRoot.HTTPRequestHeader."Content-Type" = 'application/json; charset=utf-8';

I even tried send in SOAP-UI header Content-Type: application/json; charset=utf-8

My properties and HTTPResquestHeader look like this:

Properties
    MessageSet:CHARACTER:
    MessageType:CHARACTER:
    MessageFormat:CHARACTER:
    Encoding:INTEGER:546
    CodedCharSetId:INTEGER:1208
    Transactional:BOOLEAN:true
    Persistence:BOOLEAN:false
    CreationTime:TIMESTAMP:java.util.GregorianCalendar[time=1551971569190,areFieldsSet=true,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Prague",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=141,lastRule=java.util.SimpleTimeZone[id=Europe/Prague,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=?,YEAR=2019,MONTH=2,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=7,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=1,HOUR=4,HOUR_OF_DAY=16,MINUTE=12,SECOND=49,MILLISECOND=190,ZONE_OFFSET=?,DST_OFFSET=?]
    ExpirationTime:INTEGER:-1
    Priority:INTEGER:0
    ReplyIdentifier:BLOB:[B@3613bded
    ReplyProtocol:CHARACTER:MQ
    Topic:UNKNOWN:null
    ContentType:CHARACTER:application/json; charset=utf-8
    IdentitySourceType:CHARACTER:
    IdentitySourceToken:CHARACTER:
    IdentitySourcePassword:CHARACTER:
    IdentitySourceIssuedBy:CHARACTER:
    IdentityMappedType:CHARACTER:
    IdentityMappedToken:CHARACTER:
    IdentityMappedPassword:CHARACTER:
    IdentityMappedIssuedBy:CHARACTER:
HTTPRequestHeader
    Content-Type:CHARACTER:application/json; charset=utf-8

I think this must be still something with encoding or ccsid.


Edit 1:

IIB version: 10.0.0.13

Full Error message:

ExceptionList
RecoverableException
        File:CHARACTER:F:\build\slot2\S1000_P\src\DataFlowEngine\MessageServices\ImbDataFlowNode.cpp
        Line:INTEGER:1251
        Function:CHARACTER:ImbDataFlowNode::createExceptionList
        Type:CHARACTER:ComIbmMQInputNode
        Name:CHARACTER:API18099_O_CCGetV2#FCMComposite_1_6.vwg/skoda/eai/generic/in/mq/GEN90040_Generic_In_MQ#FCMComposite_1_1
        Label:CHARACTER:API18099_O_CCGetV2.GEN90040_Generic_In_MQ.MQ Input
        Catalog:CHARACTER:BIPmsgs
        Severity:INTEGER:3
        Number:INTEGER:2230
        Text:CHARACTER:Node throwing exception
        Insert
                Type:INTEGER:14
                Text:CHARACTER:API18099_O_CCGetV2.GEN90040_Generic_In_MQ.MQ Input
        RecoverableException
                File:CHARACTER:F:\build\slot2\S1000_P\src\DataFlowEngine\SQLNodeLibrary\ImbComputeNode.cpp
                Line:INTEGER:515
                Function:CHARACTER:ImbComputeNode::evaluate
                Type:CHARACTER:ComIbmComputeNode
                Name:CHARACTER:API18099_O_CCGetV2#FCMComposite_1_5
                Label:CHARACTER:API18099_O_CCGetV2.MapAndRouteBack
                Catalog:CHARACTER:BIPmsgs
                Severity:INTEGER:3
                Number:INTEGER:2230
                Text:CHARACTER:Caught exception and rethrowing
                Insert
                        Type:INTEGER:14
                        Text:CHARACTER:API18099_O_CCGetV2.MapAndRouteBack
                RecoverableException
                        File:CHARACTER:F:\build\slot2\S1000_P\src\DataFlowEngine\ImbRdl\ImbRdlStatementGroup.cpp
                        Line:INTEGER:792
                        Function:CHARACTER:SqlStatementGroup::execute
                        Type:CHARACTER:
                        Name:CHARACTER:
                        Label:CHARACTER:
                        Catalog:CHARACTER:BIPmsgs
                        Severity:INTEGER:3
                        Number:INTEGER:2488
                        Text:CHARACTER:Error detected, rethrowing
                        Insert
                                Type:INTEGER:5
                                Text:CHARACTER:.API18099_O_CCGetV2_MapAndRouteBack.Main
                        Insert
                                Type:INTEGER:5
                                Text:CHARACTER:43.4
                        Insert
                                Type:INTEGER:5
                                Text:CHARACTER:SET refOutBody = InputRoot.JSON.Data;
                        RecoverableException
                                File:CHARACTER:F:\build\slot2\S1000_P\src\CommonServices\ImbConverter.cpp
                                Line:INTEGER:628
                                Function:CHARACTER:ImbConverterCPP::internalToUnicode
                                Type:CHARACTER:
                                Name:CHARACTER:
                                Label:CHARACTER:
                                Catalog:CHARACTER:BIPmsgs
                                Severity:INTEGER:3
                                Number:INTEGER:2135
                                Text:CHARACTER:Unconvertable character
                                Insert
                                        Type:INTEGER:5
                                        Text:CHARACTER:f8
                                Insert
                                        Type:INTEGER:5
                                        Text:CHARACTER:50f8ed6c699a209e6c759df375e86bfd204bf9f2
                                Insert
                                        Type:INTEGER:2
                                        Text:CHARACTER:1208

Error message is thrown after I'm doing some mapping with badly parsed json message.

Pivoman
  • 4,435
  • 5
  • 18
  • 30
  • What is the complete IIB error message? What IIB version are you using? There are fixes for JSON Unicode problems, for example [IT21479](https://www-01.ibm.com/support/docview.wss?uid=swg1IT21479) – Daniel Steinmann Mar 08 '19 at 07:32
  • Hello @DanielSteinmann, thank you for response. See Edit 1. – Pivoman Mar 08 '19 at 09:39
  • As a workaround (I have no idea of the root cause), you could use a BLOB parser, then handle the JSON parsing into a compute node. There you should be able to easily convert the format if needed. I would recommend you to open a PMR, because it shoudln't be an issue.Edit : have you tried to validate your JSON first ? I've never used such characters, so it might not be accepted as a valid JSON ... – jdel Mar 08 '19 at 14:29

1 Answers1

0

Soap-UI was little tricky here.

My mistake was in sending Content-Type in response Header (as it is answered here), but after that Soap-UI response is still in different encoding then UTF-8, even if header is set correctly.

For UTF-8 you have to set parameter JAVA_OPTS=-Dfile.encoding=UTF8

  • in <Soap-UI home>\bin\soapui.bat (for .zip version)
  • or in <Soap-UI home>\bin\SoapUI-5.4.0.vmoptions (for .exe version)
Pivoman
  • 4,435
  • 5
  • 18
  • 30