No announcement yet.

Destination after javascript writer

  • Filter
  • Time
  • Show
Clear All
new posts

  • Destination after javascript writer

    Good morning all,
    I have a channel which has a javascript writer as a first destination and it builds a message that I want to sent to the next destination

    the javascript code ends in:

    return new Response(SENT,msg.getMessage());

    But in the next destination I'm not able to get the message, I only get "true". Cheking it in the dashboard, the message is in the first destination response but the raw data in the second destination is "true".

    Could anyone help me out?

    Thank you!

  • #2
    Because you have this...

    return new Response(SENT,msg.getMessage());

    You are returning the result of Response(SENT,msg.getMessage()), which is true.

    You need to return the msg.


    • #3
      Your raw content for all of your destinations is always the output from the source transformer. You should be able to retrieve your response for destination 1 from the responseMap (it should show up in the drag and drop area of your second destination.) It's the full Response that is stored there, so you'll have to so something like $('d1').getMessage().


      • #4
        Question about answer in JSONResponse

        Good morning Narupley, I am writing you for a consultation. I have a channel with a source (Http Listener) to catch some parameters that are sent by url and then they are sent in the Destination (Webservice Sender) and I get an answer back:

        <s: Envelope xmlns: SOAP-ENV = "" xmlns: s = "">
        ****<SOAP-ENV: Header />
        ****<s: Body>
        ********<QryLstResponse xmlns = "">
        ************<QryLstResult xmlns: a = "" xmlns: i = "">
        ****************<a: AXQrResult>
        ********************<a: docID> 134-3 </ a: docID>
        ********************<a: fields>
        ************************<a: AXField>
        ****************************<a: AXFieldID> 0 </ a: AXFieldID>
        ****************************<a: AXFieldName> MEMBER NUMBER </ a: AXFieldName>
        ****************************<a: AXFieldValue> 9211111 </ a: AXFieldValue>
        ************************</ a: AXField>
        ************************<a: AXField>
        ****************************<a: AXFieldID> 0 </ a: AXFieldID>
        ****************************<a: AXFieldName> CHECK </ a: AXFieldName>
        ****************************<a: AXFieldValue> 114 </ a: AXFieldValue>
        ************************</ a: AXField>
        ********************</ a: fields>
        ********************<a: numpages> 2 </ a: numpages>
        ****************</ a: AXQrResult>
        ************</ QryLstResult>
        ********</ QryLstResponse>
        ****</ s: Body>
        </ s: Envelope>

        I need to convert this response to JSON and return it to the URL to the application that invokes the URL.