SoapUI vs Java Web Service Client
Asked Answered
G

3

6

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.

Gracia answered 3/3, 2013 at 19:57 Comment(0)
P
11

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.

Pianette answered 3/3, 2013 at 21:46 Comment(7)
Even if it's WS-I compliant?Gracia
@abstractpaper - i wasn't arguing whether or not your webservice is well defined, just that SoapUI isn't proof of anything.Pianette
What I meant is if my web service is functional according to SoapUI and WS-I compliant at the same time, is this still not good enough to conclude that my web service is not broken?Gracia
@Pianette Am getting curious too now!Welton
@Welton - curious about what?Pianette
@Pianette Of concrete cases where SoapUI can happily consume a web service of which the WS-I testing tools say it's compliant, yet it turns out to be broken.Welton
@Pianette Yes, but am curious if the testing tools do not pick this up.Welton
W
2

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.

Welton answered 3/3, 2013 at 20:9 Comment(2)
I did the WS-I test and it passed, yet 2 different consumers using CXF and JAX-WS are facing weird issues calling it.Gracia
Firewall or proxy issue perhaps then? The service itself is fine, I'd say.Welton
T
0

It's most likely that the consumer (client) is buggy... If the client is generated using wsdl2java it's a big chance to have bugs in it... and if you are using some special functionalities that are valid (conforming w3c) then don't be surprised... the generated clients sometimes do this... even some libraries used to generate java classes or libraries to generate the webservices are full of bugs...

A lot of things are not supported by known and frequently used libraries... (I don't want to give names -- but wsdl4java is not perfect)..

If you are using security or something ... higher chances to have bugs on both server and client side :)

maybe if you tell us what is the problem we can help you...

Tyrannosaur answered 3/3, 2013 at 21:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.