// serialize and create an input stream to read WSDL
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
if (trace()) trace.info("Serializing wsdlElement found to build an Axis2 service");
wsdlElement.serialize(baos);
wsdlInputStream = new ByteArrayInputStream(baos.toByteArray());
} catch (XMLStreamException e) {
handleException("Error converting to a StreamSource", e);
}