2. Introduction to API and Service Hosting
• Provide an overview of all the service items in the Neuron ESB Explorer
• Creating an On-Ramp / Dynamic Routing pattern
Goals
3. Introduction to API and Service Hosting
• Introduction to service endpoints
• What are service endpoints
• Hosting API and SOAP based services
• Routing traffic to existing services
• Creating service endpoints
• Configuring and managing service endpoints
• Service policies
• On-Ramp Pattern
• Dynamic Routing Pattern
Lesson Plan
4. Introduction to API and Service Hosting
Service Endpoints
Service endpoints are the interfaces by
which Neuron ESB interacts with clients and
services. Neuron ESB provides support for
two different types of service endpoints.
Client Connectors
• Generic service on ramps (i.e.
http://machine:port/endpoint)
• Neuron hosts client connectors (no
need for IIS)
• Type-less (Either no WSDL or WSDL
based service)
• Service consumers
• Publishes directly to the Bus
Service Connectors
• Act as service providers
• Subscribes directly from the Bus
Publisher Subscriber
Adapters
Topics
Adapters
Service Connector
Processes
Client Connector
Workflow
5. Introduction to API and Service Hosting
Client Connectors
Client Connectors are hosted by the
Neuron Runtime service in the same way
that a console application would host a
WCF service, or IIS would host an ASMX
service.
API Client
Connector
SOAP Client
Connector
WCF Service
ASMX Service
Console Application
Internet Information
Services
6. Introduction to API and Service Hosting
Service Connectors
Service connectors are used by Neuron
ESB to route traffic to existing services,
such as SOAP Services, Cloud Based APIs
and other REST services
Cloud Based API
REST API
SOAP URL
7. Introduction to API and Service Hosting
Creating Service Endpoints
• Service endpoints are created
through the Neuron ESB Explorer
• Service endpoints can be found on
the connections tab, under the
service endpoint section
• Services can be created by
• Manually configuring the
service endpoint
• Importing an existing service
8. Introduction to API and Service Hosting
Service Endpoints : General Tab
• Enable Service Endpoints
• If unchecked, both the Client and Service Connectors are
disabled
• When checked, the Client and Service connectors are
enabled based on their own enabled checkboxes
• Name
• Give service endpoints a useful name that describes the
service
• Endpoint Host
• The Endpoint Host under which the Service Endpoint should
run.
• Binding
• Selects the binding to be used for the service
• Either one of Neuron’s preconfigured WCF bindings or a
custom binding (previously added on the Service Bindings
tab)
• Behavior
• Selects a custom behavior (previously added on the Service
Behaviors tab)
9. Introduction to API and Service Hosting
Service Endpoints : Basic Bindings
Neuron ESB ships with a number of different binds available for use in service endpoints. While some of them
are for very specific scenarios, there are three that are considered basic, or common bindings.
Binding Description
BasicHttpBinding SOAP 1.1. Good for basic profile compliant services and ASMX style services
WSHttpBinding SOAP 1.2. Supports WS-Security and other WS* specifications
REST A binding that is suitable for communicating with REST API conformant Web services. This binding
uses HTTP as the transport.
10. Introduction to API and Service Hosting
Service Endpoints : Binding Tab
• Messaging Pattern
• Request-Reply or Datagram (one-way)
• Max Message Size
• Restricts the maximum message size that will be accepted by
a client connector
• Reliable Sessions
• Provides SOAP reliable messaging as defined by the
WS_ReliableMessaging protocol.
• Can be used with the WSHttp, WSFederationHttp and
NetTcp bindings
• Transactions
• When using a binding that supports transactions, service
calls can enlist in a transaction with the Neuron messaging
system
• Use Raw Body
• Neuron ESB will treat the message body of the Web service
request/response as binary
• Keep Alives Enabled
• Used for REST calls.
• Directs Neuron ESB to maintain a persistent connection by
adding the appropriate Keep-Alive and Connection http
headers to the message
11. Introduction to API and Service Hosting
Service Endpoints : Security Tab
• Security Model
• Select which WCF security configuration to utilize
• Service Identity Type/Value
• WCF Security Configuration
• Certificate Validation
• WSFederationHttp Binding Setting
• Certificate Revocation
• Service Credentials
• Issuer Credentials
• Negotiate Service Credentials
• Establish Security Context
• Enable Impersonation
• Allows the Windows Identity of the authenticated caller to
flow down to a Service Connector
12. Introduction to API and Service Hosting
Service Endpoints : Client Connector Tab
• Enable Client Connector
• Enables the client connector to start receiving service
requests
• Publisher Id
• The party hosted by the client connector to execute
business processes and publish received messages
to the bus
• Topic
• The topic the message will be published to
by default
• URL
• The URL of the exposed Service endpoint
• Can use “localhost” or the DNS name the represents the
machine
• If using a REST binding, the URL is the base URL of the REST
API
• Access Control List
• List of credentials to be used to authenticate incoming
requests
• Enabled based on the Security Model selected on the
Security tab
13. Introduction to API and Service Hosting
Service Endpoints : Client Connector Tab
• Enable Custom SOAP Headers
• Enables the capture of custom SOAP headers, when using a
non-REST binding and adds them to the ESB message
• Enable HTTP Headers
• Enables the capture of HTTP headers in HTTP based SOAP
bindings. REST will ALWAYS capture the HTTP headers.
• Enable CORS Headers
• Enables the capture of CORS headers and adds them to the
ESB message.
• Max Concurrent Calls
• Sets the maximum number of calls that can be processed by
the client connector concurrently
• Max Concurrent Instances
• Sets the maximum number of instances of the client context
object in a client connector
• Max Concurrent Sessions
• Sets the maximum number of concurrent sessions that a
client connector can accept
• Metadata
• Allows you to define which WSDL (or SWAGGER) will be
returned when the client connector receives a metadata
request
14. Introduction to API and Service Hosting
Service Endpoints : Service Connector Tab
• Enable Service Connector
• Enables the service connector to start receiving messages from the
bus
• Subscriber Id
• The subscribing party that will proxy received messages to the
service endpoint and execute business processes
• Policy
• The Service Policy that will be used to determine how to handle
retries and failed messages
• URL
• The URL of the exposed service that Neuron is attempting to
connect with
• If the service is using a REST binding, the URL is usually the base
URL of the REST API
• Failover URL(s)
• When a communication exception is returned from a service call,
the service connector will use the next URL in this list (if any are
present).
• Service connector will continue to use this URL until another
communication exception is received, then it will use the next URL
in the list, if it is the last URL, then Neuron will return to the original
URL
15. Introduction to API and Service Hosting
Service Endpoints : Service Connector Tab
• Client Credentials
• The credentials to use then calling the service
• This is enabled based on the Security Model selected on the
Security tab
• OAuth Provider
• Select the appropriate OAuth provider if using one to authenticate
with the service
• Enable Custom SOAP Headers
• Enables the restoration of custom SOAP headers from the
message to the service call for non-REST bindings
• Enable HTTP Headers
• Enables the restoration of HTTP headers from the message to the
service call for non-REST bindings. REST bindings will ALWAYS
restore HTTP headers.
• Enable CORS Headers
• Enables the restoration of CORS headers from the message to the
service call.
• Single Instance
• If Neuron is in Farm Mode this will restrict the service connector to
a single instance across the farm.
• Allow Connection Reuse
• Instructs Neuron to reuse an existing connection instead of closing
and opening a new one with each call to the service.
16. Introduction to API and Service Hosting
Service Endpoints : Proxy Settings Tab
• System Default
• Use the default proxy settings as defined in either Internet
Explorer or the <system.net><defaultProxy> settings in the
esbservice.exe.config file
• Custom
• Use the custom proxy settings defined on this tab
• Host is DNS name of IP address of the proxy server
• Port is the port of the proxy server
• Bypass proxy for local addresses
• Ignores the proxy server if the service being called is hosted
by the local machine
• Use custom credentials
• Uses a security credential other than that of the Neuron ESB
Service account to authenticate with the proxy server
• Select the credential from the drop down list.
• The credential will need to be defined in the Security section
prior to being available in this list
17. Service Endpoints : Demo
Purpose:
Familiarize users with Service Endpoints in the Neuron ESB Explorer
Objectives:
Acquaint users with the following aspects of Service Endpoints
• Creating service endpoints (client and service connectors)
18. Introduction to API and Service Hosting
Service Policies : General Tab
• Name
• Name of the service policy as referenced inside the
Neuron ESB Explorer
• Description
• A description of the service policy
• Send Timeout (seconds)
• How long (in seconds) before the service policy
triggers a timeout
• Do not apply policy if the failure is a service fault
• Overrides the policy actions in the event of a SOAP
service fault
19. Introduction to API and Service Hosting
Service Policies : REST Tab
• Only used for REST based bindings
• Provides a list of available HTTP status codes that can be
included or excluded as exceptions
• Status codes are either all included or excluded, based on
the radio button selection
20. Introduction to API and Service Hosting
Service Policies : Failure Actions Tab
• Retry Configurations
• Non MSMQ Topics
• Retry Count – How many times to retry the service before
executing the Failure Action
• Retry Interval (seconds) – How many seconds between retries
• MSMQ Topics
• Retry Interval (seconds) – How many seconds between retries
• Retry Expiration (min) – How many minutes retries should
continue before executing the Failure Action
• Failure Action
• Republish – publishes the message to the chosen topic
• Log to disk – saves a copy of the ESBMessage to disk space
• Log to database – saves the ESBMessage to the Neuron
database, similar to auditing
• Discard Message – throws the message away without
retaining a copy
21. Introduction to API and Service Hosting
Service Policies : Availability Tab
• Always available – the service is always available
• Limited Availability – the service is available based on the
schedule indicated, and will be down during all other
times
22. Introduction to API and Service Hosting
Service Policies : Endpoints Tab
• Indicates the endpoints currently using the selected policy
• Allows the assigning of the selected policy to any
endpoint with the ColumnCheck checkbox selected
23. Service Policy : Demo
Purpose:
Familiarize users with Service Policies inside the Neuron ESB Explorer.
Objectives:
Acquaint users with the following aspects of Service Policies
• Creating Service Policies
24. Introduction to API and Service Hosting
On-Ramp Pattern
• A Client Connector which is responsible for receiving any type of message is referred to as an On-Ramp (a publishing
adapter endpoint can also serve as an on-ramp).
• Leverage business processes for message processing and routing
• Saves development time and effort
• Used in conjunction with dynamic routing
• Can serve as an on-ramp for any messaging pattern
• Service Brokering
• Content based router
• Scatter Gather
• Message router
• Itineraries Customer Topic
Order Topic
Invoice Topic
Service Consumer
(Customer)
Service Customer
(Orders)
Service Consumer
(Invoices)
Business Process
(Routes to Different Topics)
Service Connector
Service Connector
Service Connector
Client
Connector
(On-Ramp)
Customer Topic
Order Topic
Invoice Topic
25. Introduction to API and Service Hosting
Dynamic Routing
• Message routing where the flow is dynamic but all possible endpoints are predefined
• Use when you have one or more endpoints capable of, but not always needing to, receive a message
• Prevents building a scenario for each individual possibility
• Routing Messages
• Content
• Headers
• Metadata
Customer Topic
Order Topic
Invoice Topic
Service Consumer (Customer)
Service Customer (Orders)
Service Consumer (Invoices)
Business Process
(Routes to Different Topics)
Client
Connector
(On-Ramp)
26. Introduction to API and Service Hosting : Demo
Purpose:
Familiarize users with Service Policies inside the Neuron ESB Explorer.
Objectives:
Acquaint users with the following aspects of Service Policies
• Creating Service Policies