public Wsdl( WSDLLocator wsdlLocator, QName serviceQName, String portName, String username, String password ) throws AuthenticationException { // load and parse the WSDL try { _wsdlDefinition = parse( wsdlLocator, username, password ); } catch ( AuthenticationException ae ) { // throw it again or KettleException will catch it throw ae; } catch ( WSDLException e ) { throw new RuntimeException( "Could not load WSDL file: " + e.getMessage(), e ); } catch ( KettleException e ) { throw new RuntimeException( "Could not load WSDL file: " + e.getMessage(), e ); } _service = _wsdlDefinition.getService( serviceQName ); if ( _service == null ) { throw new IllegalArgumentException( "Service: " + serviceQName + " is not defined in the WSDL file." ); } _port = _service.getPort( portName ); if ( _port == null ) { throw new IllegalArgumentException( "Port: " + portName + " is not defined in the service: " + serviceQName ); } _wsdlTypes = new WsdlTypes( _wsdlDefinition ); _operationCache = new HashMap<String, WsdlOperation>(); }
throw new RuntimeException( "Could not load WSDL file: " + e.getMessage(), e ); } catch ( KettleException e ) { throw new RuntimeException( "Could not load WSDL file: " + e.getMessage(), e );
public Wsdl4jDefinitionException(WSDLException ex) { super(ex.getMessage(), ex); }
public Wsdl4jDefinitionException(WSDLException ex) { super(ex.getMessage(), ex); }
public Wsdl4jDefinitionException(WSDLException ex) { super(ex.getMessage(), ex); }
public Wsdl4jDefinitionException(WSDLException ex) { super(ex.getMessage(), ex); }
public synchronized ClientTransport getTransport() throws IOException { if (transport == null) { try { transport = createTransport(reference); } catch (WSDLException e) { throw (IOException)(new IOException(e.getMessage()).initCause(e)); } } assert transport != null : "transport is null"; return clientTransport(); }
private SOAPOperation generateSoapAction() { SOAPOperation soapOperation = null; try { soapOperation = (SOAPOperation)extensionRegistry .createExtension(BindingOperation.class, new QName(WSDLConstants.SOAP11_NAMESPACE, "operation")); } catch (WSDLException e) { throw new ToolException(e.getMessage(), e); } return soapOperation; }
private boolean writeDefinition() { WSDLWriter writer = wsdlFactory.newWSDLWriter(); java.io.File file = new java.io.File(wsdlFile); java.io.OutputStream outstream = null; try { outstream = new java.io.FileOutputStream(file); } catch (java.io.FileNotFoundException e) { throw new ToolException(e.getMessage(), e); } try { writer.writeWSDL(this.definition, outstream); } catch (javax.wsdl.WSDLException e) { throw new ToolException(e.getMessage(), e); } return true; }
@Override public Source getSource() { synchronized (monitor) { Assert.notNull(definition, "definition must not be null"); try { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter(); Document document = wsdlWriter.getDocument(definition); return new DOMSource(document); } catch (WSDLException ex) { throw new WsdlDefinitionException(ex.getMessage(), ex); } } }
public WSDLGenerator(WSDLModel model, ProcessorEnvironment penv) { wmodel = model; env = penv; definition = model.getDefinition(); try { wsdlFactory = WSDLFactory.newInstance(); } catch (javax.wsdl.WSDLException e) { throw new ToolException(e.getMessage(), e); } }
@Override public Source getSource() { synchronized (monitor) { Assert.notNull(definition, "definition must not be null"); try { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter(); Document document = wsdlWriter.getDocument(definition); return new DOMSource(document); } catch (WSDLException ex) { throw new WsdlDefinitionException(ex.getMessage(), ex); } } }
@Override public Source getSource() { synchronized (monitor) { Assert.notNull(definition, "definition must not be null"); try { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter(); Document document = wsdlWriter.getDocument(definition); return new DOMSource(document); } catch (WSDLException ex) { throw new WsdlDefinitionException(ex.getMessage(), ex); } } }
public Source getSource() { synchronized (monitor) { Assert.notNull(definition, "definition must not be null"); if (document == null) { try { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLWriter wsdlWriter = wsdlFactory.newWSDLWriter(); document = wsdlWriter.getDocument(definition); } catch (WSDLException ex) { throw new WsdlDefinitionException(ex.getMessage(), ex); } } } return new DOMSource(document); }
private void parseWsdl(URL wsdlUrl) throws WSSPolicyException { try { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader reader = wsdlFactory.newWSDLReader(); reader.setFeature("javax.wsdl.verbose", false); wsdlDefinition = reader.readWSDL(wsdlUrl.toString()); operationPolicies = findPoliciesByOperation(wsdlDefinition); } catch (WSDLException e) { throw new WSSPolicyException(e.getMessage(), e); } }
/** * Basic profile analyzer. * @param analyzerConfigList a list of configurations for the analyzer. * @param wsdlURI a wsdl document location. * @throws WSIException if unable to create a Basic profile analyzer. */ public BasicProfileAnalyzer(List analyzerConfigList, String wsdlURI) throws WSIException { super(analyzerConfigList, new ToolInfo(TOOL_NAME)); new XMLDocumentCache(); try { // Get the WSDL document if (wsdlURI != null) this.wsdlDocument = new WSDLDocument(wsdlURI); } catch (WSDLException we) { throw new WSIException(we.getMessage(), we); } }
/** * Basic profile analyzer. * @param analyzerConfigList a list of configurations for the analyzer. * @param wsdlURI a wsdl document location. * @throws WSIException if unable to create a Basic profile analyzer. */ public BasicProfileAnalyzer(List analyzerConfigList, String wsdlURI) throws WSIException { super(analyzerConfigList, new ToolInfo(TOOL_NAME)); new XMLDocumentCache(); try { // Get the WSDL document if (wsdlURI != null) this.wsdlDocument = new WSDLDocument(wsdlURI); } catch (WSDLException we) { throw new WSIException(we.getMessage(), we); } }
private void parseWsdl(Document document) throws WSSPolicyException { try { WSDLFactory wsdlFactory = WSDLFactory.newInstance(); WSDLReader reader = wsdlFactory.newWSDLReader(); reader.setFeature("javax.wsdl.verbose", false); wsdlDefinition = reader.readWSDL(document.getDocumentURI(), document); operationPolicies = findPoliciesByOperation(wsdlDefinition); } catch (WSDLException e) { throw new WSSPolicyException(e.getMessage(), e); } }
public void addWsdlImport(URI from, URI wsdlImport, SourceLocation sloc) { Definition4BPEL def; try { WSDLReader r = _wsdlFactory.newWSDLReader(); WSDLLocatorImpl locator = new WSDLLocatorImpl(_resourceFinder, _resourceFinder.resolve(from, wsdlImport)); def = (Definition4BPEL) r.readWSDL(locator); } catch (WSDLException e) { recoveredFromError(sloc, new CompilationException(__cmsgs.errWsdlParseError(e .getFaultCode(), e.getLocation(), e.getMessage()))); throw new CompilationException(__cmsgs.errWsdlImportFailed(wsdlImport.toASCIIString(), e.getFaultCode()) .setSource(sloc), e); } try { _wsdlRegistry.addDefinition(def, _resourceFinder, _resourceFinder.resolve(from, wsdlImport)); if (__log.isDebugEnabled()) __log.debug("Added WSDL Definition: " + wsdlImport); } catch (CompilationException ce) { recoveredFromError(sloc, ce); } }
public void generate() { Service service = definition.createService(); service.setQName(new QName(WSDLConstants.WSDL_PREFIX, wmodel.getServiceName())); Port port = definition.createPort(); port.setName(wmodel.getPortName()); Binding binding = definition.createBinding(); String targetNameSpace = wmodel.getTargetNameSpace(); binding.setQName(new QName(targetNameSpace, wmodel.getPortTypeName() + "Binding")); port.setBinding(binding); SOAPAddress soapAddress = null; try { soapAddress = (SOAPAddress)extensionRegistry .createExtension(Port.class, new QName(WSDLConstants.SOAP11_NAMESPACE, "address")); soapAddress.setLocationURI(ADDRESS_URI); } catch (WSDLException e) { throw new ToolException(e.getMessage(), e); } port.addExtensibilityElement(soapAddress); service.addPort(port); definition.addService(service); } }