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.