Author: thomas.diesler(a)jboss.com
Date: 2007-10-11 06:28:23 -0400 (Thu, 11 Oct 2007)
New Revision: 4737
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/Constants.java
stack/native/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java
Log:
[JBWS-1761] WSProvide ignores SOAPBinding declaration
Modified: stack/native/trunk/src/main/java/org/jboss/ws/Constants.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/Constants.java 2007-10-11 10:19:45 UTC
(rev 4736)
+++ stack/native/trunk/src/main/java/org/jboss/ws/Constants.java 2007-10-11 10:28:23 UTC
(rev 4737)
@@ -90,11 +90,12 @@
static final String URI_SOAP11_ENC = SOAPConstants.URI_NS_SOAP_ENCODING;
/** SOAP-1.2 encoding URI */
static final String URI_SOAP12_ENC = SOAPConstants.URI_NS_SOAP_1_2_ENCODING;
- /** Literal encoding URI */
+ /** SOAP HTTP transport URI in wsdl soap binding */
+ static final String URI_SOAP_HTTP = "http://schemas.xmlsoap.org/soap/http";
+ /** Literal encoding URI */
static final String URI_LITERAL_ENC = "";
/** WSDL 2.0 Encoding Rules */
static final String URI_STYLE_RPC =
"http://www.w3.org/2004/03/wsdl/style/rpc";
-
static final String URI_STYLE_DOCUMENT =
"http://www.w3.org/2004/03/wsdl/style/iri";
/** WS-Eventing namespace uri **/
Modified: stack/native/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2007-10-11
10:19:45 UTC (rev 4736)
+++ stack/native/trunk/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2007-10-11
10:28:23 UTC (rev 4737)
@@ -472,9 +472,8 @@
// The value of the REQUIRED transport attribute (of type xs:anyURI) indicates
which transport of SOAP this binding corresponds to.
// The URI value "http://schemas.xmlsoap.org/soap/http" corresponds to
the HTTP binding.
// Other URIs may be used here to indicate other transports (such as SMTP, FTP,
etc.).
- String soapHTTPTransport = "http://schemas.xmlsoap.org/soap/http";
- buffer.append("<" + soapPrefix + ":binding
transport='" + soapHTTPTransport + "' style='" + style +
"'/>");
+ buffer.append("<" + soapPrefix + ":binding
transport='" + Constants.URI_SOAP_HTTP + "' style='" + style +
"'/>");
appendBindingOperations(buffer, binding);
buffer.append("</binding>");
}
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java 2007-10-11
10:19:45 UTC (rev 4736)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/binding/SOAPBindingTestCase.java 2007-10-11
10:28:23 UTC (rev 4737)
@@ -23,8 +23,6 @@
// $Id: $
-import static javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING;
-
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -42,9 +40,7 @@
import junit.framework.Test;
import org.jboss.ws.Constants;
-import org.jboss.ws.metadata.wsdl.WSDLBinding;
import org.jboss.ws.metadata.wsdl.WSDLDefinitions;
-import org.jboss.ws.metadata.wsdl.WSDLExtensibilityElement;
import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
@@ -73,14 +69,14 @@
URL wsdlURL = new URL(TARGET_ENDPOINT_ADDRESS + "?wsdl");
//Element root = DOMUtils.parse(wsdlURL.openStream());
//System.out.println(DOMWriter.printNode(root, true));
-
+
WSDLDefinitions defs = WSDLDefinitionsFactory.newInstance().parse(wsdlURL);
Definition wsdl = defs.getWsdlOneOneDefinition();
-
+
QName qname = new QName("http://org.jboss.ws/jaxws/binding",
"SOAPEndpointBinding");
Binding wsdlBinding = wsdl.getBinding(qname);
assertNotNull("Cannot find: " + qname, wsdlBinding);
-
+
String transport = null;
List<ExtensibilityElement> extList = wsdlBinding.getExtensibilityElements();
for (ExtensibilityElement ext : extList)
@@ -95,7 +91,7 @@
transport = soapBinding.getTransportURI();
}
}
- assertEquals("Invalid transport uri", SOAP12HTTP_BINDING, transport);
+ assertEquals("Invalid transport uri", Constants.URI_SOAP_HTTP,
transport);
}
public void testClientAccess() throws Exception
Show replies by date