Search in sources :

Example 1 with WSFeatureList

use of com.sun.xml.ws.api.WSFeatureList in project metro-jax-ws by eclipse-ee4j.

the class ClientFeatureTest method validateFeatureList.

private void validateFeatureList(Object bindingProvider, String expectedEncoding) throws Exception {
    Binding binding = ((BindingProvider) bindingProvider).getBinding();
    WSFeatureList list = (((WSBinding) binding).getFeatures());
    // System.out.println(list);
    SerializationFeature encoding = list.get(SerializationFeature.class);
    if (expectedEncoding == null) {
        assertNull("There should not be a SerializationFeature", encoding);
    } else {
        assertEquals("Mismatched encoding in SerializationFeature", expectedEncoding, encoding.getEncoding());
    }
}
Also used : WSBinding(com.sun.xml.ws.api.WSBinding) Binding(jakarta.xml.ws.Binding) HTTPBinding(jakarta.xml.ws.http.HTTPBinding) WSFeatureList(com.sun.xml.ws.api.WSFeatureList) BindingProvider(jakarta.xml.ws.BindingProvider) SerializationFeature(com.sun.xml.ws.developer.SerializationFeature)

Aggregations

WSBinding (com.sun.xml.ws.api.WSBinding)1 WSFeatureList (com.sun.xml.ws.api.WSFeatureList)1 SerializationFeature (com.sun.xml.ws.developer.SerializationFeature)1 Binding (jakarta.xml.ws.Binding)1 BindingProvider (jakarta.xml.ws.BindingProvider)1 HTTPBinding (jakarta.xml.ws.http.HTTPBinding)1