Topic
  • 2 replies
  • Latest Post - ‏2013-01-07T05:47:11Z by SystemAdmin
SystemAdmin
SystemAdmin
224 Posts

Pinned topic Multipart Request

‏2013-01-04T06:16:58Z |
Hi, I am new to Cast Iron and would like to know what approach would be best suited for the below requirement:

I will be receiving an input via the http receive request which would have multiple parts of data with it - xml and normal text, separated by a content boundary.

Which is the best way to handle this? I was thinking of separating the input data based on the content boundary (using a Custom function) and then handling them individually by putting them into different variables.

Is this the best way? or could you suggest a better one?

Thank You!
`Nikhil
Updated on 2013-01-07T05:47:11Z at 2013-01-07T05:47:11Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    224 Posts

    Re: Multipart Request

    ‏2013-01-04T09:03:50Z  
    Hi,
    Since you'll be receiving non structured data, you won't be able to use XSLT. So Javascript custom function would be your choice. I agree with you about using the content boundary.
    I would be interested to know the reason why such data format was chosen. Wouldn't be possible to have another component (in front of Cast Iron) perform the data separation? Doing the data parsing within Cast Iron means doing custom code. Cast Iron is very powerful when using drag and drop, and visual configuration. So you will have to maintain these custom functions and of course this will add maintenance/testing tasks.

    Regards,
    Magali
  • SystemAdmin
    SystemAdmin
    224 Posts

    Re: Multipart Request

    ‏2013-01-07T05:47:11Z  
    Hi,
    Since you'll be receiving non structured data, you won't be able to use XSLT. So Javascript custom function would be your choice. I agree with you about using the content boundary.
    I would be interested to know the reason why such data format was chosen. Wouldn't be possible to have another component (in front of Cast Iron) perform the data separation? Doing the data parsing within Cast Iron means doing custom code. Cast Iron is very powerful when using drag and drop, and visual configuration. So you will have to maintain these custom functions and of course this will add maintenance/testing tasks.

    Regards,
    Magali
    Hello Magali,

    Yes, it would have been great if I could receive the data in the said format. But the requirement is such that we are not supposed to change the source system codes in any way.

    Another question - i have written a simple javascript which should segregate the data(into an array) and return them . But here, i am not receiving the values but only the array-address. Any info on this behavior?

    And Thanks for the earlier response..

    `Nikhil