Soap Web Service with Anypoint Studio (Mule 3.6.0) - web-services

I am working on a mule studio application in which I am calling a soap web service
http://www.webservicex.com/globalweather.asmx?WSDL
I have an HTTP:listener , SET PAYLOAD and WEB SERVICE between two DATAMAPPERS.
I want the service response writing " localhost:8081/?CityName=Roma&CountryName=Italy " but I don't know how writte the value in Set Payload.
I tried writing #[message.inboundProperties.'http.query.params'.CityName, message.inboundProperties.'http.query.params'.CountryName] but does not work.

you can put the data in set payload as JSON String
{"city":"#[message.inboundProperties.'http.query.params'.CityName]","country":"#[message.inboundProperties.'http.query.params'.CountryName]"}
after this use datamapper to map it to webservice request

Related

Creating and exposing SOAP webservice in servicemix over network

I have a webservice wsdl which im accessing through soap ui to send request and get response. I want to change this wsdl and deployed in servicemix so that same webservice is exposed by my servicemix.
Below is the route
from(cxf:myEndpoint)
.to(cxf:realEndpoint)
Once deployed, im able to access the wsdl url in my system. Other system doesnt recognise my exposed webservice. Am i doing something wrong??

How to print(log) request xml body which is getting passed from java application to soap web service

I would like to print xml body which is getting passed from my web service client to soap web service deployed on some other server.
The problem is that I only have wsdl file with me but no service end point is available to do the end to end testing so I wanted to ensure that request xml is getting passed correctly from my end correctly. Please let me know how can I print this.
String requestXML=_call.getMessageContext().getRequestMessage().getSOAPPartAsString();
String responseXML=_call.getMessageContext().getResponseMessage().getSOAPPartAsString();

Servlets and Wsdl file

have a wsdl link and I know the soap request what to send and lso the response format through the membrane soap ui client
I have written a simple html page having 3 fields which i pass through request format of soap and then i get a response based on it. This passing of request and validations are done in servlet which i call through action in form. Now i have a wsdl file link.
How should I use it to make request response from the servlet .please help me with code.
EDIT : THE WSDL CONTAINS WCF BASED SOAP SERVICE .
You have to build a web service client from wsdl using wsimport java utility, then you will get a webservice handle, using that you can build a request, send a request and get a response.
for more details: http://docs.oracle.com/javaee/6/tutorial/doc/bnayn.html

Error message in wso2 dss

I'm using wso2 esb4.7.0 and wso2 dss 3.1.0.I have created a dataservice in dss and tested using try this service tool.It's working fine but when same dataservice is being fetch in esb using it's adress endpoint it showing following error -
ERROR {org.wso2.carbon.statistics.internal.ResponseTimeCalculator} - wso2statistics.request.received.time is null in the IN MessageContext
why so?is their any problem with esb?or it's internal problem?please let me know..
You have to set message headers using Header mediator. At least you have to set "To" and "Action" headers before you send payload to the data service. To get the write value of To and Action headers you can use Soap Tracer tool in monitor tab of WSO2-DSS management console. Run the tool, try the data service and refresh the tool to see the results of your trying. In the left side of the page of Soap Tracer tool you will see the To and Action, copy values from there and put them in header mediators you are using.

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.