This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Not able to edit Binary Content Data using scripting

I have an SCA call in which we are sending a binary content dynamically. For that I am not able to edit the binary Content using scripting.

  • 0  

    The invalid operation exception you face is likely because you need to fill in the Data property with Base64 encoded bytes like  sv.GetOrCreate(x => x.Activities.Activity3_operation.Request.BinaryContent).Data = System.Convert.ToBase64String(myPreparedBytes);

  • 0 in reply to   

    I cannot see anything overriding . Do we have any Global Content-Type in SV tool?

  • 0 in reply to 

    Anyone here to help me?

  • 0   in reply to 

    From the Simulation Report it is apparent that the Content Type is set from Rule number 4 to text/plain. But you say that in fact there is some other value being produced on output? Could you please attach a screenshot from the Message Log with that message recorded in simulation? 

  • 0 in reply to   

    Authorization: Bearer qwertyuiopasdfhdkndlfkvnkgbkrdgjnlkdjfnvlkdsmfnldmfnlsdkmnflksmrnflskejfls,kjfls,dfglksdjfghlskdjfghlskjdhflksjhdfgkefjhslfdgkjshlfdkjhghslkjfghlskdjfghlksjdfhlgksjdhflkgjshldkfjghlskdjfh
    Content-Type: application/json; charset=utf-8

    AgentType: HTTP
    MessageId: 00000000-0000-0000-0000-000000000000
    MessageType: Request
    Method: POST
    OperationDiscriminators: UriPath = **
    ServiceId: 
    ServiceMode: Simulating

    {#JSON#}

  • 0   in reply to 

    But this is request, not response. We simulate responses, also the simulation report shows how is a response constructed. Request we receive on input, so the client who sent it was responsible for setting the content type. Or is this a SCA request?

  • 0   in reply to   

    Sorry I need a screenshot, not just text.

  • 0 in reply to   

    This is SCA Call (notification) that we need to send after 30 secs. For that we need to send it as text/plain or application/vnd.kafka.json.V2+json. But from SCA call option, We are not able to do it. It is automatically changing to Content-Type: application/json; charset=utf-8.

  • 0 in reply to   

  • 0   in reply to 

    OK, but this screenshot shows request of a different SCA than you showed in the Simulation Report. This one is called "SCA **" and the other one is called "SCA Async Success"