Пример #1
0
def __readWsdlWithIBMFactory(wsdlData, importWsdlDocuments=1):
    if wsdlData == None:
        raise WSDLException('WSDL Content is Null')
    else:
        from com.ibm.wsdl.factory import WSDLFactoryImpl
        wsdlfactoryIdox = WSDLFactoryImpl()
        reader = wsdlfactoryIdox.newWSDLReader()
        if importWsdlDocuments == 1:
            reader.setFeature('javax.wsdl.importDocuments', Boolean.TRUE)
        else:
            reader.setFeature('javax.wsdl.importDocuments', Boolean.FALSE)

        wsdlData = String(wsdlData.strip())
        arr = wsdlData.getBytes()
        stream = ByteArrayInputStream(arr)
        inSrc = InputSource(stream)
        defintion = reader.readWSDL(None, inSrc)
        return defintion
Пример #2
0
def __readWsdlWithIBMFactory(wsdlData, importWsdlDocuments = 1):
    if wsdlData == None:
        raise WSDLException('WSDL Content is Null')
    else:
        from com.ibm.wsdl.factory import WSDLFactoryImpl
        wsdlfactoryIdox = WSDLFactoryImpl()
        reader = wsdlfactoryIdox.newWSDLReader()
        if importWsdlDocuments == 1:
            reader.setFeature('javax.wsdl.importDocuments', Boolean.TRUE)
        else:
            reader.setFeature('javax.wsdl.importDocuments', Boolean.FALSE)

        wsdlData = String(wsdlData.strip())
        arr = wsdlData.getBytes()
        stream = ByteArrayInputStream(arr)
        inSrc = InputSource(stream)
        defintion = reader.readWSDL(None, inSrc)
        return defintion