You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2005/12/20 22:38:04 UTC
svn commit: r358113 -
/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/tck/SenderComponent.java
Author: gnodet
Date: Tue Dec 20 13:38:02 2005
New Revision: 358113
URL: http://svn.apache.org/viewcvs?rev=358113&view=rev
Log:
Allow to custiomize the xml message sent by the SenderComponent
Modified:
incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/tck/SenderComponent.java
Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/tck/SenderComponent.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/tck/SenderComponent.java?rev=358113&r1=358112&r2=358113&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/tck/SenderComponent.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/servicemix/tck/SenderComponent.java Tue Dec 20 13:38:02 2005
@@ -39,6 +39,7 @@
public static final String ENDPOINT = "sender";
private EndpointResolver resolver;
+ private String message = "<s12:Envelope xmlns:s12='http://www.w3.org/2003/05/soap-envelope'><s12:Body> <foo>Hello!</foo> </s12:Body></s12:Envelope>";
public SenderComponent() {
super(SERVICE, ENDPOINT);
@@ -75,8 +76,7 @@
exchange.setInMessage(message);
// lets set the XML as a byte[], String or DOM etc
- String xml = "<s12:Envelope xmlns:s12='http://www.w3.org/2003/05/soap-envelope'><s12:Body> <foo>Hello!</foo> </s12:Body></s12:Envelope>";
- message.setContent(new StringSource(xml));
+ message.setContent(new StringSource(this.message));
if (sync) {
boolean result = context.getDeliveryChannel().sendSync(exchange, 1000);
if (!result) {
@@ -87,5 +87,13 @@
}
}
}
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
}