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.

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

Victor Bello and Claus Møller Madsen joined Neuron ESB User Network
5 hours ago
CM added a blog post
Many times load balancing can change what the optimal solution is for a given deployment. Unless careful consideration is given to what is trying to be accomplished then some erroneous conclusions can be arrived at... For example, people take it a…
19 hours ago
Marc Manzanares added a discussion
Seems like it happens everyday now. Any known issues with this? I would also get this error:   "A timeout (30000 milliseconds) was reached while waiting for a transaction response from the Neuron ESB service."
yesterday
Raymond Frankulin added a discussion
I am working with some iSeries dataqueue adapter code which calls the RaiseEnpointOffline/Online events.  The code and documentation say these are now obsolete.  Is there a new method to use or should they be removed?   Thanks!
yesterday
Marc Manzanares and Robert Foss joined Neuron ESB User Network
yesterday
Kenneth Russo added a discussion
What I wish to do is two-fold:   1) Capture the error on processing from a subscriber.  I can do this by turning on auditing (which I have tested, works fine).   2) Submit the message for re-processing after I have corrected my code/data.  This I do…
on Tuesday
Maurice Gordon and Kenneth Russo joined Neuron ESB User Network
March 12
nicolemdrayton is now a member of Neuron ESB User Network
March 7

Badge

Loading…

© 2010   Created by Neuron Admin on Ning.   Create a Ning Network!

Badges  |  Report an Issue  |  Privacy  |  Terms of Service

Sign in to chat!