Consuming a web service with the Netbeans Platform - web-services

I have an application that is written with the NetBeans Platform 5.5. I'm having trouble consuming a web service.
If I create a Java SE application in NetBeans, I can add a web service reference without problem.
Since my application is using the NetBeans Platform, many of the menu choices change. So, I cannot figure out how to add a reference to the web service. I've googled this topic a number of ways but haven't found any pages that deal with consuming a service through the platform. They all talk about consuming a service with a Java SE application.
Changing the application from the Platform architecture is not an option.

Here is a good tutorial for setting up a Feed Reader on NetBeans Platform. It covers some of the configuration issues for using web services
Blog with an entry about making a web services client
I'd be happy to try and give you a more specific answer if you can give information about the service you want to access.

Found this:
Create web service and client using this tutorial
Create library wrapper module for web service client (you don't need to include JAX-WS libs, only your client jar)
In your wrapper module add following dependencies (important):
JAX-WS 2.1 API
JAX-WS 2.1 and JAXB 2.1 Library (for this you have to check Show Non-API Modules in "Add Module Dependency" window)
If you try to build module after these steps it will fail telling you that your module is not friend of "path-to-netbeans"/java2/modules/org-netbeans-modules-websvc-jaxws21.jar.
Right click on JAX-WS 2.1 and JAXB 2.1 Library and choose Edit. Select Implementation Version.
from here.

Related

Change default container in scalatra web application in eclipse

I am a total beginner with developing in scalatra, eclipse, sbt, web services, etc...coming from a proprietary SAP Abap world where everything is different. Recently I found interest in developing in scala and SAP opens its SAP Cloud Platform, so I tried some tutorials to create some very simple web applications.
I could manage to create the sample tutorial with scalatra and sbt.
Scalatra includes Jetty as a default container.
I want to use Eclipse as SAP uses it as a standard development environment. I managed also to install the sbt-eclipse plugin and could import the project into the eclipse environment.
But now I'm stuck.
How can I change the web-container (server) to Tomcat which is installed locally in my eclipse environment?
It is a Scala project, so I cannot use the option which is available in a J2EE project to define the Target Runtime Environment in the properties.
Ultimately I would like to deploy it to my Hana trial account at SAP Cloud Platform. Any hint is appreciated.

Having RESTful service in RCP application

We have an existing eclipse RCP application that works as a standalone product. At a high level, this product is used to configure a image specification using its UI and we can export a sample Image based on these configuration.
Now we are developing another web application that has several modules and one module of it is to develop something that our eclipse RCP application does.
Just to provide a QUICK integration of the RCP application for demo purpose, I plan to run the RCP application separately in the server machine and expose its static functionality as a RESTful webservice. So the module shall make a RESTful call to the RCP application.
Now just to begin with I tried to embed a jetty server for hosting the REST service during the start of RCP application like below
But the thing is after the Jetty server is started I am not able to access the TestWebService using the path i configured. So I am confused if this is the right approach to have a RESTful service inside a RCP application. Please note that iam able to hit the server with http://localhost:1002, but not the service.
Following is the console log when i hit on http://localhost:1002/hello/test:
It's a really weird architecture you're experimenting with.
I mean to write an RCP-application which listens on a port and offers REST services on it; this could lead to further obstacles.
Instead I would seperate it into two software artifacts: an RCP-app and a web-application (.war).
You could extract a business-logic jar (It can be an OSGi plug-in if necessary) contaning your image manipulation logic.
Then include this plug-in/.jar as a dependency in the webapp and offer out it's functionalities thru a Web-container (Tomcat, GlassFish, etc.)
So your other (third) application will connect to the Web-services offered by this .war file.
opt.1) If you need a single running instance (because of database or other shared resource) then your RCP-app will have to use this REST service too.
opt.2) If not then simple compile the .jar/plug-in containing the business-logic into your RCP-app.

Migrate a BEA 8.1 Web Service project to Eclipse

I have a kind of a "giant" web service built with SOAP, EJB 2.1 and we use BEA WebLogic Platform 8.1 as IDE.
It is a critical web service, used by different countries and it access more than 15 data sources to generate a XML with some information.
We want to migrate the application to use a better IDE for development like Eclipse, and we also want to use a dependency managment tool like maven and add a dependency injection framework like Spring.
The project is divided in a main web service project and some other project with EJB 2.1 used to extract information of some data sources.
What would be the best way to migrate this project, without breaking the interface(wsdl) of the web service?
Any help or hint is welcome.

Objects and web-services in jBPM

Is it possible to consume web-services and/or use own libraries (and thus custom objects) into a jBPM workflow? Eventually, could I expose this process as (another) web-service?
You can use web services in jBPM, at least in version 5 and 6. I believe the tooling support in eclipse is minimal or non-existent however. Don't know about the support in web console. See Maciej's blog for details on that.
It is possible to use custom objects and own libraries in jBPM. You just have to make the libraries available to the jBPM runtime. If you're using your own application where you run jBPM, just include the libraries in the CLASSPATH. For the jBPM console, you will have to include the libraries in the lib/ directory of the war, or inside WEB-INF/classes if you have .class files.
Not sure if there is out of the box support for exposing jBPM services over web service. If all you want to do is orchestrate other web services and expose yourself as a web service, you could consider using a BPEL engine rather, like Apache ODE
jBPM can call web services and contain custom libraries. A jBPM project is a Maven project, so you can add dependencies to your POM to include custom libraries. You can call web services or execute any custom Java code you want by creating a "Domain-specific process." There is an example in the documentation about how to do that: http://docs.jboss.org/jbpm/v6.0.1/userguide/jBPMDomainSpecificProcesses.html
Also, if you deploy your projects into the jBPM web console, they can be started and controlled by a REST API. So yes, they are exposed as a REST web service. See this page in the documentation about the REST API: http://docs.jboss.org/jbpm/v6.0.1/userguide/jBPMRemoteAPI.html
For example, the following REST call can initiate a process (taken from the link above):
[POST] /runtime/{deploymentId}/process/{processDefId}/start

Another WSDL importer for Delphi?

Delphi(6-7-2005-2007-2009) Wsdl Importer is badly :(
i'm looking another wsdl importer for delphi. (like Web Service Toolkit For Lazarus)
anybody know ?
Did you get the version from here, I had some problems with D7, I got the link from Babet.
The Free Pascal Web Service Toolkit seems to support Delphi as well:
"Web Service Toolkit” is a web services package for FPC, Lazarus and
Delphi; “Web Service Toolkit” is meant to ease web services
consumption and creation by FPC, Lazarus and Delphi users.
It includes a WSDL importer wizard and a command-line importer:
http://wiki.lazarus.freepascal.org/images/2/24/Wst_lazarus_importer.PNG
And a graphical type library editor:
http://wiki.lazarus.freepascal.org/images/0/0a/Wst_type_lib_edtr.PNG