I am building a whole new webservice application using SOAP, java and JBOSS FUSE. I have a request xml and xsd..
Can we guess the response xml by just referring to the request and the data elements?
You cannot guess exact response, if you could what is the point of calling, you could guess response schema from WSDL that SOAP webservice publishes
Related
I am using spring boot framework to generate a soap request to consume the soap service.
Using SOAP-UI/ Postman, I can be able to send the request in xml format as specified in service wsdl.
But, I am generating soap request body my marshalling the java object and sending it through spring application.
Is there any way to see/visualise the intermediate request in XML format in this case ?
I have a java web application (with Servlets) which has several REST and SOAP based interfaces.
For SOAP interfaces, I have hard coded request XML which I post using Jersey HttpClient and extract data from response XML using StringUtils. I'm not using any special libraries in my application for these interfaces.
Now I have to create one new SOAP interface which uses Asynchronous messaging i.e. I have to give a callback URL where actual response will be sent.
Problem is that this interface requires callback URL to implement some SOAP web-service based on some response WSDL given in interface documentation.
I don't want to implement SOAP server or add libraries for this. I simply want to create a servlet for callback URL which will receive response XML. Is there any way I can achieve this?
I created a servlet with one GET and POST methods mapped to the path of callback URL
GET method provides hardcoded WSDL required by client interface. Port address in this WSDL again points to the callback URL (handled by my servlet) where client interface posts response SOAP XML.
POST method receives response SOAP XML from client interface and parses it to get the result.
This way one servlet acts as SOAP service without adding any external libraries
I have a SOAP webservice that is currently POST method, however I saw on my logs that when client is consuming my service there are two calls being made, 1 is to GET the wsdl file then POST to the webservice? Should it be POST call only?
You can think of the WSDL file as a sort of blueprint for a SOAP service. Given the WSDL, your client application can figure how to use the SOAP service. So I see nothing wrong with your client app first doing a GET to download the WSDL, following by a POST to actually consume the SOAP service.
I had written a method in soap web service which returns the data from database. now i am facing the problem to write HTTP GET request in java application. Any help and suggestions will be appreciated
Thank you
Why you are not using jax-ws or apache axis2 or apache CXF for consuming your webbservice ? Direct http invoke will be little tricky and you will required to construct your soap message and some http headers to call soap based service directly http client. check the http client for soap service here How to call a SOAP webservice with a simple String (xml in string format)
I wish to consume a SOAP webservice from the Govt. of India public data sets. Here is an sample URL:
http://data.gov.in/sites/default/files/Fish_2013.xml
I have been using REST APIs and have never used a SOAP one.This is a SOAP webservice and it does not give me any information about the wsdl file location. As per my understanding I can generate a client using the WSDL if available and use it but how do I use a SOAP API without WSDL.
Most of the other posts talk about changing the response format but then its not possible in my case.
You can do 2 tricks:
install a local webserver
map the localhost/yourproject?wsdl to that xml file
use a Soap client generator tool on that wsdl link ( some allow other links wich doesn't end at wsdl some doesn't)
use the generated artifacts to consume soap.