Podio API, attaching files to items - java

I have a problem with attaching a file to a specific item using Java API. I know it should be possible as this functionality described here in the Podio documentation https://developers.podio.com/doc/files/attach-file-22518 and examples for PHP and Ruby are given. However I cannot find such method in the podio java library. I could find in FileAPI just methods that provide uploading files, but not attaching them to specific objects as described in documentation.
I use Podio APi version 0.7.1
Any ideas how it should be done in Java?

Podio uses a REST-Style API. You send standard http-request, and you get back json-formatted data. So you can do it all without a special library for your programming language.
If there is no predefined java class for you, you can just do the call yourself. In the end it is just a HTTP-call.
From the ruby implemention, I see that you attach the file as multipart/form-data,
so it is the same a browser would do it. There should be http-handling java classes to help you.
You also need to add the information from the API-Page, like the POST-Parameters and of course the url. The most difficult part is probably the authentication headers, but you need to solve this problem only once.

Related

How to get all AccountSubTypeEnums for a given AccountTypeEnum?

I am integrating Quickbooks Java API in my project. I am trying to get the AccountSubTypeEnums for a given AccountType. Is there an API to handle this?
There is no API for this.
However, Intuit does publish .XSDs for the schema, which contain all of the constants used, and are available here:
https://developer.intuit.com/app/developer/qbo/docs/learn/explore-the-quickbooks-online-api/minor-versions

AWS ElasticSearchService - Java SDK example?

I am using the ElasticsearchService from Amazon. I am a little overwhelmed by their documentation. I find it vast but ever so difficult to navigate. Anyway, I am looking for an example of using the ESService using their AWS Java SDK. Do you have a link - or some code to insert a document?
I am actually using it from Scala, and what I've got so far is:
val awsEsClient: AWSElasticsearchClient = new AWSElasticsearchClient()
awsEsClient.setRegion(Region.getRegion(Regions.EU_CENTRAL_1))
awsEsClient.setEndpoint("es.eu-central-1.amazon.aws.com")
val createD = new CreateElasticsearchDomainRequest()
Where should I specify my own instance ARN? The uri that looks like
arn:aws:es:eu-central-1:xxxxxxxxxxx:domain/yyyyyyyy
Also, when using their SDK, I guess I don't need to specify anywhere the endpoint they provide? The one that goes by
search-yyyyyy-xxxxxxxxxx.eu-central-1.es.amazonaws.com
Or maybe this is what I should specify instead of the
awsEsClient.setEndpoint("es.eu-central-1.amazon.aws.com")
Thank you for your help and sorry if all these questions sound obvious.
So, I got the whole thing wrong from the beginning. The SDK is useful only in order to manage the service, like spin up new nodes and similar -- not to access it. For that, the only solution that Amazon offers is an HTTP endpoint, using the common REST api offered by Elastic Search.
The problem that came next was to authenticate the requests. I have compiled a scala library to do that for every request, which is available here: https://github.com/ticofab/aws-request-signer.

Getting data using OAI-PMH from an insitutional repository

I'm developing an application where I've requested data from an external institution's website. They have informed me that the data will be provided by OAI-PMH.
Could someone show me some sample code in Java how data is extracted from a OAI-PMH ?
I wonder how different it is from reading and parsing XML data.
Thank you.
Warmest wishes,
Shoubhik
For a Java implementation, for example, you could use some already existent library, like XOAI with an easy to use API. There are some provided samples.
To extract metadata from each Record you could use a XML Parser or a XML bind approach (JAXB). For other languages, like PHP and Perl there are also other alternatives.

Android XML based UI in Java

I would just like to have an Android XML UI file in Java. I have the XML file and I believe I need a parser that would actually generate the Java UI class file. Any ideas how to go about approaching this ?
EDIT: Well, let me explain this a little better. I am trying to track Google finance data for which I use gdata client library. However its authentication does not work in the Android environment, and so I am switching to Java SE. However, is there any library or something by which I can have the Android UI, without having to write my own parser. Need not necessarily be XML based.
You need to write your own parser and instantiate the Swing classes that are synonymous with the controls described in the XML.

Java SWIFT Library

I'm looking for a Java library for SWIFT messages. I want to
parse SWIFT messages into an object model
validate SWIFT messages (including SWIFT network validation rules)
build / change SWIFT messages by using an object model
Theoretically, I need to support all SWIFT message types. But at the moment I need MT103+, MT199, MT502, MT509, MT515 and MT535.
So far I've looked at two libraries
AnaSys Message Objects (link text)
Datamation SWIFT Message Suite (link text)
Both libraries allow to accomplish the tasks mentioned above but in both cases I'm not really happy.
AnaSys uses a internal XML representation for all SWIFT messages which you need to know in order to access the fields of a message. And you need to operate on the DOM of the XML representation, there is no way to say "get the contents of field '50K' of the SWIFT message".
And the Datamation library seems to have the nicer API but does not find all errors.
So does anyone know other SWIFT libraries to use?
Have you looked at WIFE? We use that in our application which translates SWIFT messages to an internal XML format and back again. We haven't had any problems with it. Also, it's licensed under the LGPL, so you can hack it up if you need to. Check it out.
SWIFT is releasing a "Standards Developer Kit" which includes an "MT/XML Schema Library".
From the doc:
"The MT/XML Schema Library is a complete set of XML schema definitions for MT messages, and software which shows how to convert messages from an MT format to an MT XML representation and back. This approach allows XML integration between applications while the MT (FIN) format will continue to be transported over the SWIFT network."
Java source code will also be made available, again from the doc:
"Working sample Java source code that converts a message in MT format to an XML instance and from an XML instance to a message in MT format."
See: http://www.swift.com/support/drc/develop/standards.page
This can be a great aid in dealing with FIN messages in XML syntax.
You can combine the open source implementation WIFE with the commercial validation component from http://www.prowidesoftware.com. It validates that the messages you create with the model or XML representation are good through SWIFT network validation rules.
There is a product call Volanté that make a great job. Their solution is certified by SWIFT and the integration is easy ( I sound like I'm working for them ... I'm not). I've been using it since a couple of month .
IBM is also offering a solution (cannot remember to name right now) but then you are committed to the big blue.
If your company is not comfortable with the LGPL license, You might want to check Progress Sonic ESB, or ArtixDS (recently acquired), TIBCO ActiveWhatever or Oracle/BEA Aqualogic. Chances are you are already using something from these companies and you can get decent discount.
Along with jodonnell, we also use WIFE. It works very well. I'm not sure if it does the network validation rules (#2 on your list) though.
paymentcomponents (http://www.paymentcomponents.com/) parser was easy to use and found all errors. Their site definitely needs work but if u look there, u'll find what u r looking for
I can not really help you out with a Java implementation. Microsoft of course, have their own Biztalk adapter for ISO15022 and 20022. And they will actually do the validation fairly well. But as you say you are actually looking for a java solution.
You might find, as I did when I researched this 6 years ago, that mapping FIN messages to XML and then to into objects, a standard library will only get you partly to your goal. You will have to integrate this with your backend application and whatever market practices you face in the particular messages you need to support.
I finally ended up writing a generic FIN parser /150022 class library in c++.
Anyway, good luck. An idea is to be more specific in your question. What types of messages do you need to support?
Datamation's libraries have evolved since then. If you need a corresponding solution in 2021, you can check FINaplo by PaymentComponents (formerly called Datamation), a multi-purpose implementation for financial messages.
It provides online validation/parse/translation/envelope services, Java SDKs, as well as REST solutions, all including error specifications. I am actually one of the authors.
A demo for a SWIFT MT Java library can be found in this GitHub link.

Categories