Author: hiranya
Date: Sun Sep 1 18:06:02 2013
New Revision: 1519298
URL: http://svn.apache.org/r1519298
Log:
Documentation update. Applying patch from SYNAPSE-973
Modified:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/mediators.xml
Modified:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java?rev=1519298&r1=1519297&r2=1519298&view=diff
==============================================================================
---
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java
(original)
+++
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorFactory.java
Sun Sep 1 18:06:02 2013
@@ -37,7 +37,7 @@ import java.util.Properties;
* Factory for {@link CalloutMediator} instances.
*
* <pre>
- * <callout [serviceURL="string"]
[action="string"][passHeaders="true|false"]>
+ * <callout [serviceURL="string"]
[action="string"][passHeaders="true|false"]
[initAxis2ClientOptions="true|false"]>
* <configuration [axis2xml="string"] [repository="string"]/>?
* <endpoint/>?
* <source xpath="expression" | key="string">?
Modified:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java?rev=1519298&r1=1519297&r2=1519298&view=diff
==============================================================================
---
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java
(original)
+++
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/config/xml/CalloutMediatorSerializer.java
Sun Sep 1 18:06:02 2013
@@ -27,7 +27,7 @@ import org.apache.synapse.mediators.buil
/**
* <pre>
- * <callout [serviceURL="string"]
[action="string"][passHeaders="true|false"]>
+ * <callout [serviceURL="string"]
[action="string"][passHeaders="true|false"]
[initAxis2ClientOptions="true|false"]>
* <configuration [axis2xml="string"] [repository="string"]/>?
* <endpoint/>?
* <source xpath="expression" | key="string">?
Modified:
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java?rev=1519298&r1=1519297&r2=1519298&view=diff
==============================================================================
---
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java
(original)
+++
synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediators/builtin/CalloutMediator.java
Sun Sep 1 18:06:02 2013
@@ -46,7 +46,7 @@ import org.jaxen.JaxenException;
import java.util.List;
/**
- * <callout [serviceURL="string"] [action="string"][passHeaders="true|false"]>
+ * <callout [serviceURL="string"] [action="string"][passHeaders="true|false"]
[initAxis2ClientOptions="true|false"]>
* <configuration [axis2xml="string"] [repository="string"]/>?
* <endpoint/>?
* <source xpath="expression" | key="string">? <!-- key can be a MC property
or entry key -->
Modified:
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/mediators.xml
URL:
http://svn.apache.org/viewvc/synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/mediators.xml?rev=1519298&r1=1519297&r2=1519298&view=diff
==============================================================================
---
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/mediators.xml
(original)
+++
synapse/trunk/java/modules/documentation/src/site/xdoc/userguide/mediators.xml
Sun Sep 1 18:06:02 2013
@@ -826,37 +826,60 @@
</subsection>
<subsection name="Callout Mediator" id="Callout">
<p>
- Callout mediator performs a blocking external service
invocation during
- mediation. 'serviceURL' and optional 'action' attributes
specify the parameters
- for the external service call. The source element
specifies the payload for the
- request message using an XPath expression; or a registry
key. The target element
- specifies a node, at which the response payload will be
attached into the
- current message, or the name of a key/property using which
the response would be
- attached to the current message context as a property.
+ Callout mediator performs a blocking external service
invocation during mediation.
+ The target external service can be configured either using
a child endpoint element
+ or using the 'serviceURL' attribute. When serviceURL is
specified, it is used as
+ the EPR of the external service. We can specify the
endpoint element if we want to
+ leverage endpoint functionality like format conversions,
security, etc.
+ The target endpoint can be defined inline or we can refer
to an existing named
+ endpoint in the configuration.
+ Only Leaf endpoint types (Address/WSDL/Default) are
supported.
+ When both serviceURL and endpoint is not present, 'To'
header on the request is
+ used as the target endpoint.
</p>
- <div class="xmlConf"><callout [serviceURL="string"]
[action="string"]>
+ <div class="xmlConf"><callout [serviceURL="string"]
[action="string"][passHeaders="true|false"]
[initAxis2ClientOptions="true|false"] >
<configuration [axis2xml="string"] [repository="string"]/>?
- <source xpath="expression" | key="string">
- <target xpath="expression" | key="string"/>
+ <endpoint/>?
+ <source xpath="expression" | key="string">?
+ <target xpath="expression" | key="string"/>?
<enableSec policy="string" | outboundPolicy="String" |
inboundPolicy="String" />?
</callout></div>
<p>
+ 'action' attribute can be used to specify the SOAP Action
of the external service
+ call. When 'initAxis2ClientOptions' is set to false, axis2
client options available
+ in the incoming message context is reused for the service
invocation.
+ When 'passHeaders' is set to true, SOAP Headers of the
received message is parsed
+ to the external service.
+ </p>
+ <p>
+ The source element specifies the payload for the request
message using an XPath
+ expression or a registry key.
+ When source element is not defined, entire SOAP Envelope
arrived at the Callout
+ mediator is treated as the source.
+ The target element specifies a node, at which the response
payload will be
+ attached into the current message, or the name of a
key/property using which the
+ response would be attached to the current message context
as a property.
+ When target element is not specified, entire SOAP Envelope
arrived to the
+ Callout mediator is replaced from the response received
from the external service
+ invocation.
+
+ </p>
+ <p>
Since the callout mediator performs a blocking call, it
cannot use the default
- non-blocking http/s transports based on Java NIO, and thus
defaults to using the
- samples/axis2Client/client_repo/conf/axis2.xml as the
Axis2 configuration, and
- samples/axis2Client/client_repo as the client repository
unless these are
- specified otherwise inside the 'configuration' sub-element.
+ non-blocking http/s transports based on Java NIO, and thus
defaults to
+ using the repository/conf/axis2_blocking_client.xml as the
+ Axis2 configuration, and repository/ as the client
repository
+ unless these are specified inside the 'configuration'
sub-element.
</p>
<p>
To invoke secured services, Callout mediator can be
configured to enable WS-Security
- using the enableSec element. Security policy should be
specified using the 'policy'
+ using the 'enableSec' element. Security policy should be
specified using the 'policy'
attribute which may point to a registry key or a local
entry. You can also specify
two different policies for inbound and outbound messages
(flows). This is done by
- using the 'inboundPolicy' and 'outboundPolicy' attributes.
- </p>
- <p>
- When the 'serviceURL' attribute is not present, the 'To'
header on the request
- is used as the target endpoint.
+ using the 'inboundPolicy' and 'outboundPolicy' attributes.
These security
+ configurations will not get activated if we configure the
external service using
+ the endpoint element. When endpoint is defined, security
settings can be
+ configured at the endpoint.
</p>
</subsection>
<subsection name="Clone Mediator" id="Clone">