This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<jb:bean beanId="policy" class="org.acme.insurance.Policy" createOnElement="/pol:@rootEl@"> | |
<jb:value data="#/pol:calculatePolicyQuote/pol:requestDate" decoder="Date" property="requestDate"> | |
<jb:decodeParam name="format">yyyy-MM-dd</jb:decodeParam> | |
</jb:value> | |
<jb:wiring beanIdRef="driver" property="driver"/> | |
<jb:value data="#/pol:calculatePolicyQuote/pol:policyQuoteInfo/pol:policyType" property="policyType"/> | |
<jb:value data="#/pol:calculatePolicyQuote/pol:policyQuoteInfo/pol:vehicleYear" property="vehicleYear"/> | |
</jb:bean> | |
<jb:bean beanId="driver" class="org.acme.insurance.Driver" createOnElement="/pol:@rootEl@/pol:calculatePolicyQuote/pol:policyQuoteInfo"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TransformTest { | |
@Test | |
public void test_read_write_request() throws IOException, SAXException { | |
XMLBinding requestBinding = new XMLBinding().add("/smooks/PolicyQuoteCalculationConfigSmooksRequest.xml").intiailize(); | |
// Read.... | |
Policy policy = requestBinding.fromXML(REQUEST, Policy.class); | |
// Write.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"> | |
<import file="PolicyBinding.xml"> | |
<param name="rootEl">policyQuote</param> | |
</import> | |
</smooks-resource-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" | |
xmlns:core="http://www.milyn.org/xsd/smooks/smooks-core-1.4.xsd" | |
xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd"> | |
<core:namespaces> | |
<core:namespace prefix="pol" uri="http://www.example.org/policyQuote"/> | |
</core:namespaces> | |
<jb:bean beanId="policy" class="org.acme.insurance.Policy" createOnElement="/pol:@rootEl@"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Expected: | |
[<test-message><message-seg><field-1>1</field-1><field-2>2</field-2><field-3></field-3><field-4>4</field-4><field-5>5?</field-5></message-seg><message-seg><field-1>1</field-1><field-2>2</field-2><field-3></field-3><field-4>4</field-4><field-5>5'1</field-5></message-seg><message-seg><field-1>2</field-1><field-2>4</field-2><field-3></field-3><field-4>5</field-4><field-5>6</field-5></message-seg></test-message>] | |
Actual: | |
[<test-message><message-seg><field-1>1</field-1><field-2>2</field-2><field-4>4</field-4><field-5>5?</field-5></message-seg><message-seg><field-1>1</field-1><field-2>2</field-2><field-4>4</field-4><field-5>5'1</field-5></message-seg><message-seg><field-1>2</field-1><field-2>4</field-2><field-4>5</field-4><field-5>6</field-5></message-seg></test-message>] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" | |
xmlns:core="http://www.milyn.org/xsd/smooks/smooks-core-1.4.xsd" | |
xmlns:regex="http://www.milyn.org/xsd/smooks/regex-1.5.xsd" | |
xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd"> | |
<regex:reader fields="header[date,location] | car[model,vehicleId,mileage,classification,damaged]" | |
regexPattern="," | |
rootElementName="intakeManifest" indent="true" /> | |
<core:exports> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download http://www.jfrog.org/artifactory/plugins-releases/org/apache/camel/camel-test/2.8.0/camel-test-2.8.0.pom | |
Download http://www.jfrog.org/artifactory/plugins-releases/org/apache/camel/camel-test/2.8.0/camel-test-2.8.0.jar | |
:smooks-cartridges/camel:compileTestJava UP-TO-DATE | |
:smooks-cartridges/camel:processTestResources | |
:smooks-cartridges/camel:testClasses | |
:smooks-cartridges/camel:test | |
Test org.milyn.smooks.camel.dataformat.SmooksCSVDataFormatTest FAILED | |
Test org.milyn.smooks.camel.dataformat.SmooksDataFormatTest FAILED | |
Test org.milyn.smooks.camel.processor.SmooksProcessor_BeanRouting_Test FAILED | |
Test org.milyn.smooks.camel.processor.SmooksProcessor_CharacterEncoding_Test FAILED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* JBoss, Home of Professional Open Source | |
* Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors | |
* as indicated by the @authors tag. All rights reserved. | |
* See the copyright.txt in the distribution for a | |
* full listing of individual contributors. | |
* | |
* This copyrighted material is made available to anyone wishing to use, | |
* modify, copy, or redistribute it subject to the terms and conditions | |
* of the GNU Lesser General Public License, v. 2.1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(SwitchYardRunner.class) | |
public class OutboundHandlerTest extends CamelTestSupport { | |
@EndpointInject(uri = "mock:result") | |
private static MockEndpoint camelEndpoint; | |
private ServiceDomain _serviceDomain; | |
@ServiceOperation("TargetService") | |
private Invoker _targetService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SwitchyardComponentTest extends SwitchYardTestCase { | |
private String _serviceName = "testServiceName"; | |
private CamelContext _camelContext; | |
private ProducerTemplate _template; | |
@Before | |
public void setup() throws Exception { | |
_camelContext = new DefaultCamelContext(); | |
_camelContext.addRoutes(createRouteBuilder()); | |
_template = _camelContext.createProducerTemplate(); |