Cant Find my Axis2 Web Service deployed on OpenShift - web-services

I deployed a web service developed using Apache Axis2 on Openshift.
When I try accessing the axis2 index.jsp, I can see the index page which only contains the default Version.
Q:
How do I get to display the web service other web services I created as I can view them on my localhost through the browser in Eclipse?
I have done a few searches online and seen some suggestions as to making adjustments to axis2.xml. In that regard, I have tried changing the contextRoot parameter and the servicePath without no success though I am not too sure if I am making the right changes.
My project structure in Eclipse is shown below:
SieveService
+...
+Java Resources
++src
+++Model
++++some model classes
+++Services
++++SieveServiceService.java
++Libraries
+...
+WebContent
++axis2-web
+++...

I had the same problem and that's occurs because openshift's tomcat server only deploys services in aar format, meanwhile in localhost deploys aar and exploded files too.
You need to create a aar file with your services and put it into your WebContent/WEB-INF/services/ directory. You need to update the services.list file too with the name of your services.
After that you must see your services in your openshift server.

Related

Rest Web Service,

i am approaching the development of Restful web services for the first time. I tried to follow this guide for Netbeans . I am stuck at the testing of the web service.
When i open the
http://localhost:8080/WebServicesTest/test-resbeans.html
page, none of the root resources appears in the left menu. (there should be entities.customer and entities.discountcode)
I really can't find a solution.
Thanks in advance to anyone who likes to give me a hint.
--------------- Edit
If i click on CustomerDB --> Deploy i get an error
In-place deployment at C:\Users\utente\Documents\NetBeansProjects\CustomerDB\build\web
GlassFish Server 4, deploy, null, false
C:\Users\utente\Documents\NetBeansProjects\CustomerDB\nbproject\build-impl.xml:1071:
The module has not been deployed.
See the server log for details.
The line 1071 of build-impl.xml is
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
I checked out the referenced tutorial.
Which exact path did you follow? Did you change anything?
Most likely your CustomerDB application is not deployed correctly (see GlassFish Server output in NetBeans) and thus is not able to expose the web service and thus is not displayed in the test page (nothing visible in the side bar).
I tried the tutorial myself and had that phenomenon when using another database ("test" instead of the sample db, which was not connectable in my installed environment), resulting in a message that "test__pm" resource was not found. I then created a conection pool and a jdbc reosurce for test and then it worked.

How to run appfacotry in local machine?

I have downloaded WSO2 appfacotry and ran it locally for testing purposes. It first gives carbon login and in the running application list I could see the /appmgt jaggery application is running. Then I tried to go to the url through the link provided in Action column in that application list. Initially I was routed to http://{some_ip_address}:9763/appmgt/ and then I was re routed to https://appfactory.example.com:9443/samlsso which gives me error. (because I don't have appfacotry.example.com domain.) How can I run appfactory without this faulty URL?
Here's documentation on installing App Factory: https://docs.wso2.com/display/AF201/Installing+On-Premise
Also, note that there is now a hosted version, which you can use in the cloud with no configuration required: http://wso2.com/cloud/app-cloud/
Other than the 3rd party tools mentioned above, you need App Factory, AS, API manager, Stratos Controller and ELB to have all App Factory features

How to upload multiple WAR files to Tomcat

We been using Tomcat to host our Java Web Services that our PHP website will call.
We have have few environments, meaning we have a few Tomcat Servers. Each time we change a Web Service we have to upload the WAR file to all the Servers. And it becomes a lot of work, for each server uploading one war file at a time.
Is there a way to upload multiple WAR files to Tomcat? And maybe later on I can write a program to do the uploading for us.
Any advice or links that can help, point me in the right direction will be appreciated.
Update
So I did a little more googling and found out that Tomcat allows you to send single request URI. A given example is:
http://localhost:8080/manager/text/deploy?path=/foo
For some reason its not working with me, keeps telling me access denied. Will keep trying
Search the net for this I came across Tcat that has this functionality:
Deploy multiple applications across servers. Rollback bad deployments
1.View complete deployment history
2.Rollback to earlier versions
3.Deploy, undeploy and redeploy multiple applications
Of course this is a paid software...
I found the solution, just copy the WAR files to the \webapps directory in Tomcat.
Windows: C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps
Linux: /var/lib/tomcat7/webapps
Tomcat will deploy the WAR files automatically. If it does not deploy automatically, then try restarting Tomcat.

REST services running on Glassfish

I've developed REST web services using Jersey with NetBeans IDE.
Now I want to provide those services on Glassfish 3.1, without using NetBeans.
I want something like the .aar file that is created when we build web services with Apache Axis2.
Can you tell me how to do it? I have to use the .WAR file, right?
It is something like: http://qallme.sourceforge.net/docs/sec_DeployingAWebService.html ?
Thanks
I could do it by following that tutorial that I've mentioned above.
At first that was not working because of the context-rooton glassfish-web.xml. I had not filled it with the root resource.

Apache ODE BPEL Deployment with a webservice (file transfer)

I'd like to write a axis2 webservice for deploying BPEL Processes on a Apache ODE.
At the moment I have two main issues/questions.
I wrote a simple WS that creates a file.
It works fine in eclipse with a integrated apache tomcat with axis2.
But if I run the service on the exact same server without ecplise it won't work and I get 'Unhandled IOException' Errors, although I have the handling implemented (otherwise ecplise would cry about it all the time).
EDIT: I solved it by not uploading the service.aar with axis2 but putting it in the /webapps folder.
How do I get access to the folder were I need to put the BPEL files?
Is it obligatory that the service runs on the same server as the ODE?
EDIT: Getting access to the folder on the same server is an easy one with 1.
How do I transfer files with a webservice?
Better: How do I implement it?
Regarding 2) you can use the deployment API exposed by ODE. This allows for transfering deployment units (zip files containing BPELs, WSDLs, DDs) via SOAP to ODE and starting the deployment.
The WSDL is available at http://.../processes/DeploymentService?wsdl, on the default installation that would be http://localhost:8080/ode/processes/DeploymentService?wsdl