Can anyone recommend a good (preferably open source) tool for creating WSDL files for some soap web services?
I've tried playing around with some of the eclipse plug ins available and was less than impressed with what I found.
As mentioned above, probably the easiest thing to do is use Apache CXF or Apache Axis2 to automatically generate your WSDL for you.
If you have downloaded the Java EE version of Eclipse, you should be able to create a Dynamic Web Project with the Axis2 facets. If you create a simple Java class in the project, you should be able to right-click on it, and choose Web Services->Create Web Service. That should automatically create an Axis2 service for you.
WSDL would then be available from some URL like: http://localhost/axis/{yourservice}?WSDL
One of the more interesting tools for bypassing all the associated headaches with WSDL is the XSLT script created by Arjen Poutsma (the lead developer of Spring Web Services):
http://blog.springframework.com/arjen/archives/2006/07/27/xslt-that-transforms-from-xsd-to-wsdl/
Basically it allows you to develop simple schemas that correspond to your desired operations (i.e. <BuyItem> and <BuyItemResponse>) and then generate all the associated WSDL crap from the XSD. I highly recommend it if you are interested in 'contract-first' web-services but the idea of using a WSDL as the starting point for that contract makes you feel green.
I am tired of generating massive amounts of files on the filesystem just to transport over SOAP. Now I use Apache CXF for both WS producers and consumers and let it handle the WSDL/stubs generation dynamically.
Depends on which language you're working in, but if you're active in Java then I'd recommend looking at Apache CXF. It's a pretty solid framework for publishing java code as a SOAP web service. It also includes a tool for directly generating WSDL files: java2wsdl
Nice tool can be found as SAAS solution at www.cofiq.com. Its strong point is the datamodel repository from which WSDL and REST JSON can be generated and impact analysis on datamodel changes.
Related
I create a Editor gwt project, which works fine.
Now I want to connect the editor's data to a db, so I use a 3rd party database helper tool for that.
I added the db tool jar into my gwt project, no complaint. I also wrote the db related codes using this tool.
But I just can't run my gwt project in the web page.
The error info in gwt console for my web browser is can't find the source/.xml for the db helper tool, at least something like that.
How can I manage this?
Thanks
You have to use the DB-Tool on the server-side of the code and retrieve the data to the client via an RPC!
See: https://developers.google.com/web-toolkit/doc/latest/tutorial/RPC
We have ".sar"(Service Archive file) used in jboss. Currently we are planning to migrate the code to Weblogic.
Is there a way to deploy .sar files into weblogic.
If not directly possible, is there a work around where we can deploy the services on web logic.
In order to get the custom mbeans that are in the .sar you will need to repackage the contents as an .ear as a .sar is not standard Java EE deployment mechanism - that is a JBoss proprietary archive.
Here are some instructions on how to create, package and deploy your own service MBeans (JMX Beans) along with an example of how to use it.
https://blogs.oracle.com/WebLogicServer/entry/developing_custom_mbeans_to_ma
One thing you could do is to "substitute" or "emulate" the SAR Deployer, by creating, configuring and registering MBeans. That, AFAIK, could be done in two ways:
1) Using Standard Java EE components: that means on web tier you can use the init() method of a servlet (make sure that it is preloaded on startup) or, better, a ServletContextListener
2) Using WebLogic specific components. I'm talking about Startup classes. Simply register a startup class that creates, configures and registers your MBeans.
If you are using a web module, the first approach has the obvious advantage that you are using pure Java EE components. Although you are not using that, you can add a "dummy" web module only for doing that
Concerning what you have to do in those classes, you can choose a "from scratch" approach, by parsing the xml files that describe services and therefore manually create, configure and register MBeans or, if I remember well, the XMBeans from JBoss is something that can be reused outside JBoss but you need to check because I'm not sure
IDEA allow to find bean definition, declared in xml, right from Java code. For example if I've got interface SomeIntrfaceImpl IDEA allow me to find out instances of SomeIntrfaceImpl in .xml contextes files, pointing me to .xml file to line of code where bean is created
Is there any Eclipse plugin, that allow me to do the same ?
Yes there is different Eclipse provided by SpringFramework makers itself. They have extended the eclipse to provide easy development for Spring web application and other products like Spring ROO also.
Its is called SpringSourceToolSuit. You can download its latest version from here after providing some basic information about you asked in a form there.
Its the best IDE to develop Spring applications. I am currently using it.
Hope this helps you. Cheers.
I am developing a client/server application currently, where the server consists of a RESTful interface (jersey) and the client is a JSF application. Both are running on a glassfish 3.1.1 server. To persist some data and produce XML output I created a domain model with JAXB and JPA (eclipselink) annotations. Everything is fine, as long as the domain classes are within the server project.
But I want to define the domain model in an external project, so that it can be used by the client (xml -> object) and the REST server (object -> xml) by referencing its *.jar.
I alread achieved, that the JPA works correctly on the server, but the JAXB functionality has been "removed".
I am very new to the Java EE stack.. maybe I am packaging in a wrong way. Would be very happy, if someone could give me a hint :-)
Ok, it worked after setting the following project facets:
Java
JAXB
JPA
Uitility Module
After that: adding to build path and setting a project reference...
I wanted to know if a new project in eclipse we could import the jar Alfresco and used for example by creating just a jsp with a field of research that would seek a metadata ..?
Thank you.
I think you got it wrong. Alfresco is not library you import to your project. Alfresco is a complete Enterprise Content Management system. For more information visit http://wiki.alfresco.com/wiki/Main_Page
But I wish it was that simple.
I think this way to do it:
Install alfresco from scratch... as standalone project.
Then develop a webscript using the Alfresco Web Script API, that allows you to create a restful service. Your web script can preform lucene queries to search metadata.
Create your jsp form.
Then you can use Ajax to get data from your restful service.