share business objects between webservice - wso2

I want to expose on wso2 esb or wso2-as a set of webservices sharing
the same business object model.
What is the best way to do it with wso2 and DeveloperStudio ?
Tks
Nicolas

You can put the relevant jar inside CARBON_HOME/repository/components/lib folder.

Just deploy all your services(*.aar or spring service) in wso2AS and keep your libraries in
repository/components/lib folder.
Wso2esb is not used to host services, rather it is used as mediation engine.

Related

Deploying Ruby/Python backend services in WSO2 EI

I have written several webservices in Python and Ruby and would like to integrate them with WSO2 Integration Studio. I tried following the instructions on the docs about sending messages to services here but it's about Java microservices only. Am I supposed to deploy my services elsewhere and only use http endpoints to integrate them? Thank you
You can only copy JAR files to the /wso2/msf4j/deployment/microservices folder and deploy them in the MSF4J profile of WSO2 EI.
Am I supposed to deploy my services elsewhere and only use http endpoints to integrate them?
Yes, This is the way to achieve this.

Creating web service with Developer Studio and create its API with API Manager

I want to create a web service with WSO2 Developer Studio but I don't know which project I have to use. My final goal is to create an API using the WSO2 API Manager and implement it passing the created web service as backend endpoint.
Do I should create an Axis2 web service, a Java Bean, or maybe another artifact?
Thanks and best regards.
Using DevStudio you can built axis2 services and JAX-WS services.
[1] - https://docs.wso2.com/display/DVS370/Creating+an+Axis2+Project
[2] - https://docs.wso2.com/display/DVS370/Creating+JAX-WS+and+JAX-RS+Service+Projects
For api creation in api manager you can do it via the webconsole provided in APIManager
you can use Axi2 web service
1.https://docs.wso2.com/display/DVS320/Creating+an+Axis2+Project
You do not need developerstudio to create a webservice. Webservices can be created using an IDE/IDEA..
You can try the existing samples in WSO2AS and deploy them. Make them as BE services for the APIs which you publish from WSO2APIManager.

WSO2 AS guice integration

I am using WSO2 application server to deploy my web services. I would like to use guice in my project. I have read a maksim blog about axis2 guice integration. He has used web.xml for injection however i do not know how could i change web.xml in wso2 as.
Thanks
You didn't want to change web.xml on WSO2 AS. You can have web.xml on your WS project.
here is complete guide on developing WS and how to deploy on WSO2 AS using WSO2 Developer Studio.
http://wso2.com/library/articles/2012/09/develop-deploy-web-applications-using-wso2-developer-studio/
Using WSO2 DS you can ease your development effort.
There is no much difference. You implement your webservice/webapp. Web.xml is the part of your webapp . Create the war file and deploy that in AS. Keep the dependency jars(guice lib etc ..) in the repository/components/lib folder.

Deploying Different WSO2 product as single carbon application project

I am using WSO2 DSS, ESB and BPS for my project.
They are working fine in respective servers. But my idea is to integrate DSS, ESB & BPS into one car file(or some other deployment archive file) and thus making the deployment easier.
I have a Carbon application project created in Developer studio which has DSS project, ESB Config project, BPEL workflow and a Web application in it.
When I export it, it exports only the ESB & BPS and excludes Web application.
Is there a way to generate one deployment archive which would contain all the mentioned project? And is it possible to deploy a java application in WSO2 server since it has tomcat in it?
Thanks in Advance.
You can deploy webapplications in WSO2 Application server. Refer this. There is a server role which is defined in the server and also in the CAR file for each deployable artifacts. So if you are going to use one server lets say application server with DSS,ESB and BPS installed you need to add DSS's ESB's and BPS's server roles so artifacts which has respective servers role can be deployed in bundled server. Please refer following for server role management.
http://docs.wso2.org/wiki/display/AS510/Introduction+to+Server+Roles
Q>
Is there a way to generate one deployment archive which would contain all the mentioned project?
Ans>> Yes. It is possible. Carbon Application Archive(CAR) file is the single deployable module to package all the above mentioned different artifacts type to a single deployable archive.
You can use either IDE or Maven to generate the CAR file for your artifacts. Please refer to Dev Studio Documentation for more information.
Q> And is it possible to deploy a java application in WSO2 server since it has tomcat in it?
Ans>> You can deploy a Java application in WSO2 Application Server but in order to do that you need to convert your application to a Web-Services since WSO2 provides mechanism to expose your applications as Web Services. For that you can use either Axis2 Web Service or Jax-WS web-Service.
WSO2 Developer Studio supports creation of Axis2 Web-Services as well as Jax-WS web services. Please refer to Axis2 Artifact and Jax-WS Artifact Documentation for more information.
Also if you have a Java based Web-Application, you may deploy that Web-Application in WSO2 Application Server and WSO2 Dev Studio supports implementing Web-Applications as well.
Thanks and Regards,
Harshana

Clustered Web Services

Is possible to do a clustered web service (with JAX-WS), that each node receives automatically the resources? May be with EJBs? If possible, how to do it?
Thanks
We have a 2-node cluster on JBoss 5.1. On these node is deployed a WS via JAX-WS (JbossWS).
In JBoss is very simple to expose an EJB3 class and methods inside as Web Services. You only need to mark with annotations classes and methods you want to expose. All work without any deployment file. You can deploy the JAR file directly! :-)
Please refer to this page for other explanation: JBossWS
I assure you: it works! We have it in production environment...