Package com.consol.citrus.exceptions

Examples of com.consol.citrus.exceptions.CitrusRuntimeException


            try {
                synchronized (serverLock) {
                    jettyServer.stop();
                }
            } catch (Exception e) {
                throw new CitrusRuntimeException(e);
            }
        }
    }
View Full Code Here


            jettyServer.setHandler(handlers);
           
            try {
                jettyServer.start();
            } catch (Exception e) {
                throw new CitrusRuntimeException(e);
            }
        }
    }
View Full Code Here

        }
       
        try {
            return (T) unmarshaller.unmarshal(getPayloadSource(message.getPayload()));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to unmarshal message payload", e);
        }
    }
View Full Code Here

        } else if (payload instanceof Source) {
            source = (Source) payload;
        }
       
        if (source == null) {
            throw new CitrusRuntimeException("Failed to create payload source for unmarshalling message");
        }
       
        return source;
    }
View Full Code Here

        }

        try {
            return ctx.getBean(mappingKey, EndpointAdapter.class);
        } catch (NoSuchBeanDefinitionException e) {
            throw new CitrusRuntimeException("Unable to find matching endpoint adapter with bean name '" +
                    mappingKey + "' in Spring bean application context", e);
        }
    }
View Full Code Here

     */
    public SendSoapFaultActionDefinition faultDetailResource(Resource resource) {
        try {
            getAction().getFaultDetails().add(FileUtils.readToString(resource));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read fault detail resource", e);
        }
        return this;
    }
View Full Code Here

     */
  public ExecuteSQLQueryActionDefinition sqlResource(Resource sqlResource) {
    try {
            action.setSqlResourcePath(sqlResource.getFile().getAbsolutePath());
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read sql resource", e);
        }
    return this;
  }
View Full Code Here

    public ExecuteSQLQueryActionDefinition validateScript(Resource scriptResource, String type) {
        ScriptValidationContext scriptValidationContext = new ScriptValidationContext(type);
        try {
            scriptValidationContext.setValidationScript(FileUtils.readToString(scriptResource));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read script resource", e);
        }
        action.setScriptValidationContext(scriptValidationContext);
        return this;
    }
View Full Code Here

     */
    public T payload(Resource payloadResource) {
        try {
            getPayloadTemplateMessageBuilder().setPayloadData(FileUtils.readToString(payloadResource));
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to read payload resource", e);
        }
   
        return self;
    }
View Full Code Here

        StringResult result = new StringResult();
       
        try {
            marshaller.marshal(payload, result);
        } catch (XmlMappingException e) {
            throw new CitrusRuntimeException("Failed to marshal object graph for message payload", e);
        } catch (IOException e) {
            throw new CitrusRuntimeException("Failed to marshal object graph for message payload", e);
        }
       
        if (action.getMessageBuilder() != null && action.getMessageBuilder() instanceof PayloadTemplateMessageBuilder) {
            ((PayloadTemplateMessageBuilder)action.getMessageBuilder()).setPayloadData(result.toString());
        } else {
View Full Code Here

TOP

Related Classes of com.consol.citrus.exceptions.CitrusRuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.