This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FIToFICustomerCreditTransfer fiToFICustomerCreditTransfer = new FIToFICustomerCreditTransfer(); | |
fiToFICustomerCreditTransfer.parseMessageFromXML(msgText); | |
List<String> validationErrors = fiToFICustomerCreditTransfer.validate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE FUNCTION distance_between (from_lat DECIMAL(6, 3), from_lng DECIMAL(6, 3), to_lat DECIMAL(6, 3), to_lng DECIMAL(6, 3)) RETURNS DECIMAL(11, 3) | |
RETURN 6371 * 2 * ATAN2(SQRT(POW(SIN(RADIANS(to_lat - from_lat)/2), 2) + POW(SIN(RADIANS(to_lng - from_lng)/2), 2) * COS(RADIANS(from_lat)) * COS(RADIANS(to_lat))), SQRT(1 - POW(SIN(RADIANS(to_lat - from_lat)/2), 2) + POW(SIN(RADIANS(to_lng - from_lng)/2), 2) * COS(RADIANS(from_lat)) * COS(RADIANS(to_lat)))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Message parseMessage(String msgText) throws Exception { | |
String namespace = msgText.replaceAll("(?s).*?xmlns=\"(.*?)\".*", "$1"); | |
return CoreMessage.parseXML(msgText, namespace); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testCreating205COV() { | |
SwiftMessage message = new SwiftMessage(); | |
// Set Tags for block1 | |
message.setArgApplid("F"); | |
message.setArgServid("01"); | |
message.setArgLTaddrBlk1("AAAABEBBAXXX"); | |
// Set Tags for block2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SwiftMessage message = new SwiftMsgProcessor().ParseMsgStringToObject(messageContent); | |
SwiftMsgValidator validator = new SwiftMsgValidator(DEFAULT_CRLF); | |
SwiftValidObj validation = validator.validateMsg(message); | |
for(ValidationError error : validation.getValidationErrorList()) { | |
System.out.println(error.getTagName() + " => " + error.getDescription()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Initialize a payment return (pacs.004) | |
PaymentReturn paymentReturn = new PaymentReturn(); | |
//message id is commonly auto-generated by each system | |
paymentReturn.set_GrpHdr_MsgId("OURMESSAGEID"); | |
//The settlement date for our return | |
paymentReturn.set_GrpHdr_IntrBkSttlmDt(Calendar.getInstance()); | |
//In most cases this is set to CLRG... | |
paymentReturn.set_GrpHdr_SttlmInf_SttlmMtd("CLRG"); | |
//and Clearing system is set to ST2 | |
paymentReturn.set_GrpHdr_SttlmInf_ClrSys_Prtry("ST2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Initialize a request for recall message (camt.056) with default values | |
FIToFIPaymentCancellationRequest fiToFIPaymentCancellationRequest = new FIToFIPaymentCancellationRequest( | |
"GENERATEDASSIGNMENTID", // the assignment id | |
"XXXXXBIC", // the assigner bank BIC | |
"YYYYYBIC" // the assignee bank BIC | |
); | |
//Construct the message reply information | |
//Here we are requesting a recall for a message with reason code DUPL (dulicate sending) | |
Vector<MsgReplyInfo> msgReplyInfo = new Vector<MsgReplyInfo>(); | |
ReasonCode rc = new ReasonCode(ReasonCode.CD, "DUPL", null, null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SwiftMessage parsedMessage = swiftMessageProcessingService.parseSwiftMessage(messageText); | |
SwiftValidObj validatedMessage = swiftMessageProcessingService.validateSwiftMessage(parsedMessage); | |
//validatedMessage will contain the SWIFT message object and text, as well as error message in case the message is not valid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SwiftMessage parsedSwiftMsg = new SwiftMsgProcessor().ParseMsgStringToObject(msgText) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map = (MapView) findViewById(R.id.map); //get the map instance | |
TiledLayer DAY_LAYER = new OfflineTiledLayer(this, new File(Environment.getExternalStorageDirectory(), "services"), "/RoadMapsWebMercator101010/MapServer/", "index.html", "/Day/tile/"); //create a layer | |
map.addLayer(DAY_LAYER); //add this layer to the map |
NewerOlder