How to deploy Car and bar file programatically in wso2 - wso2

In wso2 how to deploy .car file in case of ESB and .bar in case of BPMN programatically. Is there any way of using remote deployment option programmatically(using JAVA).

You can use the admin services which are exposed as SOAP services to achieve the requirement. For example, you can use bellow endpoint to deploy Carbon Application(car file).
https://{esb-host-name}:{esb-management-console-port}/services/CarbonAppUploader
Also for BPMN(bar file), you can use bellow endpoint.
https://{bps-host-name}:{bps-management-console-port}/services/BPMNUploaderService
The blog post [1] will help to understand the flow.

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 UES service registering method

I am getting my hands on WSO2 UES server. I wrote an jaggery dashboard app and working fine. When porting the jaggery app to another UES server i have to manually register for the SAML sso. After manually configuring i am able to access. Is there any way to automate this?
Yes, you can configure to automate this. Go to /repository/conf/ and in the file sso-idp-config.xml add following configuration.
<ServiceProvider>
<Issuer>MyApp</Issuer>
<AssertionConsumerService>http://x.x.x.x:9763/MyApp/sso.jag</AssertionConsumerService>
<CustomLoginPage>ssoApp/login_processor.jag</CustomLoginPage>
</ServiceProvider>
But this is not recommended at all.

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

Is there a way to clone the deployed data service on the WSO2 DSS

I created a data web service on the WSO2 Data Services server, now I would like to use it as a template so I can create more services out of it.
Is there a way to copy/paste the service XML to a new one?
I would like to skip the wizard mode creation.
Go to service Dashboard and there you have "edit data service (xml edit)" option available. That can be reused to create similar services. create a .dbs file out of that xml content and deploy through upload data service option in the management console (Change the data service's name). Following link would be useful.
[1] http://docs.wso2.org/wiki/display/DSS301/Work-In-Progress+Service