invoking wso2 admin services using wsdl2java - wso2-api-manager

I have a web application from which i have to invoke a WSO2 Admin service..
I am following this https://docs.wso2.com/display/IS570/Calling+Admin+Services
When I used wsdl2java , I got a zip file...When i opened it , it has just a pom.xml..
How can i use this? My web app is using Maven itself..But no clue how to use this pom.xml and invoke admin service? How to generate stub out of this pom.xml?

Once you build it with maven client stubs will be generated. See [1] as a sample. Any way client stubs are already available in nexus for released products.
EX: If I want to use client stubs for ChallengeQuestionManagementAdminService I can do it by adding maven dependency
<dependency>
<groupId>org.wso2.carbon.identity.governance</groupId>
<artifactId>org.wso2.carbon.identity.recovery.stub</artifactId>
<version>xxx</version>
</dependency>
[1] https://github.com/wso2-extensions/identity-governance/tree/master/service-stubs/identity/org.wso2.carbon.identity.recovery.stub

Related

How to synchronize apis to external system

I have deployed WSO2 API manager4.0.0 All-in-one on my vms.
They are working fine.
Now ,there is a external system of my company , wants to get all apis from wso2apimanager, the apis will list in their system, and they want to invoke wso2 apis from their system.
Anyone can guide me?
You can export APIs using the apictl command line tool as in [1]. But these projects are only readonly from the WSO2 API Manager. You can use the Swagger definitions and host them in a 3rd party system.
[1] - https://apim.docs.wso2.com/en/latest/install-and-setup/setup/api-controller/ci-cd-with-wso2-api-management/

Publish pacts to a pact broker using maven plugin

I was able to generate a pact file and then verify it using the maven plugin. Now, I am trying to publish the pacts using a pact broker.
What I have done so far is based on the below link-
https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-maven#publishing-pact-files-to-a-pact-broker-version-320
<plugin>
<groupId>au.com.dius</groupId>
<artifactId>pact-jvm-provider-maven_2.11</artifactId>
<version>3.5.5</version>
<configuration>
<pactDirectory>target/pacts</pactDirectory> <!-- Defaults to ${project.build.directory}/pacts -->
<pactBrokerUrl>http://<localIP>:80</pactBrokerUrl>
<projectVersion>1.0.100</projectVersion> <!-- Defaults to ${project.version} -->
<trimSnapshot>true</trimSnapshot> <!-- Defaults to false -->
</configuration>
</plugin>
The question I have here is how do I generate the pactBrokerUrl? Does this involve using the dockerized image of the pact broker as stated here? https://github.com/DiUS/pact_broker-docker Or can I just use the Pact Broker Maven plugin by warmuuh?
you need to install the pact broker in a container as explained in the link in your question. the URL is the IP where the broker is installed. Also you need to use the maven plugin to callout your broker url.
PACT Broker required to publish PACT file generated by consumer, I have answered the PACT Broker config info for other question, https://stackoverflow.com/a/62300089/3056361

WSO2 API Manager UserInformationRecoveryService is not listed in admin services

I am trying to setup WSO2 API Manager version 2.
I wanted to send an email for user activation. After going through documentation and blogs I came to know that I need UserInformationRecoveryService.
But when I start my WSO2 API Manager with OSGI console flag to run listAdminServices command, in the list I could not get the name ad url for UserInformationRecoveryService.
Can someone guide me on how to install this service in WSO2 API Manager version 2?
Thanks in advance.
Yes, UserInformationRecoveryService is not included by default in API Manager. You need to install that feature. Please refer this article [1].

where can i find wso2 jars to import into my program

I have been trying to follow the example at http://xacmlinfo.com/2011/12/18/writing-jdbc-pip-module/ in order to create a pip for the wso2 identity server and I cannot get it to work because I cannot import wso2 jars. I have tried using maven to build the projects thinking that maven would automatically download the necessary dependencies but it does not. could anyone please tell me were I could get the wso2 jars or point me in the right direction in order to be able to compile wso2 java programs. thank you
hey guys I figured it out, the packages for wso2 identity server programming are shipped with identity server. they are located in IS_HOME\repository\components\plugins. thanks guys for your help
All the released wso2 jars are hosted in wso2-nexus repository. You can simply add wso2-nexus under repositories for your app to download the wso2 released jars.
Following would help
<repository>
<id>wso2-nexus</id>
<name>WSO2 internal Repository</name>
<url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
</repository>

Deploy an Application on Cloud Foundry Server

One problem was occurred when I did deploy the applications
to Cloud Foundry with STS(SpringSource Tool Suite). My deployment procedure as flowing:
1:After the Cloud Foundry was completely installed, Clicked YES to restart STS.
Select Window > Show View > Servers
2:Right-click in the Servers panel and choose New > Server
Expand the VMware folder, select Cloud Foudry,and Click Next.
3:In this step, I choose VMware Cloud Foundry, and type in user account and password which
I was signed in the Cloud Foundry website.
4:Click finsh to establish the Cloud Foundry servers.
5:To deploy an application, drag it to the target Cloud Foundry Server. Right click the target Cloud Foundry Server, choose Add and Removeļ¼Œa problem was occurred at this moment. Therewas no available application to deploy on the Cloud Foundry Server,I had built some Java projects.
I tried server methods to solve the problem,unfortunately ,I was failed, if any help from you?
You can only deploy certain kinds of java projects to cloud foundry. Inside STS, only Grails, Spring, Roo, and web projects are recognized.
If you want to try something, then create a spring template project: File -> New -> Spring Template Project, then choose a template. Spring MVC is probably a good choice.
Cloud Foundry STS plugin is one way to push your apps to cloudfoundry.com
You can also use the CLI tool called vmc.
For installation and how to use the tool, please visit:
http://docs.cloudfoundry.com/tools/vmc/installing-vmc.html

Resources