camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject git commit: CAMEL-7453 Added schema attribut to the SoapJaxbDataFormat
Date Wed, 21 May 2014 14:45:17 GMT
Repository: camel
Updated Branches:
  refs/heads/master 760bfb5a1 -> c859eb17e


CAMEL-7453 Added schema attribut to the SoapJaxbDataFormat


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c859eb17
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c859eb17
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c859eb17

Branch: refs/heads/master
Commit: c859eb17ede3c20752ea003675848b1f81d4471f
Parents: 760bfb5
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Wed May 21 22:13:31 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Wed May 21 22:17:44 2014 +0800

----------------------------------------------------------------------
 .../camel/model/dataformat/SoapJaxbDataFormat.java     | 13 +++++++++++++
 .../soap/SoapSpringRoundtripTest-context.xml           |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c859eb17/camel-core/src/main/java/org/apache/camel/model/dataformat/SoapJaxbDataFormat.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/SoapJaxbDataFormat.java
b/camel-core/src/main/java/org/apache/camel/model/dataformat/SoapJaxbDataFormat.java
index 6c01f68..7578f33 100644
--- a/camel-core/src/main/java/org/apache/camel/model/dataformat/SoapJaxbDataFormat.java
+++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/SoapJaxbDataFormat.java
@@ -41,6 +41,8 @@ public class SoapJaxbDataFormat extends DataFormatDefinition {
     private String version;
     @XmlAttribute
     private String namespacePrefixRef;
+    @XmlAttribute
+    private String schema;
 
     public SoapJaxbDataFormat() {
         super("soapjaxb");
@@ -110,6 +112,14 @@ public class SoapJaxbDataFormat extends DataFormatDefinition {
     public void setNamespacePrefixRef(String namespacePrefixRef) {
         this.namespacePrefixRef = namespacePrefixRef;
     }
+    
+    public String getSchema() {
+        return schema;
+    }
+    
+    public void setSchema(String schema) {
+        this.schema = schema;
+    }
 
     @Override
     protected void configureDataFormat(DataFormat dataFormat, CamelContext camelContext)
{
@@ -128,6 +138,9 @@ public class SoapJaxbDataFormat extends DataFormatDefinition {
         if (namespacePrefixRef != null) {
             setProperty(camelContext, dataFormat, "namespacePrefixRef", namespacePrefixRef);
         }
+        if (schema != null) {
+            setProperty(camelContext, dataFormat, "schema", schema);
+        }
         setProperty(camelContext, dataFormat, "contextPath", contextPath);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/c859eb17/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml
b/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml
index 228b248..626d990 100644
--- a/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml
+++ b/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml
@@ -33,7 +33,8 @@
         
         <!-- we define the soap jaxb data formats -->
         <dataFormats>
-            <soapjaxb id="soap" contextPath="com.example.customerservice" elementNameStrategyRef="myNameStrategy"/>
+            <soapjaxb id="soap" contextPath="com.example.customerservice" elementNameStrategyRef="myNameStrategy"
+             schema="classpath:org/apache/camel/dataformat/soap/CustomerService.xsd,classpath:soap.xsd"/>
         </dataFormats>
 
         <route>


Mime
View raw message