You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Martin Kuhn <ma...@gmx.at> on 2009/01/21 15:46:35 UTC

Own BindingComponent required?? - calling the ESB from a mainframe

HI,

I've to integrate the callability of SMX4 from a mainframe. 

Usually a simple java class from a middleware provider (thirdparty) is used
to connect to a middleware server (with certain serverinfos). The class is
already used in a standalone java prog. After this connecting process
requests come in and the prog instance is able to handle the requests.

Now I've to integrate this funct. in SMX4. My first thought was to develop a
BindingComponent.

My questions:
 - is this the correct approach? (or is it possible to do it simpler)
 - which functionality do I have to implement?

Any help would be appreciated!

TIA
Martin
-- 
View this message in context: http://www.nabble.com/Own-BindingComponent-required-----calling-the-ESB-from-a-mainframe-tp21584515p21584515.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Own BindingComponent required?? - calling the ESB from a mainframe

Posted by Martin Kuhn <ma...@gmx.at>.

Jean-Baptiste Onofré wrote:
> 
> Hi Martin,
> 
> 2/ Using bean or CXF-SE ServiceEngine :
> You can encapsulate the mainframe process in a POJO exposed by CXF-SE.
> The process logic is present in the NMR and you can publish using another
> binding
> component (such as HTTP).
> 
> 

HI JB,

thanks for the prompt response.


Maybe to make it a little bit more transparent -> here is a sample code
fragement I have to perform.
In the (xml) string (sServiceRequest) I receive  the information which I
need to know to call the corresponding service in SMX.

I would want a really simple solution. I know nothing about CXF-SE. Is it
possible to define the following peace of code in a simple bean. When I
receive a host call, I create a SMX MessageExchange which calls the
corresponding service (sync). Than I could pass the result of the service
back to the mainframe 


Code fragment for receiving mainframe calls:


Broker broker = new Broker(brokerID, "JavaServer");
BrokerService bService = new BrokerService(broker, serverAddr);

// Declare one Message object to capture an incoming message and to
// hold the reply
BrokerMessage bMessage;
try {
	bService.register();

	// listen for new connections
	boolean loop = true;

	while (loop) {
		try {
			bMessage = bService.receive();
		
		// here an xml Service request comes in from mainframe
			String sServiceRequest = new String(bMessage.getMessage());
			// perform some logic in the ESB world (message exchange, and so on)
			// String resultOfEsbLogic= ....
			
			bMessage.setMessage(resultOfEsbLogic:"");
			bMessage.reply(new BrokerMessage(msg));
		} catch (BrokerException bE) {
		..
			}
		}
	}
	// deregister and logoff
	bService.deregister();
	broker.logoff();
	broker.disconnect();
} catch (BrokerException bE) {
...
}

TIA,
Martin
-- 
View this message in context: http://www.nabble.com/Own-BindingComponent-required-----calling-the-ESB-from-a-mainframe-tp21584515p21585499.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Own BindingComponent required?? - calling the ESB from a mainframe

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Martin,

You have two big ways :
1/ Create a dedicated BindingComponent
It can be solution. You need to code :
- the component itself (responsible of sending and reading NormalizedMessage
from the NMR)
- the marshaler (responsible of the messages transformation)
You can see an exemple of a simple BindingComponent (SMPP) here :
http://svn.nanthrax.net

2/ Using bean or CXF-SE ServiceEngine :
You can encapsulate the mainframe process in a POJO exposed by CXF-SE.
The process logic is present in the NMR and you can publish using another binding
component (such as HTTP).

Regards
JB

On Wednesday 21 January 2009 - 06:46, Martin Kuhn wrote:
> 
> HI,
> 
> I've to integrate the callability of SMX4 from a mainframe. 
> 
> Usually a simple java class from a middleware provider (thirdparty) is used
> to connect to a middleware server (with certain serverinfos). The class is
> already used in a standalone java prog. After this connecting process
> requests come in and the prog instance is able to handle the requests.
> 
> Now I've to integrate this funct. in SMX4. My first thought was to develop a
> BindingComponent.
> 
> My questions:
>  - is this the correct approach? (or is it possible to do it simpler)
>  - which functionality do I have to implement?
> 
> Any help would be appreciated!
> 
> TIA
> Martin
> -- 
> View this message in context: http://www.nabble.com/Own-BindingComponent-required-----calling-the-ESB-from-a-mainframe-tp21584515p21584515.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 

-- 
Jean-Baptiste Onofré (Nanthrax)
BuildProcess/AutoDeploy Project Leader
http://buildprocess.sourceforge.net
jb@nanthrax.net
PGP : 17D4F086