0





63
1

I have a wsdl stored in a string/byte array. Is there a way to generate javax.wsdl.Definition from a String or byte array ? I checked the documentation here but couldn't find a way to do this.

Any samples or pointers ?


0


1

Found the answer:

public void getWSDLDefinition(byte[] wsdl) {
        try {
            WSDLReader wsdlReader = javax.wsdl.factory.WSDLFactory.newInstance().newWSDLReader();
            // switch off the verbose mode
            wsdlReader.setFeature(JAVAX_WSDL_VERBOSE_MODE, false);
            wsdlReader.setFeature("javax.wsdl.importDocuments", false);
            Definition wsdlDefinition = wsdlReader.readWSDL(null, new InputSource(new ByteArrayInputStream(wsdl)));
        } catch (Exception e) {}
    }

Ask about this question here!