You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2011/09/02 11:34:32 UTC
svn commit: r1164435 - in /camel/branches/camel-2.8.x: ./
components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/
components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/
Author: davsclaus
Date: Fri Sep 2 09:34:31 2011
New Revision: 1164435
URL: http://svn.apache.org/viewvc?rev=1164435&view=rev
Log:
Merged revisions 1153829 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
Modified:
camel/branches/camel-2.8.x/ (props changed)
camel/branches/camel-2.8.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
camel/branches/camel-2.8.x/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Sep 2 09:34:31 2011
@@ -1 +1 @@
-/camel/trunk:1150651,1151054,1152170,1154684,1155230,1156108,1156260,1156277,1156479,1156524,1157348,1157798,1157831,1157878,1158153,1159171,1159174,1159326,1159457,1159460,1159606,1159682-1159683,1159867,1160547,1160637,1161010,1161082,1161524,1162309,1162395
+/camel/trunk:1150651,1151054,1152170,1153829,1154684,1155230,1156108,1156260,1156277,1156479,1156524,1157348,1157798,1157831,1157878,1158153,1159171,1159174,1159326,1159457,1159460,1159606,1159682-1159683,1159867,1160547,1160637,1161010,1161082,1161524,1162309,1162395
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.8.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java?rev=1164435&r1=1164434&r2=1164435&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java (original)
+++ camel/branches/camel-2.8.x/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/SoapJaxbDataFormat.java Fri Sep 2 09:34:31 2011
@@ -93,9 +93,9 @@ public class SoapJaxbDataFormat extends
/**
* Initialize the data format. The serviceInterface is necessary to
* determine the element name and namespace of the element inside the soap
- * body when marshaling
+ * body when marshalling
*
- * @param jaxbPackage
+ * @param contextPath
* package for JAXB context
* @param serviceInterface
* webservice interface
@@ -104,6 +104,21 @@ public class SoapJaxbDataFormat extends
this(contextPath);
this.elementNameStrategy = elementNameStrategy;
}
+
+ /**
+ * Initialize the data format. The serviceInterface is necessary to
+ * determine the element name and namespace of the element inside the soap
+ * body when marshalling
+ *
+ * @param contextPath
+ * package for JAXB context
+ * @param elementNameStrategyRef
+ * webservice interface referenced bean name
+ */
+ public SoapJaxbDataFormat(String contextPath, String elementNameStrategyRef) {
+ this(contextPath);
+ this.elementNameStrategyRef = elementNameStrategyRef;
+ }
public void setElementNameStrategy(Object nameStrategy) {
if (nameStrategy instanceof ElementNameStrategy) {
@@ -346,6 +361,7 @@ public class SoapJaxbDataFormat extends
* Unmarshal a given SOAP xml stream and return the content of the SOAP body
*/
public Object unmarshal(Exchange exchange, InputStream stream) throws IOException {
+ checkElementNameStrategy(exchange);
String soapAction = getSoapActionFromExchange(exchange);
@@ -471,5 +487,10 @@ public class SoapJaxbDataFormat extends
public void setElementNameStrategy(ElementNameStrategy elementNameStrategy) {
this.elementNameStrategy = elementNameStrategy;
}
+
+ public void setElementNameStrategyRef(String nameStrategyRef) {
+ this.elementNameStrategyRef = nameStrategyRef;
+ }
}
+
Modified: camel/branches/camel-2.8.x/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml?rev=1164435&r1=1164434&r2=1164435&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml (original)
+++ camel/branches/camel-2.8.x/components/camel-soap/src/test/resources/org/apache/camel/dataformat/soap/SoapSpringRoundtripTest-context.xml Fri Sep 2 09:34:31 2011
@@ -21,6 +21,12 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
+
+ <!-- Defining a ServiceInterfaceStrategy for retrieving the element name when marshalling -->
+ <bean id="myNameStrategy" class="org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy">
+ <constructor-arg value="com.example.customerservice.CustomerService"/>
+ <constructor-arg value="true"/>
+ </bean>
<!-- START SNIPPET: e1 -->
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
@@ -41,3 +47,4 @@
<!-- END SNIPPET: e1 -->
</beans>
+