Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Tip #8

Open
keyhan opened this issue May 12, 2016 · 3 comments
Open

A Tip #8

keyhan opened this issue May 12, 2016 · 3 comments
Labels

Comments

@keyhan
Copy link

keyhan commented May 12, 2016

I have just created a repo based on j8583 but with some added features, I think it could be useful for your project. Look it up jBSBE

@kpavlov
Copy link
Owner

kpavlov commented May 18, 2016

Thanks. Am I right that providing I50Factory to the server or client does the job?

I50Factory messageFactory = new I50Factory(SimpleTransformer.class);
Iso8583Client<I50Message> client = new Iso8583Client<>(messageFactory);
Iso8583Server<I50Message> server = new Iso8583Server<>(port, messageFactory);

@keyhan
Copy link
Author

keyhan commented May 18, 2016

Yes,
The First line has to be

I50Factory<SimpleTransformer> messageFactory = new I50Factory(SimpleTransformer.class);

It is actually subclass to MessageFactory and I50Message is of course subclass to IsoMessage, so it will have the exact same behavior. What is difference are the points I mention in the page. The best thing I think is that if you have already a pojo with all the right values formatted correctly, then you can send it in a REST body and the server will just transform it into a an ISO Message and send it.

I forgot something, to create the message from pojo you have to call

I50Message message = messageFactory.newMessage(purchaseRequest);

You could still call the messageFactory.newMessage(messageType), but then you have to do everything manually like in the standard j8583.

@keyhan
Copy link
Author

keyhan commented May 19, 2016

I have also added new annotation "@AutoStan" @kpavlov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants