Author: richard.opalka(a)jboss.com
Date: 2010-03-17 10:43:56 -0400 (Wed, 17 Mar 2010)
New Revision: 11798
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java
Log:
[JBWS-2960] fixing test to be generic and stack agnostic
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java 2010-03-17
10:49:39 UTC (rev 11797)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2960/JBWS2960TestCase.java 2010-03-17
14:43:56 UTC (rev 11798)
@@ -26,6 +26,7 @@
import javax.wsdl.Definition;
import javax.wsdl.Operation;
+import javax.wsdl.Port;
import javax.wsdl.PortType;
import javax.wsdl.extensions.UnknownExtensibilityElement;
import javax.wsdl.factory.WSDLFactory;
@@ -84,8 +85,9 @@
{
Definition wsdl = getWSDLDefinition(wsdlFile.getAbsolutePath());
List definitionExtElements = wsdl.getExtensibilityElements();
- QName bindingQName = new
QName("http://foobar.org/",
"AddNumbersPortBinding");
- List bindingExtElements =
wsdl.getBinding(bindingQName).getExtensibilityElements();
+ QName serviceQName = new
QName("http://foobar.org/",
"AddNumbersService");
+ Port wsdlPort = wsdl.getService(serviceQName).getPort("AddNumbersPort");
+ List bindingExtElements = wsdlPort.getBinding().getExtensibilityElements();
Element policyElement = this.getRequiredElement(definitionExtElements,
POLICY_QNAME);
Element policyReferenceElement = this.getRequiredElement(bindingExtElements,
POLICY_REFERENCE_QNAME);
String wsuIdAttrValue =
policyElement.getAttributeNS("http://docs.oasis-open.org/wss/2004/01...;,
"Id");