wso2esb: can I use my own way to build a page that can add new proxy services? - wso2

wso2esb is based on a datasource, at first I thought that the data stored by the datasource contains the proxy service what is added by the wso2esb console, but I didn't find
corresponding data in that database, that is a big trouble for me.
Some users told me that the ui of wso2esb console is too complex and professional, so I want to build new pages that can let them add new proxy services and the methods are based on the original methods of wso2esb;
Is there original codes of method that can help me with this?
I read the source code of wso2esb, but I didn't know how it handle the data from the webpage and how the data user input saved.

As I know, wso2esb deploys service automatically, if you put file in right directory. I advice to create artifact with UI, name it and then search in wso2esb home directory.
For example, directory for services: $CARBON_HOME/repository/deployment/server/synapse-configs/default/proxy-services
Although, I think that creating of UI with similar functionality is very strange idea and could be very hard.

Related

In OTRS, how can ConfigItems be found using Webservices

I am building a website which is supposed to read ConfigItems of an OTRS system for maintenance purposes. So far I can find and use ConfigItems using the Webservice ConfigItem::ConfigItemGet and ConfigItem::ConfigItemSearch.
Sadly I am unable to find the option able to get all ConfigItems linked to a specific one. Is there an existing interface to query linked items or do I have to implement a new one?
Querys are sent from my angularjs website to a nodejs server which prepares the JSONs to interact with the OTRS 4.0.7 Rest interface. I don't need to change item in OTRS.
There is no web service available that returns the linked objects (either tickets or other CI's). It would be able to add this to Kernel/GenericInterface/Operation/ConfigItem/ConfigItemGet.pm but it's not there out of the box.

Creating a New Web Service Consumer Domino

I am trying to import a WSDL in to my Domino Designer 9.0.1 client. I have downloaded the WSDL file and specify it in the Local File part of the wizard.
I click OK and get the error
"The requested operation failed. Server redirected too many times (20)"
I have imported other WSDL's without a problem and the only difference with the one I now need, is that I need to login to see the WSDL.
Does this stop the wizard?
If so, is the only option writing the java agent from scratch to access the data?
Obviously I cannot provide the actual wsdl I am trying to attach to as it is a paid service, so not sure what other information I can provide to help find a solution.
Thanks
Graeme

How do I create a rest web service in Grails?

The idea is to call a method from a website(in php) to my application (in Grails). The application will serve data in json format.
The website and the application are hosted in two different servers. The website is on Yahoo and the application is on Rackspace.
Now, I want to create a web service in my Grails application which serves list of cities in json format.
City Class
class City {
String name
String code
}
How do i write the web service method?
Try the grails jaxrs plugin (https://github.com/krasserm/grails-jaxrs) which will do excactly what you want without any hassle.
Simply install it, create a Resource object with the introduced create-resource command and create and annotate the methods as you wish. all other things are managed by the plugin so you don't have to worry about Controller or UrlMapping...
You need only the annotation #Resource(uri='/cities') on your domain and call the url/cities.json (but, its'n RESTful)
You will want to use a few tools, first you will create a controller that deals with the requests and pushes them off to your service layer.
You can use URL Mappings to make it more RESTFul check out the doc that way all the http methods will be mapped to actions in your controller.
Also if you will be doing a fair bit of json I would recomend starting with the gson plugin it has a fuller feature set then the built in JSON support.
The link from the comment above is a great resource to read as well.
I have found that I most of the time want to support the accept header as well in which case you will need to update your config with the following code. See withFormat doc for more info.
grails.mime.use.accept.header = true

SOAP Web Service basics

am new on WS.
some simple questions in my mind, please try to solve it.
i did a demo WS for Calculator on calculator(), where it has one UI where i enter values for it, internally pass it to WS. Ok i got answer/output. but if i want to create only webservice which take/give xml data or just give xml data. how can i create it.
i found some WS URL's about some fame company. is it used by using by opening Connection. how they define this URL? am using MyEclipse10 when i went to create new WS, needed to use Java Bean class for create it. ok, if i create myWS url then how it ll get call? because it is JavaBean?
and if just want to create WS then i need not required to create New WS client?
i dont know it is simple or may be foolish question, when i walk on WS i stop here. i feel like , without basic knowledge started to build it.
please, clear it.
Thanx.
MyEclipse (as well as Eclipse, IBM D Developer, etc) let you create a Java Web service server in one of two ways:
Bottom up Java Bean: you supply a bean, it turns it into a WSDL (and generates the corresponding stub code)
Top down WSDL: you supply a WSDL, and it generates the corresponding stub code
When a company creates a web page, they set up a web server and publish some HTML pages on it.
When a company publishes a WSDL, they also set up a web server ... and publish an XML WSDL on it.
The URL you go to in order to read a WSDL is just an ordinary HTTP web server, that happens to be serving an XML WSDL at that location.
The WSDL specifies where the service can be found, and what operations and data types the service uses. A WSDL you create, or a WSDL that's published by some other company.
'Hope that helps

Could I upload a file through a web service?

I want my customers to upload some file to my server. My current design is as below:
I make a folder on my server with R/W permission to Anonymous user like this: http://myserver/uploads
Customer contact my web service to indicate they want to upload something, and the webservice returned a path like this: http://myserver/uploads/xxx-xxx-xxx-xxx, the xxx part is a GUID.
But I don't know what to do next? I believe customer has the permission to write to the virtual path returned by the web service, but how could I write my client-side code so that it can actually copy things to that virtual path? My client-side is a Win32 application, not a web page.
What if I want the customer upload files within a web page, how to do that? I know that there's a "PUT" method in HTTP protocol that could be used to upload things to server, but how to use that?
I am new to this kind of web development. I hope I made myself clear. If there's any better design, please let me know.
Many many thanks.
Update - 1 - 0:59 2010/12/27
A similar question: How to upload a file to a WCF Service?
Some possible solutions:
Image Upload Web Service in C#.NET
Upload any type of File through a C# Web Service
Progress Indication while Uploading/Downloading Files using WCF
I would avoid allowing anyone to write files to a directory. I know you have set up permissions to help guard against anything bad happening, but it is still setup to where anyone can read/write to it, not just to person you've told the URL to. Security through obscurity is not a best practice.
What kind of webservice are you using? WCF, SOAP, something else all together? I would have the file upload still be a service call (not just some PUT command to a directory). That way you can still apply security if needed. When you get right down to it, a file is nothing more than an array of bytes, so you can have your web service accept an array of bytes and write it out to the correct location. If I had a better idea of what technologies you are using (php, asp.net, jsp, etc) Then I might be able to make more precise recommendations.
HTH
You can use SOAP attachments, or if not using SOAP, something similar - specifying filename, content type and binary data, Base64-encoded.