I have some external URL (restful api) to be integrated.
Those URL have different prefixed URL with different parameter at url, for example:
www.abc.com/books
www.abc.com/book/11
www.abc.com/book/11/authors
When get response from those invocation, esb needs to convert response from one json format to our standard json format.
I plan to use esb javascript mediator to perform convert operation, but I didn't find any way to attach url parameters.
Any one have any idea?
I have used mediator by java code to implement it, but it is too heavy.
I am also looking into connector for another option.
I have got a solution by use url template. By this solution, I can change url according to template defined.
With this solution, I didn't need to write mediator or connector.
Related
I am trying to use Jmeter for performance testing of a WPF app that uses WCF Web Service. I see that the service is using msbin1 encoding format. Hence i am no able to make out what the request parameters are. How to handle this in Jmeter
In order to make the request you need to just add HTTP Header Manager and configure it to send Content-Type header with the value of soap-msbin1. In order to send the actual payload you can use i.e. HTTP Raw Request sampler.
If you need extended functionality, i.e. to be able to build requests from text and perform correlation of responses you will have to use the code from WCF-Binary-SOAP-Plug-In in JSR223 Test Elements and perform payload encoding/decoding using Groovy language
My requirement is I will expose the ESB integration implementation as a REST API.
1) In the implementation part whenever they will call This ESB API it has to route based on content in the post request sent to ESB(this can be achieved by content based routing pattern ).
2) But on the Endpoint side Which is to be called by the ESB while routing based on content may vary means, if today there is 2 end point to call tomorrow it may rise to 5 like that how to apply changes are is there any solution. So, how to achieve this dynamic integration.
I have 4 ways to achieve this integration pattern.
1) Deploy files in the registry which has the endpoint in it and having the file name which is same as the content name(regex) sent in the payload for routing. Then by storing that name in property mediator and use concat function to read that file in another property mediator, and by pattern matching read the endpoint. Thus you can use that endpoint and achieve the dynamic content based routing.
2) Have separate sequence each one to call one endpoint and have the same name as the content name. The main sequence will call the sequence based on the content.
3)Store the content on which to be routed and endpoint in the RDBMS database then use DB lookup mediator to retrieve the endpoint based on this you can route.
4) I think this is best and suitable for integration scenario where tomorrow the endpoint may change( that is when the number of the endpoint is not fixed ) and each endpoint wants a different transformation of the payload(I mean XML to json or JSON to XML etc..).
First, use one API and store the content in property mediator and use that mediator to call another API which has the implementation to call the endpoint.
For example, if the content based on which routing has to happen has the payload like this
{ "content":"c1" }
Store the content in property mediator using name uri.var.address. Then create another API's which will have the implementation to call endpoint(For each endpoint create separate API's) and URI-Template of the API's should have content stored in the property mediator(same as payload request). While using send mediator to call these ENDPOINT implemented API's use http request having url of the API with /{uri.var.address} because to match the URI-template details.
I am trying to call an operation on WSO2 DSS server, the following URL works fine:
https://localhost:9443/services/TestData/testOperation?text=Test
But this one doesn't:
https://localhost:9443/services/TestData/testOperation%3Ftext=Test
Is there an option to accept this kind of URL?
This is not supported.
'?' is used to separate query parameters from the rest of the URL. When '?' is replaced with its URL encoded value, there will be no way to identify the existence of query parameters.
I am looking to change the structure of the URL generated by the WSO2 API Manager for a defined service by switching the position of the version number. For example, the default for a service is
http://localhost:8020/some_service/1.0.0
however, I would prefer to have it as
http://localhost:8020/1.0.0/some_service/
My 2cts; you could put Apache with mod-proxy and mod-rewrite module or HAProxy in front of WSO2 AM and user rewrite rules on the URL's.
That URL format is fixed one and generally that is the URL format is followed. If you like to change the format, there is no way, but you can define the version with context and make a preferred url pattern. But again version must be filled.
I am working on web services POC. I need to develop a Spring-based web services, that use XML/HTTP i.e. HTTP binding (NOT SOAP/HTTP) so that I can invoke a web-service with URL parameters like the one example described in the WSDL specification especially a GET with query parameters.
I am unable to map the URL's query-parameter to the end-point's (#EndPoint) method parameter.
Is it possible to develop such a web-service (XML/HTTP bound) with spring-ws?
Is it possible to invoke such a service with GET request + query string?
Let me know for any such examples/tutorials.
Please take a look at this page (http://static.springsource.org/spring/docs/3.0.0.M3/spring-framework-reference/html/ch18s02.html). Assuming that you are using spring 3, I believe you should find some relief there.
Based your question, I assume you already have the DispatcherServlet declared and mapped in web.xml. The trick, then, is to pull out the arguments. The page indicates how to pull arguments from both the URL (which I believe is your goal) and from the request body.
Good luck and write back if anything is unclear.