You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2008/04/09 09:06:20 UTC
svn commit: r646202 - in
/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main:
java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml
Author: antelder
Date: Wed Apr 9 00:06:19 2008
New Revision: 646202
URL: http://svn.apache.org/viewvc?rev=646202&view=rev
Log:
TUSCANY-2207: apply patch from giorgio - First steps towards Axis MTOM Support. (hopefully his userid will turn up soon)
Modified:
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml
Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java?rev=646202&r1=646201&r2=646202&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceClient.java Wed Apr 9 00:06:19 2008
@@ -87,6 +87,7 @@
private ServiceClient serviceClient;
Map<ClassLoader, List<PolicyHandlerTuple>> policyHandlerClassnames = null;
private static final QName SOAP12_INTENT = new QName("http://www.osoa.org/xmlns/sca/1.0", "soap12");
+ private static final QName MTOM_INTENT = new QName("http://www.osoa.org/xmlns/sca/1.0", "MTOM");
private List<PolicyHandler> policyHandlerList = new ArrayList<PolicyHandler>();
public Axis2ServiceClient(RuntimeComponent component,
@@ -346,13 +347,17 @@
SOAPFactory soapFactory =
requiresSOAP12() ? OMAbstractFactory.getSOAP12Factory() : OMAbstractFactory.getSOAP11Factory();
QName wsdlOperationQName = new QName(operationName);
-
+ if (requiresMTOM())
+ {
+ options.setProperty(org.apache.axis2.Constants.Configuration.ENABLE_MTOM, org.apache.axis2.Constants.VALUE_TRUE);
+ }
Axis2BindingInvoker invoker;
if (operation.isNonBlocking()) {
invoker = new Axis2OneWayBindingInvoker(this, wsdlOperationQName, options, soapFactory, policyHandlerList);
} else {
invoker = new Axis2BindingInvoker(this, wsdlOperationQName, options, soapFactory, policyHandlerList);
}
+
return invoker;
}
@@ -361,6 +366,17 @@
List<Intent> intents = ((IntentAttachPoint)wsBinding).getRequiredIntents();
for (Intent intent : intents) {
if (SOAP12_INTENT.equals(intent.getName())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ private boolean requiresMTOM() {
+ if (wsBinding instanceof IntentAttachPoint) {
+ List<Intent> intents = ((IntentAttachPoint)wsBinding).getRequiredIntents();
+ for (Intent intent : intents) {
+ if (MTOM_INTENT.equals(intent.getName())) {
return true;
}
}
Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml?rev=646202&r1=646201&r2=646202&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/resources/org/apache/tuscany/sca/binding/ws/axis2/definitions.xml Wed Apr 9 00:06:19 2008
@@ -46,4 +46,10 @@
Communitcation thro this binding requires SOAP 1.2
</sca:description>
</sca:intent>
+ <sca:intent name="MTOM"
+ constrains="sca:binding.ws">
+ <sca:description>
+ Communitcation thro this binding requires MTOM support
+ </sca:description>
+ </sca:intent>
</sca:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org