Neuron ESB User Network

The Service Bus for the Connected Business

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: 467

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 IconChad Parsons, Will Hitzges, michael larsen and 4 more joined Neuron ESB User Network
Jun 11
Anupama Nair posted a discussion

ODBC stored proc polling with temporary tables

We have set up an ODBC adapter to poll a stored proc.We found that if the stored proc has a temporary table defined the rows returned are always 0.Any idea why this would be and what we can do to get around it?See More
Dec 14, 2020
Prasanth Kharade is now a member of Neuron ESB User Network
Dec 30, 2019
Suman vadde is now a member of Neuron ESB User Network
Dec 16, 2019
Morten Andreasen is now a member of Neuron ESB User Network
Dec 9, 2019
Profile IconCarl Porch, Cordier, Lahbib Marouan and 4 more joined Neuron ESB User Network
Nov 18, 2019
Miroslav Jelev posted a discussion

Using unsupported OAuth provider

Is it possible to create a custom OAuth provider?  Specifically, we are working with Cisco (https://cloudsso.cisco.com/as/token.oauth2).We have a requirement to integrate with a Cisco soap server which uses OAuth2 for authentication. We are using a Service Connector to send a message to the SOAP service, but we need to write custom code in a business process to authenticate with their Cisco OAuth provider. We saw that Neuron supports…See More
Jul 29, 2019
Profile Iconchris comer, Fahd EL YOUBI, Vishal Misal and 2 more joined Neuron ESB User Network
May 16, 2019

Badge

Loading…

© 2021   Created by Neuron Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service