diff options
author | lauzond | 2007-02-02 19:24:28 +0000 |
---|---|---|
committer | lauzond | 2007-02-02 19:24:28 +0000 |
commit | 157124027a887002dde8c8d7cb2ba9bddb3d94f0 (patch) | |
tree | 814e99b6184772d3f3d74370c1d24851e8b37208 | |
parent | a440d44b70dfe51aa4a1d2ef7c1d9727f0530095 (diff) | |
download | webtools.webservices-157124027a887002dde8c8d7cb2ba9bddb3d94f0.tar.gz webtools.webservices-157124027a887002dde8c8d7cb2ba9bddb3d94f0.tar.xz webtools.webservices-157124027a887002dde8c8d7cb2ba9bddb3d94f0.zip |
[172511] tolerate SOAP 1.2 messages
3 files changed, 38 insertions, 3 deletions
diff --git a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIConstants.java b/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIConstants.java index 505f3e491..4ec7c470d 100644 --- a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIConstants.java +++ b/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/WSIConstants.java @@ -127,7 +127,7 @@ public interface WSIConstants { * WSDL SOAP binding namespace. */ public final static String NS_URI_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"; - + public final static String NS_URI_WSDL_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/"; public final static String NS_NAME_WSDL_SOAP = "soap"; /** @@ -480,5 +480,4 @@ public interface WSIConstants { public static final String HTTP_PREFIX = "http:"; public static final String FILE_PROTOCOL = "file:///"; public static final String WSI_PREFIX = "WS-I: "; - }
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/analyzer/BasicProfileAnalyzer.java b/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/analyzer/BasicProfileAnalyzer.java index ef81bd021..2e7ba7f59 100644 --- a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/analyzer/BasicProfileAnalyzer.java +++ b/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/analyzer/BasicProfileAnalyzer.java @@ -42,6 +42,7 @@ import org.eclipse.wst.wsi.internal.core.util.ArtifactType; import org.eclipse.wst.wsi.internal.core.util.UDDIUtils; import org.eclipse.wst.wsi.internal.core.util.WSIProperties; import org.eclipse.wst.wsi.internal.core.wsdl.WSDLDocument; +import org.eclipse.wst.wsi.internal.core.wsdl.WSDLUtils; import org.eclipse.wst.wsi.internal.core.xml.XMLDocumentCache; import org.uddi4j.client.UDDIProxy; import org.uddi4j.datatype.binding.BindingTemplate; @@ -252,7 +253,15 @@ public class BasicProfileAnalyzer extends Analyzer "WSDL document was either not found or could not be " + "processed.")); } - analyzerContext.setWsdlDocument(wsdlDocument); + + /* + * Only validate messages against a wsdl document if the wsdl document + * does not contain soap 1.2 bindings. + */ + if (WSDLUtils.isSOAP12WSDL(wsdlDocument) && getAnalyzerConfig().getLogLocation() != null) + getAnalyzerConfig().setWSDLReference(null); + else + analyzerContext.setWsdlDocument(wsdlDocument); // Start writing report this.reporter.startReport(); diff --git a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/wsdl/WSDLUtils.java b/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/wsdl/WSDLUtils.java index f175be340..3a7b61b69 100644 --- a/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/wsdl/WSDLUtils.java +++ b/bundles/org.eclipse.wst.wsi/src/org/eclipse/wst/wsi/internal/core/wsdl/WSDLUtils.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.wst.wsi.internal.core.wsdl; +import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -381,4 +382,30 @@ public final class WSDLUtils return returnSet; } + + public static boolean isSOAP12WSDL(WSDLDocument wsdlDocument) + { + boolean result = false; + if (wsdlDocument != null) + { + Binding[] bindings = wsdlDocument.getBindings(); + List extensibilityElementList = new ArrayList(); + if (bindings != null) + { + for (int i = 0; i < bindings.length; i++) + extensibilityElementList.addAll(bindings[i].getExtensibilityElements()); + Iterator iterator = extensibilityElementList.iterator(); + while (iterator.hasNext()) + { + ExtensibilityElement e = (ExtensibilityElement) iterator.next(); + if (WSIConstants.NS_URI_WSDL_SOAP12.equals(e.getElementType().getNamespaceURI())) + { + result = true; + break; + } + } + } + } + return result; + } } |