Follow

REST To SOAP Mediation

When mediating REST to SOAP it is necessary to remove the REST Headers

This can be done either by simply replacing the ESBMessage in a pipeling before publishing i.e

ESBMessage orig = context.Data;
context.Data = new ESBMessage();

//explicitly copy over what you need from original here

Or by replacing the headers in code...

if(context.Data.GetProperties("MessageProperty_HttpRequest") != null)
{
 foreach(Neuron.NameValuePair nvp in  context.Data.GetProperties("MessageProperty_HttpRequest"))
 {
  if(nvp != null)
  {
   context.Data.RemoveProperty("MessageProperty_HttpRequest",nvp.Name);
  }
 }
 
}

context.Data.RemoveProperty("MessageProperty","WebBodyFormatMessageProperty");
context.Data.RemoveProperty("MessageHeader","To");
context.Data.RemoveProperty("MessageHeader","LocalPath");

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk