Simple WSO2 ESB Soap interface - wso2

Myself: New to WSO2, Evaluating multiple ESB products
Here is what I am trying to do with wso2 ESB
Application "A" will send a zipcode (SOAP-WDSL) to WSO2-ESB
WSo2 will use that zip-code and query National WeatherService and obtain
the Lati-Long for zipcode
LatLonListZipCode method at
http://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl
Return the lat-Lon to Application "A"
Would someone please guide me , like where to start and the components needed so forth?
I am kind of confused by all the terminologies and over complicated product names and hierarchy (carbon, oxygen so forth)

For your requirement what you simply need is to create a Proxy service in WSO2 ESB to invoke this Backend service. (National WeatherService)
If you want to get started with WSO2 ESB I recommend you to 1st go though. WSO2 ESB Sample guide and WSO2 ESB Configuration. Where you can get a head start using that.
For your scenario you can simply follow the below steps to create a simple WSDL Proxy create a working scenario which you can later improve (ex with routing , monitoring etc..)
1) Login to WSO2 ESB.
2) Go to Proxy Service Adding Section
3) Select WSDL Based Proxy as the Template
4) Give a Proxy name , WSDL url , Service name (ndfdXML) , WSDL Port (ndfdXMLPort) and tick Publish Same Service Contract
And create the service.
Now you have exposed the same service though WSO2 ESB. You can go to service list section.Get the Service EPR details and invoke the service using your application.

Below is a nice work done for beginners. Someting similar to your case
http://dakshithar.blogspot.com/2012/07/routing-and-service-chaining-with-wso2.html

Related

WSO2 EntitlementPolicyAdminService using Rest API

I have using WSO2 identity server,but i have facing problem for Policy creation,
because this is available in XACML Poliicy.
Document :
https://docs.wso2.com/display/IS570/Entitlement+with+APIs#EntitlementwithAPIs-publishToPDP()
any plugin any anything available for convert to REST API?
Yes there is no straight forward way to utilize PAP operations in REST way. But there are couple of alternate solutions.
If you are good in WSO2 EI (previously WSO2 ESB) you can use SOAP to REST transformation as per [1]
You can write your own java component as JAX-RS service in WSO2 Identity Server [2]
[1]https://docs.wso2.com/display/EI600/Using+REST+with+a+Proxy+Service#UsingRESTwithaProxyService-RESTClientandSOAPService
[2]https://wso2.com/library/articles/2016/10/article-exposing-wso2-identity-server-admin-services-the-rest-way/

WSO2 API Manager & Web Service composition

Here's the scenario,
WS_A and WS_B are Web Services published in different endpoints.
WS_A receives personId, makes some processing, logs some data, and returns the name and the lastname of the Person with personId.
WS_B receives two Strings name and lastname and saves name+lastname in a database, then returns Ok/Error.
I need to publish an API API_Composition, using WSO2 API Manager, that will call WS_A, and send the result to WS_B, then return the result of WS_B.
Keep in mind that i can't make a new WS_C that has the behaviour of WS_A+WS_B, because i can't access the whole code of any of them.
Is there a way of doing this using only WSO2 API Manager?
Are there any other API Management products that can accomplish this requirement?
Regards
Yes, you can do this with mediator sequence. I have not found a specific tutorial for your scenario, but here's a blog post that has a demo on using mediator sequences and links to detailed documentation.
(Note: the demo and blog post are for WSO2 API Cloud - the hosted version of WSO2 API Manager. But it all works the same for API Manager - it is the same technology.)

Do I need any other wso2 product or ESB is just fine?

I'm working on a master's degree project which the main goal is wso2 study.
Through wso2 I need to be able to:
Do protocol Bridging (eg: rest to soap);
Apply data transformation (apply xslt on xml);
Content based routing;
Load balancing;
Create authentication and authorization layer to legacy services (authentication via oauth 1.0a);
Exception shielding;
Service monitoring;
Services lifecycle control;
So, my question is: do I need any other wso2 product, or ESB is just fine? For example to implement the security layer and all the load balance stuff do I need to add wso2 identity server and wso2 elastic load balancer?
Or even more: do I need to extend the esb by writing custom code to solve any of this issues? In which cases extend the esb is the only way to go?
I hope to do not be naive trying to solve all this complicated issues, but I'm kinda lost on this big swiss knife that wso2 is.
Thanks
Please find my answer..
Do protocol Bridging (eg: rest to soap ---> ESB
Apply data transformation (apply xslt on xml) ----> ESB
Content based routing ----> ESB
Load balancing ---> ESB can be used. But i prefer Apache HTTP and Nginx. They are more intended for that purpose
Create authentication and authorization layer to legacy services (authentication via oauth 1.0a) --> ESB can be used. But you need an OAuth2 Authorization server for token validation. Also, XACML PDP for policy validation. Both are available with Identity Server. According to the Carbon, you can install those features with ESB as well. But it is not recommended much. Please see more details from here
Exception shielding ---> ESB
Service monitoring ----> ESB can be used. But if more, you can use BAM
Services lifecycle control ---> ESB can be used. If needed more, you can install G-reg features
I think. It is only enough to use WSO2 ESB and WSO2 IS for this purpose. Sometime you may need to write some code. But it is easy as there are lot of samples are available freely.

WSO2 Identity Server REST and SOAP call

WSO2 Identity Server : I am new to WSO2 Identity Server. Could somebody help to get list of REST call and soap call supported by WSO2 Identity Server
This blog post has an example of using WSO2-IS APIs.
Take a look at the answer to the following question also. WSO2 identity server api
WSO2 products are manage internally SOAP web services known as admin services. The admin service wsdl as bellow.
https://localhost:9443/services/UserAdmin?wsdl
Note: you cannot view the wsdl of admin service by default due to security reason. Configure the following steps to enable and invoke the admin service wsdl.
Set the <HideAdminServiceWSDLs> element to false in <IS_HOME>/repository/conf/carbon.xml file.
<HideAdminServiceWSDLs>false</HideAdminServiceWSDL>
Restart the server.
Also you can use OSGi console to get the list of SOAP Services exposed in Identity Server and view the available service components details. To enable osgi console doing following steps.
Get osgi console by executing the following command.
<IS_Home>/bin/wso2server.bat –DosgiConsole
After successfully started the server press ‘Enter’ key and osgi>console will be displayed.
To get all admin services that are deployed on this server.
osgi> listAdminServices
List down all hidden services that are deployed on this server.
osgi>listHiddenServices
All services expose Web Service APIs which can be used for to gain access to back end functionality.

Use specific system user for wso2 esb service invocation

I am going to have a web portal from which I will be calling services with "UsernameToken" security.
For authentication purposes I would like to create a system user in the wso2 Identity Server, so that I can use it to call the services from the ESB. So basically, I want to request a token for the system user from the WSO2 Identity Server and use it to authenticate infront WSO2 ESB so I can call the services.
I plan to use the AuthenticationAdmin and UserAdmin services for the authentication.
Is this scenario possible? If not what would be a good way to achieve similar scenario?
If I understood your requirement properly, I assume, you're trying to call a set of backend services via WSO2 ESB having "UsernameToken" as the authentication pattern. If that's so, then I don't see any requirement for you to use WSO2 IS for user creation, unless you're planning to do much deeper Identity Management.(You can still use it but I consider it as sort of an overhead given the fact that you just want to create the users there in WSO2 IS). For this, you can use the user management capabilities embedded in the WSO2 ESB (or in any other WSO2 product). What you would simply have to do is, create a user at the ESB level and use those credentials to call the backend services via the ESB.
Hope this helps.
Regards,
Prabath