Author: richard.opalka(a)jboss.com
Date: 2010-09-23 04:31:11 -0400 (Thu, 23 Sep 2010)
New Revision: 13011
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
Log:
[JBWS-3133] ServiceRef & PortComponentRef UMDM now respects @Addressing, @MTOM and
@RespectBinding MDs
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2010-09-23
08:07:06 UTC (rev 13010)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedPortComponentRefMetaData.java 2010-09-23
08:31:11 UTC (rev 13011)
@@ -37,13 +37,13 @@
*/
public class UnifiedPortComponentRefMetaData extends ServiceRefElement
{
+ private static final long serialVersionUID = 8622309745808960649L;
+
// The parent service-ref
private UnifiedServiceRefMetaData serviceRefMetaData;
// The required <service-endpoint-interface> element
private String serviceEndpointInterface;
- // The optional <enable-mtom> element
- private Boolean enableMTOM = Boolean.FALSE;
// The optional <port-component-link> element
private String portComponentLink;
// The optional <port-qname> element
@@ -56,6 +56,16 @@
private String configName;
// The optional JBossWS config-file
private String configFile;
+ // The optional <adressing> element
+ private boolean addressingEnabled;
+ private boolean addressingRequired;
+ private String addressingResponses = "ALL";
+ // The optional <enable-mtom> element
+ private boolean mtomEnabled;
+ // The optional <mtom-threshold> element
+ private int mtomThreshold;
+ // @RespectBinding annotation metadata
+ private boolean respectBindingEnabled;
public UnifiedPortComponentRefMetaData(UnifiedServiceRefMetaData serviceRefMetaData)
{
@@ -69,6 +79,12 @@
configFile = pcref.configFile;
callProperties = pcref.callProperties;
stubProperties = pcref.stubProperties;
+ addressingEnabled = pcref.addressingEnabled;
+ addressingRequired = pcref.addressingRequired;
+ addressingResponses = pcref.addressingResponses;
+ mtomEnabled = pcref.mtomEnabled;
+ mtomThreshold = pcref.mtomThreshold;
+ respectBindingEnabled = pcref.respectBindingEnabled;
}
public UnifiedServiceRefMetaData getServiceRefMetaData()
@@ -76,16 +92,77 @@
return serviceRefMetaData;
}
+ /**
+ * @deprecated Use {@link #isMtomEnabled()} instead.
+ */
+ @Deprecated
public Boolean getEnableMTOM()
{
- return enableMTOM;
+ return mtomEnabled;
}
+ /**
+ * @deprecated Use {@link #setMtomEnabled(boolean)} instead.
+ */
+ @Deprecated
public void setEnableMTOM(Boolean enableMTOM)
{
- this.enableMTOM = enableMTOM;
+ this.mtomEnabled = enableMTOM;
}
+ public void setAddressingEnabled(final boolean addressingEnabled) {
+ this.addressingEnabled = addressingEnabled;
+ }
+
+ public boolean isAddressingEnabled() {
+ return this.addressingEnabled;
+ }
+
+ public void setAddressingRequired(final boolean addressingRequired) {
+ this.addressingRequired = addressingRequired;
+ }
+
+ public boolean isAddressingRequired() {
+ return this.addressingRequired;
+ }
+
+ public void setAddressingResponses(final String responsesTypes)
+ {
+ if (!"ANONYMOUS".equals(responsesTypes) &&
!"NON_ANONYMOUS".equals(responsesTypes) &&
!"ALL".equals(responsesTypes))
+ throw new IllegalArgumentException("Only ALL, ANONYMOUS or NON_ANONYMOUS
strings are allowed");
+
+ this.addressingResponses = responsesTypes;
+ }
+
+ public String getAddressingResponses() {
+ return this.addressingResponses;
+ }
+
+ public void setMtomEnabled(final boolean mtomEnabled) {
+ this.mtomEnabled = mtomEnabled;
+ }
+
+ public boolean isMtomEnabled() {
+ return this.mtomEnabled;
+ }
+
+ public void setMtomThreshold(final int mtomThreshold)
+ {
+ this.mtomThreshold = mtomThreshold;
+ }
+
+ public int getMtomThreshold() {
+ return this.mtomThreshold;
+ }
+
+ public void setRespectBindingEnabled(final boolean respectBindingEnabled) {
+ this.respectBindingEnabled = respectBindingEnabled;
+ }
+
+ public boolean isRespectBindingEnabled() {
+ return this.respectBindingEnabled;
+ }
+
/**
* The port-component-link element links a port-component-ref
* to a specific port-component required to be made available
@@ -215,7 +292,12 @@
str.append("\nUnifiedPortComponentRef");
str.append("\n serviceEndpointInterface=" + serviceEndpointInterface);
str.append("\n portQName=" + portQName);
- str.append("\n enableMTOM=" + enableMTOM);
+ str.append("\n addressingEnabled=" + addressingEnabled);
+ str.append("\n addressingRequired=" + addressingRequired);
+ str.append("\n addressingResponses=" + addressingResponses);
+ str.append("\n mtomEnabled=" + mtomEnabled);
+ str.append("\n mtomThreshold=" + mtomThreshold);
+ str.append("\n respectBindingEnabled=" + respectBindingEnabled);
str.append("\n portComponentLink=" + portComponentLink);
str.append("\n callProperties=" + callProperties);
str.append("\n stubProperties=" + stubProperties);
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2010-09-23
08:07:06 UTC (rev 13010)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/j2ee/serviceref/UnifiedServiceRefMetaData.java 2010-09-23
08:31:11 UTC (rev 13011)
@@ -127,16 +127,16 @@
{
}
- public void setAddressingEnabled() {
- this.addressingEnabled = true;
+ public void setAddressingEnabled(final boolean addressingEnabled) {
+ this.addressingEnabled = addressingEnabled;
}
public boolean isAddressingEnabled() {
return this.addressingEnabled;
}
- public void setAddressingRequired() {
- this.addressingRequired = true;
+ public void setAddressingRequired(final boolean addressingRequired) {
+ this.addressingRequired = addressingRequired;
}
public boolean isAddressingRequired() {
@@ -146,7 +146,7 @@
public void setAddressingResponses(final String responsesTypes)
{
if (!"ANONYMOUS".equals(responsesTypes) &&
!"NON_ANONYMOUS".equals(responsesTypes) &&
!"ALL".equals(responsesTypes))
- throw new IllegalArgumentException("Only ALL, ANONYMOUS or NON_ANONYMOUS
strings allowed");
+ throw new IllegalArgumentException("Only ALL, ANONYMOUS or NON_ANONYMOUS
strings are allowed");
this.addressingResponses = responsesTypes;
}
@@ -155,25 +155,25 @@
return this.addressingResponses;
}
- public void setMtomEnabled() {
- this.mtomEnabled = true;
+ public void setMtomEnabled(final boolean mtomEnabled) {
+ this.mtomEnabled = mtomEnabled;
}
public boolean isMtomEnabled() {
return this.mtomEnabled;
}
- public void setMtomThreshold(final int threshold)
+ public void setMtomThreshold(final int mtomThreshold)
{
- this.mtomThreshold = threshold;
+ this.mtomThreshold = mtomThreshold;
}
public int getMtomThreshold() {
return this.mtomThreshold;
}
- public void setRespectBindingEnabled() {
- this.respectBindingEnabled = true;
+ public void setRespectBindingEnabled(final boolean respectBindingEnabled) {
+ this.respectBindingEnabled = respectBindingEnabled;
}
public boolean isRespectBindingEnabled() {
@@ -188,7 +188,13 @@
configFile = sourceRef.configFile;
wsdlOverride = sourceRef.wsdlOverride;
handlerChain = sourceRef.handlerChain;
- callProperties = sourceRef.callProperties;
+ callProperties = sourceRef.callProperties;
+ addressingEnabled = sourceRef.addressingEnabled;
+ addressingRequired = sourceRef.addressingRequired;
+ addressingResponses = sourceRef.addressingResponses;
+ mtomEnabled = sourceRef.mtomEnabled;
+ mtomThreshold = sourceRef.mtomThreshold;
+ respectBindingEnabled = sourceRef.respectBindingEnabled;
if (serviceQName == null && sourceRef.serviceQName != null)
serviceQName = sourceRef.serviceQName;
@@ -590,6 +596,12 @@
str.append("\n configName=" + configName);
str.append("\n configFile=" + configFile);
str.append("\n callProperties=" + callProperties);
+ str.append("\n addressingEnabled=" + addressingEnabled);
+ str.append("\n addressingRequired=" + addressingRequired);
+ str.append("\n addressingResponses=" + addressingResponses);
+ str.append("\n mtomEnabled=" + mtomEnabled);
+ str.append("\n mtomThreshold=" + mtomThreshold);
+ str.append("\n respectBindingEnabled=" + respectBindingEnabled);
str.append("\n processed=" + processed);
str.append("\n handlerChains=" + handlerChains);
str.append("\n handlerChain=" + handlerChain);
Show replies by date