Android and JAX-RS - java

I have a REST Client written on Jersey. It uses JAXB and JAX-RS. But when I try to add jar file with client to my Android application it crushes with error like this:
java.lang.NoClassDefFoundError: javax.ws.rs.client.ClientBuilder
Seams that Android actually doesn't support JAX-RS. Or maybe I'm wrong?

You can use android library like volley to make http requests to the jax-rs based api.
There is no need for a Jax-rs client and the need for android to support JAX-RS in perticular. REST-ful api's are supposed to be platform independent. So there is no requirement for client or the consumer of this api to support any perticular api or framework like Jax-rs.
speaking further,
Android uses ART/Dalvik virtual machine rather than JVM, therefore in that case it might not be able to compile a java based library? unless that library is also made available separately for android platform.

Related

Using Jersy API client on appengine

I have an existing API which internally calls some external API using jersy api client library. I am planning to deploy my API on appengine using with java8, but it seems this jersy library is not functioning on appengine platform, as per google docs either I need to use java.net.URLConnection or urlfetch methods to make http(s) calls from within appengine. Is there a way to make my existing jersy based code work as it is?
The same jersy code worked on appengine platform after adding urlfetch as below in appengine-web.xml
<url-stream-handler>urlfetch</url-stream-handler>

Possible to include Client JAVA API libraries in Web-services?

We want to develop a Java based Web-services (since the API's we want to use are Java based)
I would like to know if it's possible to use the IBM Rational Team Concert Plain Java API's (https://jazz.net/downloads/rational-team-concert/releases/5.0/RTC-Client-plainJavaLib-5.0.zip) as part of the Web-servicesand deploy them in the server?
Basically we use these API's on a client based Java applications. What I am looking at is more like a services which can be consumed by many applications
Anyone has any experience in deploying the client based API in the server as Web-services?
After multiple tries, it is possible to use the RTC Plain Java API's as Webservices.
How I did:
Followed the simple Webs Service creation tutorial (http://wiki.eclipse.org/Creating_a_Bottom-Up_Java_Web_Service)
Adapted to my needs
First added the "RTC plain Java API's (JAR's)" to the Eclipse build path
Then added the "RTC plain Java API's (JAR's)" to the "WebContent/Lib/" folder of my Dynamic web project
Created a new Web service & Web service client
I was able to login to RTC via this for starters

Migrate contract-first SOAP-RPC service to Java

we currently have a problem with supporting a legacy API offered via SOAP-RPC. The current service is exposed via a PHP extension and now we would like to offer it via Java. Switching to a Java implementation would mean a SOAP-WS service since we could not find a way to expose SOAP-RPC in Java.
The facts:
Our Java application runs as a servlet in Tomcat
document style "rpc" is not supported in Apache CXF, leads to arrays described differently
Apache CXF only supports JAX-B and not JAX-RPC.
Is there any way / tutorial to explain the writing of a SOAP-RPC service with current technology like Spring-WS or Apache CXF?

IBM FileNet P8 Java APIs integration with Android?

IBM FileNet P8 provides Java APIs to deal with the content engine (CE)
http://pic.dhe.ibm.com/infocenter/p8docs/v5r1m0/index.jsp?topic=%2Fcom.ibm.p8.ce.dev.cews.doc%2Fconcepts%2Fintroduction.htm
my question is: are these APIs compatible with Android? can I use these APIs within my Android application ? if not, are there any alternatives ?
You can try to use CEWS API.
You cat try to use CMIS interface (if CMIS can cover your requirements and if you find the impelemntations of CMIS cliet for Android)
You can use ready Content Navigator application from Google Play to work with P8 repository.
You can customize ICN and use it in mobile browser or embeded via JavaScript in your application.
You have another option. Build a webservices layer over Filenet API and consume those webservices from your Android app
Sorry, i can't put comments to answers.
Sherif Ayad, FN have full WS API, it calls WSI. WS API is additional layer on EJB API. When you use CE Java API it depends on connection URL which transport will be used for communication (if protocol section of URL contains http(s) web services over http will be used, if iiop CE Java API will use CORBA(RMI) protocol for comminication) but it is the same api. WSI translate all methods to EJB layer. CE always have WS Interface. CE .NET API just generated stubs for WSI.
Development of additional layer of WS it is additional costs and source of errors.
Mina Samy. If you need just add comments to documents, look for the JavaScript API of ICN, or try to use ICN mobile application instead of custom application. You can try to change ICN mobile application by WebSphere Worklight technology (see license agreement for IBM Content Navigator).
mbonaci, FN Java API conatin some classes from Java EE stack, it use JAAS, RMI (IIOP) to work with EJB, it use some extensions of WS (WS-Security and WS-MTOM), it supports of transactions and others.
For example you need additional classes from javax.*** and some proprietary classes from WebSphere client to use CE Java API from remote host.
So, i'm not sure that CE API will be works under Android JDK.
I don't see why that wouldn't work.
Have you tried?
The alternative could be to use phonegap and browser (like modified Workplace), but under the cover it would stll be using CE API.
What kind of client app do you have in mind?

Heroku REST api Call in java

can we connect to heroku using webservices or anything else . i want to set up an integration in java which should login in ito heroku and run my application.?
There is an out-dated doc on the Heroku REST APIs that will give you the basic idea. Unfortunately the most up-to-date reference is the Heroku command-line client source code - which is in Ruby.
If you want to build an HTTP client in Java, Jersey (Oracle's JAX-RS Reference implementation) is a good choice. It's client library is very similar to the client library that will be in standardized in JAX-RS 2.0.
With Jersey, you are also not limited to Java's build in HTTP connector but can plug in the (much better) Apache HTTP client connector. (All described in the Jersey docs)
http://jersey.java.net/

Categories