Neuron ESB User Network

The Service Bus for the Connected Business

CM

A Couple of Pipeline Tips and Tricks

I thought I'd share a couple of tips

First Tip : REST drop off point

You can set up a Pipeline that allows the client to POST a message and get a 200 response very easily with Neuron.

1)Create a Pipeline and adding whatever logic you wish to process the POST. Many times this may simply be a Publish step.

2)Next add a Code step that sets context.Data to a new ESBMessage and then uses the FromString method with "" as an argument. You don't have to use an empty string of course you can put anything you want in there to signal "Message received!".

3)Finally add a Cancel step to make sure the last statement is immediately returned to the caller and you're done with the pipeline.

4)Connect the pipeline the Client Connector Party's On Client Publish


Second Tip : Create a Custom SOAP Header in a Pipeline

Use the following code as a template in a Code step to create a custom header. If you want it to flow out the Service Connector make sure to check the Restore custom headers check box on the Service Connector tab. Replace values in {} with your own.

Neuron.NameValuePair nvp = new Neuron.NameValuePair();
nvp.Name = "{Namespace for header}/{Root element name of header xml}";
System.Collections.Generic.List lst = new System.Collections.Generic.List();
string header = "{full xml value of header as a string with a root element name and namespace that matches above arguments }";
nvp.Value = header
lst.Add(nvp);
context.Data.SetProperties("soap_headers",lst); // you can also optionally create a new message, assign that to context data and then assign the headers to ensure no conflicts etc..

Of course since you know how to write one you now know what prefix to use with GetProperty or GetProperties for reading an incoming SOAP header captured by cheking Capture custom headers on the Client Connector tab.

Views: 35

Comment

You need to be a member of Neuron ESB User Network to add comments!

Join Neuron ESB User Network

Neuron ESB Product Support Forums and Communities

Latest Activity

Profile Icon

Sending messages to a Client Connector from an C# Console App

I have an issue with sending messages to a Client Connector from a C# test app. The main issue is that  i never receive a response from Neuron and the Connection Times out. I'm using the sample code from the Scatter-Gather Pattern sample included in the documentation If anybody has any hints on what i'm missing, it would be appreciated.static class Utility {const string _propName = "NeuronServiceList";const string _ns = "urn:xmlns:neuronesb-com:soapheaders";const string _msg = @"…See More
Discussion posted by John Ryan Friday
Profile Icon
ThumbnailThumbnail
AMS and John Ryan joined Neuron ESB User Network Friday
Profile Icon

Scalability MSMQ & Deployment Groups

I have been trying to work out how to configure MSMQ for high availaibility. I think that I need to use Zones, & Deployment Groups to configure the server deployment.  But I am unsure how  I would go about this and what the perfromance impacts are. So let me give you the scenario that I am looking at and you can then point me in teh direction of resources that I need to be able to resolve it. I have 3 High throughput topics that need reliable messaging Service1Service2Service3 Each of these…See More
Discussion posted by Alixx Skevington Feb 7
Profile Icon
Alixx Skevington is now a member of Neuron ESB User Network Feb 6
Profile Icon
Umesh Kumar Maurya is now a member of Neuron ESB User Network Jan 24
Profile Icon
David Gnabasik is now a member of Neuron ESB User Network Dec 16, 2011
Profile Icon

Explanation of Pipelines

Hi Guys,               I need more documentation/info on how pipelines work. It appears that a context is the message that is passing though the pipeline. I want to use a code step to generate a new message to that will be passed to a service step. But I can not find any detail on how to use the context object. Regards,                   AlistairSee More
Discussion posted by Alistair Rigney Dec 7, 2011
Profile Icon
Alistair Rigney is now a member of Neuron ESB User Network Nov 25, 2011

Badge

Loading…

© 2012   Created by Neuron Admin.   Powered by .

Badges  |  Report an Issue  |  Terms of Service