Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SoapUI vs Java Web Service Client

If a SOAP web service is working well via SoapUI (producing the correct SOAP responses), while building a web service client in Java using different APIs/frameworks to call this web service is facing different issues, is it safe to consider this web service stable and the issues are from the consumer side?

I'm asking a generic question in here, I have already asked a detailed one which is probably too long to read. I'm interested in the concept more than my actual implementation, so if you can answer my question without referring to my longer post, please do.

UPDATE: I have realized that even if the WSDL is WS-I compliant and it's functioning correctly via SoapUI, this is still not enough to conclude that the web service is not broken. As @jtahlborn said, SoapUI is very tolerant to broken web services, and it could easily trick you to believe your web service is working fine, which is what happened in my case.

I'm constructing the SOAP response in the ESB and my issue was that I used a namespace that was defined in the WSDL but not in the schema. SoapUI received the response and showed it to me (with the wrong namespace); this issue could have been avoided if I turned on the response validation option.

It's also noteworthy to mention that in the Java web service client I created to test my web service, the response could not be loaded into the output object (a NullPointerException error showed up when I tried to access the output object), this was due to the namespace issue and it started working correctly once I fixed the namespace.

like image 694
Aziz Alfoudari Avatar asked Mar 03 '13 19:03

Aziz Alfoudari


People also ask

What is the difference between SOAP and REST web services?

REST is a set of guidelines that offers flexible implementation, whereas SOAP is a protocol with specific requirements like XML messaging. REST APIs are lightweight, making them ideal for newer contexts like the Internet of Things (IoT), mobile application development, and serverless computing.

Does SoapUI use Java?

SoapUI is java based, so it runs on most operating systems, We test it on several Windows Versions as well as Mac and the multiple Linux dialects. SoapUI requires a 1.6+ version of the JRE (Java Runtime Environment), at least 1 GB of memory is recommended, and about 100 MB of disk space.

What is difference between REST and SOAP web services in Java?

SOAP defines its own security. RESTful web services inherits security measures from the underlying transport. SOAP permits XML data format only. REST permits different data format such as Plain text, HTML, XML, JSON etc.

What is the difference between SoapUI and REST API?

SOAP is a protocol, whereas REST is an architectural style An API is designed to expose certain aspects of an application's business logic on a server, and SOAP uses a service interface to do this while REST uses URIs.


2 Answers

SoapUI is a fantastic product. one of the things which makes it a great product, however, is that it is very tolerant of poorly defined webservices. in our product, we deal with lots of webservices, and a frequent comment on an issue in our product is "it works fine in SoapUI". we have learned the hard way that SoapUI will tolerate all kinds of broken webservices. so, in summary, working with SoapUI is not a proof that your webservice is well-defined.

like image 117
jtahlborn Avatar answered Oct 10 '22 17:10

jtahlborn


There are WS-I testing tools to check your web service for conformance to the Web Services Interoperability profiles. If your service adheres to the WS-I basic profile, and SoapUI can call it, the issues are definitely on the consumer side.

EDIT: well, or in between the both...

SoapUI can check your wsdl for WS-I compliance, see http://www.soapui.org/SOAP-and-WSDL/working-with-wsdls.html.

like image 26
flup Avatar answered Oct 10 '22 18:10

flup