JBossWS SVN: r11077 - common/tags.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-30 08:31:43 -0400 (Fri, 30 Oct 2009)
New Revision: 11077
Added:
common/tags/jbossws-common-1.0.0.GA_CP05/
Log:
[JBPAPP-2125] Tagging jbossws-common-1.0.0.GA_CP05
Copied: common/tags/jbossws-common-1.0.0.GA_CP05 (from rev 11076, common/branches/jbossws-common-1.0.0.GA_CP)
15 years, 1 month
JBossWS SVN: r11076 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP: src/test/java/org/jboss/test/ws/jaxws/jbws2682 and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-30 08:24:53 -0400 (Fri, 30 Oct 2009)
New Revision: 11076
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2682/JBWS2682TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
Log:
- [JBPAPP-2114] Updating to new jaxb lib, enabling test
- moving framework to snapshot
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2682/JBWS2682TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2682/JBWS2682TestCase.java 2009-10-30 12:05:00 UTC (rev 11075)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws2682/JBWS2682TestCase.java 2009-10-30 12:24:53 UTC (rev 11076)
@@ -95,12 +95,6 @@
public void testBadMessage() throws Exception
{
- if (true)
- {
- System.out.println("FIXME [JBWS-2682] Incorrect Parsing of Badly Formed int.");
- return;
- }
-
SOAPMessage response = sendMessage(this.badMsgString);
SOAPEnvelope resEnv = response.getSOAPPart().getEnvelope();
SOAPFault fault = resEnv.getBody().getFault();
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2009-10-30 12:05:00 UTC (rev 11075)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/version.properties 2009-10-30 12:24:53 UTC (rev 11076)
@@ -19,7 +19,7 @@
ibm-wsdl4j=1.6.2
jbpm-bpel=1.1.0.Beta5
stax-api=1.0
-sun-jaxb=2.1.4.patch02-brew
+sun-jaxb=2.1.4.patch03-brew
sun-jaxws=2.1.1
woodstox=3.1.1
wscommons-policy=1.0
@@ -27,7 +27,7 @@
# Dependend integration projects
jbossws-spi=1.0.0.GA_CP02-brew
jbossws-common=1.0.0.GA_CP-SNAPSHOT
-jbossws-framework=2.0.1.GA_CP04-brew
+jbossws-framework=2.0.1.GA_CP-SNAPSHOT
jbossws-jboss40=2.0.1.GA
jbossws-jboss42=2.0.1.GA_CP01
15 years, 1 month
JBossWS SVN: r11075 - framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-10-30 08:05:00 -0400 (Fri, 30 Oct 2009)
New Revision: 11075
Modified:
framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistry.java
framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistryMBean.java
Log:
[JBPAPP-2743] JBossWS - Make EndpointRegistry available through JMX
Modified: framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistry.java
===================================================================
--- framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistry.java 2009-10-30 10:35:37 UTC (rev 11074)
+++ framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistry.java 2009-10-30 12:05:00 UTC (rev 11075)
@@ -83,24 +83,20 @@
}
}
- /*
- * Currently there are no meaningful attributes/operations exposed via JMX
- *
- public void create() throws Exception
- {
- if (mbeanServer != null)
- {
- getMbeanServer().registerMBean(this, OBJECT_NAME);
- }
- }
+ public void create() throws Exception
+ {
+ if (mbeanServer != null)
+ {
+ getMbeanServer().registerMBean(this, OBJECT_NAME);
+ }
+ }
- public void destroy() throws Exception
- {
- log.debug("Destroy service endpoint manager");
- if (mbeanServer != null)
- {
- getMbeanServer().unregisterMBean(OBJECT_NAME);
- }
- }
- */
+ public void destroy() throws Exception
+ {
+ log.debug("Destroy service endpoint manager");
+ if (mbeanServer != null)
+ {
+ getMbeanServer().unregisterMBean(OBJECT_NAME);
+ }
+ }
}
Modified: framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistryMBean.java
===================================================================
--- framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistryMBean.java 2009-10-30 10:35:37 UTC (rev 11074)
+++ framework/branches/jbossws-framework-2.0.1.GA_CP/src/main/java/org/jboss/wsf/framework/management/ManagedEndpointRegistryMBean.java 2009-10-30 12:05:00 UTC (rev 11075)
@@ -24,12 +24,13 @@
import javax.management.ObjectName;
import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.spi.management.EndpointRegistry;
/**
* MBean interface.
* @since 15-April-2004
*/
-public interface ManagedEndpointRegistryMBean
+public interface ManagedEndpointRegistryMBean extends EndpointRegistry
{
/** The object name in the MBean server */
ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.ws:service=EndpointRegistry");
15 years, 1 month
JBossWS SVN: r11074 - in stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws/samples/dar and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-30 06:35:37 -0400 (Fri, 30 Oct 2009)
New Revision: 11074
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java
Log:
[JBPAPP-3041] backport
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2009-10-30 10:18:55 UTC (rev 11073)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2009-10-30 10:35:37 UTC (rev 11074)
@@ -112,6 +112,14 @@
<include name="jboss-service.xml"/>
</metainf>
</jar>
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms-client-test.sar">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-samples-dar-jms-client.war"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/dar/META-INF">
+ <include name="jboss-service.xml"/>
+ </metainf>
+ </jar>
<!-- jaxws-samples-jmstransport -->
<jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.jar">
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java 2009-10-30 10:18:55 UTC (rev 11073)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java 2009-10-30 10:35:37 UTC (rev 11074)
@@ -27,11 +27,17 @@
import java.net.URL;
import java.util.Date;
-import javax.management.ObjectName;
+import javax.jms.MessageConsumer;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
import junit.framework.Test;
-import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -47,13 +53,12 @@
public static Test suite()
{
- return new JBossWSTestSetup(JMSClientTestCase.class, "jaxws-samples-dar-jms-client.sar,jaxws-samples-dar-jms.jar");
+ return new JBossWSTestSetup(JMSClientTestCase.class, "jaxws-samples-dar-jms-client-test.sar,jaxws-samples-dar-jms.jar");
}
public void test() throws Exception
{
String url = "http://" + getServerHost() + ":8080/dar-jms-client/JMSClient";
- int count = getMessageCount("DarResponseQueue");
Date start = new Date();
HttpURLConnection connection = (HttpURLConnection)new URL(url).openConnection();
int responseCode = connection.getResponseCode();
@@ -70,14 +75,18 @@
assertTrue(buffer.toString().contains("Request message sent, doing something interesting in the mean time... ;-) "));
Date stop = new Date();
assertTrue(stop.getTime() - start.getTime() < TEST_RUN_TIME / 2);
- Thread.sleep(TEST_RUN_TIME);
- assertEquals(count + 1, getMessageCount("DarResponseQueue"));
+
+ //receive the message
+ InitialContext context = new InitialContext();
+ QueueConnectionFactory connectionFactory = (QueueConnectionFactory)context.lookup("ConnectionFactory");
+ QueueConnection con = connectionFactory.createQueueConnection();
+ QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+ Queue resQueue = (Queue)context.lookup("queue/DarResponseQueue");
+ con.start();
+ MessageConsumer consumer = session.createConsumer(resQueue);
+ TextMessage textMessage = (TextMessage)consumer.receive(TEST_RUN_TIME);
+ String result = textMessage.getText();
+ assertTrue(result != null);
+ con.stop();
}
-
- private int getMessageCount(String queue) throws Exception
- {
- ObjectName oname = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=" + queue);
- return (Integer)getServer().getAttribute(oname, "MessageCount");
- }
-
}
15 years, 1 month
Please confirm this way
by Rosalie Anis
Hello jbossws-commits,
Best regards,
Rosalie Anis
jbossws-commits(a)lists.jboss.org
15 years, 1 month
JBossWS SVN: r11073 - in stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests: src/test/java/org/jboss/test/ws/jaxws/samples/dar and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-30 06:18:55 -0400 (Fri, 30 Oct 2009)
New Revision: 11073
Modified:
stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java
Log:
[JBPAPP-3041] backport
Modified: stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2009-10-30 07:33:34 UTC (rev 11072)
+++ stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests/scripts/build-samples-jaxws.xml 2009-10-30 10:18:55 UTC (rev 11073)
@@ -112,6 +112,14 @@
<include name="jboss-service.xml"/>
</metainf>
</jar>
+ <jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-dar-jms-client-test.sar">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-samples-dar-jms-client.war"/>
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/samples/dar/META-INF">
+ <include name="jboss-service.xml"/>
+ </metainf>
+ </jar>
<!-- jaxws-samples-jmstransport -->
<jar jarfile="${tests.output.dir}/test-libs/jaxws-samples-jmstransport.jar">
Modified: stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java 2009-10-30 07:33:34 UTC (rev 11072)
+++ stack/native/branches/jbossws-native-3.1.2.SP4/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.java 2009-10-30 10:18:55 UTC (rev 11073)
@@ -27,11 +27,17 @@
import java.net.URL;
import java.util.Date;
-import javax.management.ObjectName;
+import javax.jms.MessageConsumer;
+import javax.jms.Queue;
+import javax.jms.QueueConnection;
+import javax.jms.QueueConnectionFactory;
+import javax.jms.QueueSession;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import javax.naming.InitialContext;
import junit.framework.Test;
-import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
@@ -47,13 +53,12 @@
public static Test suite()
{
- return new JBossWSTestSetup(JMSClientTestCase.class, "jaxws-samples-dar-jms-client.sar,jaxws-samples-dar-jms.jar");
+ return new JBossWSTestSetup(JMSClientTestCase.class, "jaxws-samples-dar-jms-client-test.sar,jaxws-samples-dar-jms.jar");
}
public void test() throws Exception
{
String url = "http://" + getServerHost() + ":8080/dar-jms-client/JMSClient";
- int count = getMessageCount("DarResponseQueue");
Date start = new Date();
HttpURLConnection connection = (HttpURLConnection)new URL(url).openConnection();
int responseCode = connection.getResponseCode();
@@ -70,14 +75,18 @@
assertTrue(buffer.toString().contains("Request message sent, doing something interesting in the mean time... ;-) "));
Date stop = new Date();
assertTrue(stop.getTime() - start.getTime() < TEST_RUN_TIME / 2);
- Thread.sleep(TEST_RUN_TIME);
- assertEquals(count + 1, getMessageCount("DarResponseQueue"));
+
+ //receive the message
+ InitialContext context = new InitialContext();
+ QueueConnectionFactory connectionFactory = (QueueConnectionFactory)context.lookup("ConnectionFactory");
+ QueueConnection con = connectionFactory.createQueueConnection();
+ QueueSession session = con.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
+ Queue resQueue = (Queue)context.lookup("queue/DarResponseQueue");
+ con.start();
+ MessageConsumer consumer = session.createConsumer(resQueue);
+ TextMessage textMessage = (TextMessage)consumer.receive(TEST_RUN_TIME);
+ String result = textMessage.getText();
+ assertTrue(result != null);
+ con.stop();
}
-
- private int getMessageCount(String queue) throws Exception
- {
- ObjectName oname = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=" + queue);
- return (Integer)getServer().getAttribute(oname, "MessageCount");
- }
-
}
15 years, 1 month
JBossWS SVN: r11072 - stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-30 03:33:34 -0400 (Fri, 30 Oct 2009)
New Revision: 11072
Removed:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/jmsservice.wsdl
Log:
removing unused wsdl
Deleted: stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/jmsservice.wsdl
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/jmsservice.wsdl 2009-10-30 06:23:57 UTC (rev 11071)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/resources/jaxws/samples/jmstransport/jmsservice.wsdl 2009-10-30 07:33:34 UTC (rev 11072)
@@ -1,55 +0,0 @@
-<definitions name='OrganizationJMSEndpointService' targetNamespace='http://org.jboss.ws/samples/jmstransport' xmlns='http://schemas.xmlsoap.org/wsdl/'
- xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://org.jboss.ws/samples/jmstransport' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
-
- <types></types>
-
- <message name='OrganizationJMSEndpoint_getContactInfoResponse'>
- <part name='return' type='xsd:string'></part>
- </message>
- <message name='OrganizationJMSEndpoint_getContactInfo'>
- <part name='arg0' type='xsd:string'></part>
- </message>
-
- <portType name='OrganizationJMSEndpoint'>
- <operation name='getContactInfo' parameterOrder='arg0'>
- <input message='tns:OrganizationJMSEndpoint_getContactInfo'></input>
- <output message='tns:OrganizationJMSEndpoint_getContactInfoResponse'></output>
- </operation>
- </portType>
-
- <binding name='HTTPBinding' type='tns:OrganizationJMSEndpoint'>
- <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
- <operation name='getContactInfo'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
- </output>
- </operation>
- </binding>
-
- <binding name='JMSBinding' type='tns:OrganizationJMSEndpoint'>
- <soap:binding style='rpc' transport='http://www.example.org/2006/06/soap/bindings/JMS/'/>
- <operation name='getContactInfo'>
- <soap:operation soapAction=''/>
- <input>
- <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
- </input>
- <output>
- <soap:body namespace='http://org.jboss.ws/samples/jmstransport' use='literal'/>
- </output>
- </operation>
- </binding>
-
- <service name='OrganizationJMSEndpointService'>
- <port binding='tns:HTTPBinding' name='HTTPEndpointPort'>
- <soap:address location='http://@jboss.bind.address@:8080/jaxws-samples-jmstransport/OrganizationJMSEndpoint'/>
- </port>
- <port binding='tns:JMSBinding' name='OrganizationJMSEndpointPort'>
- <soap:address location='jms://queue/RequestQueue?replyToName=queue/ResponseQueue'/>
- </port>
- </service>
-
-</definitions>
\ No newline at end of file
15 years, 1 month
JBossWS SVN: r11071 - framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-10-30 02:23:57 -0400 (Fri, 30 Oct 2009)
New Revision: 11071
Modified:
framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java
framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointJSE.java
Log:
[JBPAPP-2825] Fixing test (no changes to the stack behaviour)
Modified: framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java 2009-10-30 03:47:24 UTC (rev 11070)
+++ framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointEJB.java 2009-10-30 06:23:57 UTC (rev 11071)
@@ -21,7 +21,9 @@
*/
package org.jboss.test.ws.jaxws.samples.context;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.net.URI;
import java.security.Principal;
import javax.annotation.Resource;
@@ -85,7 +87,7 @@
return "fail";
// Check standard jaxws properties
- InputSource wsdlSource = (InputSource)msgContext.get(MessageContext.WSDL_DESCRIPTION);
+ Object wsdl = msgContext.get(MessageContext.WSDL_DESCRIPTION);
QName service = (QName)msgContext.get(MessageContext.WSDL_SERVICE);
QName portType = (QName)msgContext.get(MessageContext.WSDL_INTERFACE);
QName port = (QName)msgContext.get(MessageContext.WSDL_PORT);
@@ -102,8 +104,21 @@
try
{
- Element root = DOMUtils.parse(wsdlSource);
- new DOMWriter(System.out).setPrettyprint(true).print(root);
+ Element root = null;
+ if (wsdl instanceof InputSource)
+ {
+ root = DOMUtils.parse((InputSource)wsdl);
+ }
+ else if (wsdl instanceof URI)
+ {
+ root = DOMUtils.parse(((URI)wsdl).toURL().openStream());
+ }
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ new DOMWriter(out).setPrettyprint(true).print(root);
+ if (!out.toString().contains("http://schemas.xmlsoap.org/wsdl/"))
+ {
+ throw new WebServiceException("Not a wsdl");
+ }
}
catch (IOException ex)
{
Modified: framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointJSE.java
===================================================================
--- framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointJSE.java 2009-10-30 03:47:24 UTC (rev 11070)
+++ framework/branches/jbossws-framework-3.1.2.SP5/testsuite/test/java/org/jboss/test/ws/jaxws/samples/context/EndpointJSE.java 2009-10-30 06:23:57 UTC (rev 11071)
@@ -21,7 +21,9 @@
*/
package org.jboss.test.ws.jaxws.samples.context;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.net.URI;
import java.security.Principal;
import javax.annotation.Resource;
@@ -61,7 +63,7 @@
return "fail";
// Check standard jaxws properties
- InputSource wsdlSource = (InputSource)msgContext.get(MessageContext.WSDL_DESCRIPTION);
+ Object wsdl = msgContext.get(MessageContext.WSDL_DESCRIPTION);
QName service = (QName)msgContext.get(MessageContext.WSDL_SERVICE);
QName portType = (QName)msgContext.get(MessageContext.WSDL_INTERFACE);
QName port = (QName)msgContext.get(MessageContext.WSDL_PORT);
@@ -76,10 +78,24 @@
if (!operation.equals(new QName("http://org.jboss.ws/jaxws/context", "testMessageContextProperties")))
throw new WebServiceException("Invalid qname: " + operation);
+
try
{
- Element root = DOMUtils.parse(wsdlSource);
- new DOMWriter(System.out).setPrettyprint(true).print(root);
+ Element root = null;
+ if (wsdl instanceof InputSource)
+ {
+ root = DOMUtils.parse((InputSource)wsdl);
+ }
+ else if (wsdl instanceof URI)
+ {
+ root = DOMUtils.parse(((URI)wsdl).toURL().openStream());
+ }
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ new DOMWriter(out).setPrettyprint(true).print(root);
+ if (!out.toString().contains("http://schemas.xmlsoap.org/wsdl/"))
+ {
+ throw new WebServiceException("Not a wsdl");
+ }
}
catch (IOException ex)
{
15 years, 1 month