Skip to main content

Enable SOAP schema-validation on client-side?

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2010-05-24

How do I enable SOAP schema-validation on the client-side (before sending the SOAP-request to the server)?

I'm calling a SOAP web-service from JEE6-client (running inside Tomcat-app), like:

Class<T> serviceClass;
Service service = Service.create(url, new QName(namespaceURI, serviceName));
boolean inbound = true;
boolean outbound = true;
T servicePort = (T) service.getPort(serviceClass, new SchemaValidationFeature(inbound, outbound));

But doesn't seem to work... error is still thrown on the server-side if, for example, a mandatory value is missing.

Anything else I need to do to catch the error on client-side?