I've successfully set up an Apache Juddi v3 on my computer ans know I want to create a client that can publish and discover webservices using java. I have searched in google but i could not find a clear explanation of how to do that as am new in webservice and uddi.
any help please!!!
You want to start with the jUDDI examples. There's a bunch of them.
http://svn.apache.org/repos/asf/juddi/trunk/juddi-examples/
http://svn.apache.org/repos/asf/juddi/trunk/juddi-examples/more-uddi-samples/src/main/java/org/apache/juddi/samples/
Note: you didn't specify what version you're using, so some of that code may not compile against what you're using. Most solutions should be obvious. If not, try getting checking out the full source (the readme has directions)
Related
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.
I am using OpenTokSamples project for OpenTok API and in that I want to create session id and token id through java code and I implemented the code by calling createSession() method but its throwing error----> Could not find class 'com.fasterxml.jackson.databind.ObjectMapper', referenced from method com.opentok.OpenTok.. I searched a lot and found need to add Jackson-databind jar & Jackson-annotations jar but still the issue is not getting resolved. Please help me on this.
There is another Jackson jar which implements the json<->object mappers.
This jar is jackson-mapper-XXX.jar [1]
If you check the repo [2], it comes with gradle support pointing to the dependencies it needs to build.
[1] http://repository.codehaus.org/org/codehaus/jackson/jackson-mapper-asl/
[2] https://github.com/opentok/Opentok-Java-SDK
You are meant to create sessions and tokens using the OpenTok Server SDKs, not on clients (such as Android).
It sounds like you are most familiar with Java as a language, so I suggest using the OpenTok Java SDK and running it on a server. There is a very easy to understand HelloWorld tutorial in the samples directory, with instructions on how to use it in the README.md file. It will guide you to get the server running locally on your development machine.
An even more useful example might the Learning OpenTok tutorial for Android. It shows how to send a request to a server that returns the session ID and token. The server used in this tutorial is written in PHP, but for your convenience there is a one-click button for starting your own server on Heroku (instead of locally on your development machine).
I hope this provides you all the information you need to start generating sessions and tokens dynamically! Let me know how that turns out, and feel free to give feedback on the tutorials as GitHub Issues in those repositories.
We made our own api for airbrake.io in java. This works fine but airbrake is displaying parameters and stacktraces in some kind of Rails style. This is somewhat annoying. Anyone know of similar services made for java?
Example of how data is displayed:
Parameters
{"controller"=>"", "action"=>""}
Stacktrace
/testapp/app/models/user.rb:53:in `public'
/testapp/app/controllers/users_controller.rb:14:in `index'
UPDATE 2015-02-13: This service no longer exists. The GitHub account linked below is gone, as is the company website.
Have you tried using Coalmine https://github.com/coalmine/coalmine_java Its meant to be used with the Coalmine service: https://getcoalmine.com/
I work at Coalmine and we have been using this internally for some time now. We just open sourced the java connector this week and I would be happy to help you get started with it. You can send me an email at brad#builtfromsource.com
Have you tried using http://code.google.com/p/hoptoad/ . It's a little out of date, but it should just need to update an endpoint to http://api.airbrake.io .
A quick google lead me to http://logdigger.com/ which is designed specific for JAVA specific sites.
I work at Airbrake, and I would be happy to work with you to make our site more JAVA friendly. Please get in touch ben#airbrake.io, and I'll see how we can better display java specific information.
Just adding to the others suggested here, but Raygun (http://raygun.io) has first class support for Java.
Read more here: http://raygun.io/java
I work for Mindscape who built Raygun so can answer any questions you may have about it: jd#mindscape.co.nz. We already have a large number of organizations using Raygun with their Java apps, although Raygun does support other platforms (.NET, Node, Rails, PHP, etc)
I have to access a existing SOAP webservice from an Android application. I have been provided some WSDL files describing the webservice. Reading some other answers here on SO, it seems ksoap2-android is the way to go, with respect to which SOAP client to use.
The next issue is then how to generate the Java classes needed from the WSDL files, and this is where I am coming up short. As far as I can see there are the following options:
AXIS2 code generator
WSDL2ksoap
JAX-WS wsimport tool
I initially tried #1, with the AXIS2 eclipse plugin for wsdl2code generator. The wizard did successfully generate a lot of Java code, however it also changed my android project to some kind of webservice project, and I was never able to get anything that was generated to compile, let alone work with ksoap2-android. Has anybody has success with this?
I am not able to run wsdl2ksoap successfully, as it seems to require a running webservice, and all I have at the current point in time is WSDL files. Likewise from reading the webpage, it seems to be a project in its initial stages, and not really ready for prime time.
JAX-WS wsimport I have not had a chance to try yet. However I am unsure if what it generates will work with ksoap2-android?
Question: How can I generate Java files from WSDL files, for use on Android with ksoap2-android SOAP client library?
Thanks a lot in advance.
(PS: Yes, the choice is SOAP, it is suboptimal for Android use, but I cannot change that.)
I found this tool to auto generate wsdl to android code,
http://www.wsdl2code.com/example.aspx
Here is the code:
public void callWebService() {
SampleService srv1 = new SampleService();
Request req = new Request();
req.companyId = "1";
req.userName = "userName";
req.password = "pas";
Response response = srv1.ServiceSample(req);
}
I had similar situation (I had only wsdl file without working webservice). I've used
http://easywsdl.com/
to generate classes for android without any problem. This tool uses ksoap library. The great thing with this tool is that it supports WCF extensions and types like data contract with IsReference attribute or Guid.
My conclusion after quite a bit of researching is that there is no such (mature) tool available, unfortunately. Neither AXIS2 or JAX-WS will work on Android, and WSDL2ksoap is simply too immature for any real use.
However there is a proprietary tool called wsclient++ that will do the job really well. (Read update below, when put to real use, it does not stand the distance at all.) It does not use the ksoap2-android client library, it has it's own.
The client library is a bit crude as it has a hard dependency on the http transport, making (unit) testing a bit complicated. But it can be modified quite easily to allow DI, as the source is available in the distributed jar file.
The wsdl to java generator however works just perfect, and will save us tons of time.
Update
After working with wsclient++ for a while, it is clear that the generated classes are really crude, and does not handle error cases at all. (Every method declares throws Exception).
We are no longer using wsclient++, and I would not recommend anyone to use it!
We have not really found any working alternative, unfortunately. :/
In the end we converted our WSDL files using AXIS2, and then wrote a bunch of custom script to strip and transform the generated java files to something that will build on android using ksoap2-android library. Very hackish, and needs tons of manual labor to run. Unfortunately. If you find a better way, or one comes up, please provide a new answer.
I use Apache CXF tool just to create dto, and i wrote a class to perform a basic unmarshalling based on name of elements
A bit late on this, but there is a ksoap2 stub generator under development, and I successfully used it to create the stubs.
http://ksoap2-stub-gen.sourceforge.net/
Also someone made it availabe as an online service (i.e. you give your WSDL's URL and the service will return a zip file containing the stubs).
http://www.davidgouveia.net/2011/04/online-stub-generator-for-android-applications-using-ksoap2/
I have used for iPhone too some auto-generated classes I wanted to see here too.
wsdl2code is one of the similar what I have used at iPhone. Give an url with wsdl file you will get some classes to download. For me the hardest part it was to download the required parts. It took more than 2 minutes of searching :) ksoap2-android-assembly-3.0.0-jar-with-dependencies.jar needed to download ad drag-and-drop to ADT ( Eclipse) . It is super easy, especially if you have used the counterpart at iPhone. - a similar tool I have used.
However in my case I am not happy at all with the solution, because I see I am using cannon, a set of cannons to shot a sparrow. In my case it should be used a HTTP Post and not including dependencies from other libraries.
To be honest I don't care to much, because once the server side believe we have unlimited battery power and unlimited data plan, than I close my eyes and I don't care about marshaling-unmarshaling overheads, which use the CPU ( battery ) increase the data transmitted over network.
In worse case it should be a JSON + HTTP POST not SOAP for mobiles...
I would suggest to talk at server side guys and explain for they why it will not good if they do 2 click on wizards and we do other click on forms to get the generated code. At least while the application is not a huge one, even than should be budget to optimise for mobile a few interfaces implementations.
I need to create a ticket in BMC Remedy using a Java Code. Can anyone share the java api(get the api's jar file) and some samples to create a ticket using that api in java.
I am unable to understand the answers in the
Create ticket in BMC Remedy via Java
I would suggest looking at the example posted on this page somewhere near the bottom is a working example to create an Incident Ticket using Remedy 7.5. Unfortunately, you must get the api from your Remedy installation, they cannot be given out.
https://communities.bmc.com/communities/message/108563
I have found freely available java doc available on these sites:
7.5: http://www.javasystemsolutions.com/documentation/thirdparty/arapiv75/
7.0: http://www.javasystemsolutions.com/documentation/thirdparty/arapi/
Links to BMC Remedy Java API documentation may be found on this page.
You can apparently access other technical documentation via this page ... but you need to register an account. (Thanks, but no thanks BMC!)