Call http web service from siddhi file - wso2

I need to call a web service from my siddhi file.
in my case isn't important waiting the response, i would call external http service and stop.
I have tried with http(sink) and http-request(sink) like doc:
https://wso2-extensions.github.io/siddhi-io-http/api/2.0.5/#http-sink
Someone can help me?

You will have to use HTTP sink if you want to do a fire and forget request. This testcase will help you in writing one. Also please refer this SO question. It is for making a SOAP request using HTTP sink.

Related

User defined log files for SOAP requests and Responses in Websphere 8

I have a Soap based web services running in websphere 8. Since we have he trace.log, which have the Webservices request and response XML. I am trying to log it to a different file apart from trace.log.
To be very precise, If my service is HelloWorldService. I would like to log the SOAP requests in service_helloworld.log. I have defined the appenders and loggers in log 4j already. But I am looking into a way where I could configure websphere to redirect the webservices traces to that file.
I still could write a interceptor, but I am trying it in websphere configs. Please help
I don't know if you still have that problem... But I had the same one and I just fix it implementing a GenericHandler that interceps the request/response.
Take a look:
http://www.ibm.com/developerworks/websphere/library/techarticles/0511_phung-lu/0511_phung-lu.html

How to pass collection<?> over JAX-WS web service

In my project I need to write a web service which will receive Collection<?> as a parameter.. I am using apache CXF.. After I have written the service method I am unable to test it using SOAP UI (It is not generating any request).. My question is - Is it possible to receive Collection<?> over web service? I need to receive Collection of any object type.. Please help..
You need to work directly with SOAP messages.

WSO2-ESB: SOAP Mediator from wsdl

I have seen some of the SOAP- Example- Mediators. I have not found a transformation based on the endpoint-WSDL.
I want to send some nested named array in json or POX and that data should go into a complete namespaced headered (username, password) SOAP-Request based on the names.
All the examples I have found had either a very simple wsdl or the namespaces were static in the XSL-Transformation.
It should be possible to do that, as I see in for example php-NuSOAP. You feed it with a wsdl-endpoint, the operation you want to execute and the parameter-array, and it calls the Webservice.
I am looking for a solution which is not too much hardcoded for every single service, so the proxy still works when the wsdl changes and Server Clients get changed.
As far as I understand the payload factory mediator in (https://stackoverflow.com/a/12969814/2277620) you would have to hardcode the soap-format in the mediator.
If WSO2 is the wrong tool for that I'd like to have a hint which tool could help.
Thanks in advance!
Marco.
For my understanding, you want to have a proxy, but it's backend service/wsdl may vary..
What , you can do is, you can save the wsdl (dynamic wsdl)in registry and point that in your proxy. whenever you edit the wsdl, proxy will automatically adopt to that..But the request, which you send to your backend should follow the wsdl definitions..It is totally client side responsibility..

Send/Receive a SOAP request using SPRING JAVA

I am new to Spring web services. I am going to create an xml request, and send it as a SOAP request to a web service and receive the response.I read different documents but still confused as I could not find a working sample yet.
I know that I should use WebServiceTemplate and WebServiceMessageSender, SaajSoapmessageFactory (please let me know if I am wrong) but not sure how to use them.
Do I need WSDL? if yes why?
If you have any sample code please send me to get clear on it.
Thanks
If you want to send SOAP requests, you would like to be a SOAP client. Seems like you want to use spring-ws project. Check out their great documentation on the client side. The same documentation will guide you through the process of creating a server. There are plenty of examples and ready-made configuration snippets waiting for you.
Spring-WS is built on top of XML Schema description of your message, so you will need WSDL to generate e.g. JAXB models of your requests and responses.
AFAIK, for "web services" , the WSDL file is the machine blueprint of the "ports" as they are called However! ports in WSDL "means" java language(or any other programming language used with a routine or sub or procedure or function) method and has a specific naming scheme associate the .wsdl xml file(template of the service). Each WSDL port(language method) has specifications of return value and data specifications for how to feed it arguments and their type values.

Tool to intercept RESTful webservices

May be this has been asked before but i coud'nt find a proper tool to do this.
What is the best tool to place in the middle of a RESTful webservice and monitor it without port redirection.
Something like TCPMON which will show the full request from the client and the response from the server. For example if the response contain a JSON i should be able to view that??
Charles Proxy is great for logging the full request/response for HTTP connections.