Heroku REST api Call in java - 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/

Related

How to deploy SDK Java with Eclipse?

I want deploy OKTA Java SDK on Eclipse.
On the client side, we are using MS Excel (VBA).
On the server side, we are serving the requests using pure Java Servlets.
Can anyone help me implement OKTA Java SDK ?
The Okta SDK is for management tasks, we are looking into tie into our authentication API. For web apps, our first choice would be to use an OIDC (or OAuth 2) library. There are a few OAuth libraries that have support for Servlets, I think Apache Oltu does.

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?

which is better apache or tomcat apache for webservice of java application..?

I have Used Tomcat Apache to use my java desktop application as a webservice.so is that good option Or i need to use apache server to make my java application as a webservice?
Wht i want is after my webservice made with apachetomcat ..can i call that webservice with wcf or desktop application of .net?
wcf service -> call webservice of java application(using apache tomcat) ->execute java application on server->and return resutl to wcf service
wcf service has function as below
call Javaapplication();
and throught that can i invoke java programm on server?
is it possible?
Apache is an http server. Tomcat is a Java EE environment which includes the ability to function as an http server.
Apache alone won't run your Java application. In many cases, Tomcat will be enough, but in higher-volume situations, you may want to use Apache and Tomcat together.
Other than that, it looks like you need to find a good tutorial on Java EE and Web Services, like, perhaps, this one by Oracle
If you are looking at Apache products, Axis is the tool for web services. And to that, I would look at Axis2. But, I would encourage you to look at the variety of options out there and select the best for you.

Framework or tools for build wsdl with java

Is there any excellent tool in JAVA to deal with webservice or wsdl?
Yes. There is a standardized API (JAX-WS) that is even integrated into the Java standard API (the javax.xml.ws packages) since Java 6, and multiple implementations thereof, such as Axis and CXF.
Read about wsimport utility, which generates client-support code from the WSDL document (or URL pointing at service endpoint).
If you are using Eclipse try Eclipse Web Tools Platform Project, it's good at my point of view and sufficient for me.
For IntelliJIDEA Web Services link
If you're a Spring user, I'd recommend the Spring web service module. It makes using WSDL, creating web services, and implementing clients easy.

Consuming a WCF WsHttpBinding WebService in Java

I'm trying to get a Java Client to communicate with a WCF wshttpbinding WebService. But I am unable to do so. The call either hangs, or I get "musunderstoodheader expcetions".
My Web Service is just the default Visual Studio generated "WCF Service Library Template".
My Web Service Client is just a blank IntelliJ project, with the corresponding stub generated using "Add Web Service Client" (the webservice platform specified is JAX-WS 2.X).
When I change my binding to BasicHttpBinding everything works flawlessly.
I've tried playing with the WsHttpBinding configuration, including turning off security, but I've had no success.
Suggestions ? Thoughts ? Is the WsHttpBinding only partially supported by JAX-WS 2.0?
Your problem is that JAX-WS doesn't support the same WS protocols that are used in the wsHttpBinding. You need to use WSIT instead. WSIT is available as part of the Metro library, which is also available on Glassfish.
I recommend using wsHttpBinding or ws2007HttpBinding where possible, but you can still do a fairly secure service with basicHttpBinding over SSL/Transport Auth.
I would carefully examine your WCF config and remove all authenitcation, authoraization etc., properties. Remember, by default, WCF will expose your service securely when using a secure transport/binding. Therefore, unless you configure your Java client to honor those security demands, it will most likely fail to authenticate and you won't see the two converse.
Once you have the two talking, gradually work through adding each security element until you have your Java client cofigured correctly.

Categories