-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support headers with different header length #13
Conversation
@@ -19,5 +19,6 @@ | |||
<template xmlns="http://ws.apache.org/ns/synapse" name="sendMessage"> | |||
<sequence> | |||
<class name="org.wso2.carbon.connector.iso8583.ISO8583MessageProducer"/> | |||
<script language="js"><![CDATA[mc.getEnvelope().getBody().getFirstElement().detach();]]></script> | |||
</sequence> | |||
</template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we add a new line here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
if ((message = inFromServer.readLine()) != null) { | ||
unpackResponse(messageContext, message); | ||
} | ||
Thread.sleep(200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you put 200 sleep here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will take time to get the response from the back end in the input stream buffer. That's why I put.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check without it ...
try { | ||
outStream = new DataOutputStream(connection.getOutputStream()); | ||
inFromServer = new BufferedReader(new InputStreamReader(connection.getInputStream())); | ||
inFromServer = new DataInputStream(connection.getInputStream()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Furthermore it is wrong to close connection in this finally block. It should be closed by the method who creates it in it's finally block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
Close the socket connection where it was created, in it's finally block. Read the byte from input stream with out sleep the thread.
Purpose
support the message with the different header length
Goals
Implement the connector to support iso8583 message with header
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
JDK versions-1.8
Operating systems-Ubuntu 16.04
Product- EI-6.1.1