Author: richard.opalka(a)jboss.com
Date: 2010-10-18 04:58:38 -0400 (Mon, 18 Oct 2010)
New Revision: 13144
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesFactory.java
Log:
[JBWS-3140][JBWS-3141] implementing parsing of <addressing> <enable-mtom>
<mtom-threshold> & <respect-binding> elements and updated MD accordingly
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java 2010-10-18
07:39:48 UTC (rev 13143)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/PortComponentMetaData.java 2010-10-18
08:58:38 UTC (rev 13144)
@@ -77,7 +77,16 @@
// -----------------------------------------
// JAX-WS additions
- private boolean enableMtom;
+ // 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;
private QName wsdlService;
private String protocolBinding;
private UnifiedHandlerChainsMetaData handlerChains;
@@ -180,16 +189,77 @@
this.secureWSDLAccess = secureWSDLAccess;
}
+ /**
+ * @deprecated Use {@link #isMtomEnabled()} instead.
+ */
+ @Deprecated
public boolean isEnableMtom()
{
- 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;
+ }
+
public QName getWsdlService()
{
return wsdlService;
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesFactory.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesFactory.java 2010-10-18
07:39:48 UTC (rev 13143)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/webservices/WebservicesFactory.java 2010-10-18
08:58:38 UTC (rev 13144)
@@ -291,9 +291,21 @@
portComponent.setWsdlService(navigator.resolveQName(value));
else if (localName.equals("protocol-binding"))
portComponent.setProtocolBinding(value);
+ // @Addressing related elements
+ else if (localName.equals("enabled"))
+ portComponent.setAddressingEnabled(Boolean.valueOf(value));
+ else if (localName.equals("required"))
+ portComponent.setAddressingRequired(Boolean.valueOf(value));
+ else if (localName.equals("responses"))
+ portComponent.setAddressingResponses(value);
+ // @MTOM related elements
else if (localName.equals("enable-mtom"))
- portComponent.setEnableMtom(Boolean.valueOf(value));
-
+ portComponent.setMtomEnabled(Boolean.valueOf(value));
+ else if (localName.equals("mtom-threshold"))
+ portComponent.setMtomThreshold(Integer.valueOf(value));
+ // @RespectBinding related elements
+ else if (localName.equals("respect-binding"))
+ portComponent.setRespectBindingEnabled(Boolean.valueOf(value));
}
/**
Show replies by date