Author: darran.lofthouse(a)jboss.com
Date: 2007-05-11 10:54:59 -0400 (Fri, 11 May 2007)
New Revision: 3051
Modified:
branches/dlofthouse/JBWS-1648/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java
Log:
Rollback changes to testcase.
Modified:
branches/dlofthouse/JBWS-1648/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java
===================================================================
---
branches/dlofthouse/JBWS-1648/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java 2007-05-11
14:38:19 UTC (rev 3050)
+++
branches/dlofthouse/JBWS-1648/jbossws-tests/src/java/org/jboss/test/ws/jaxrpc/jbws1186/JBWS1186TestCase.java 2007-05-11
14:54:59 UTC (rev 3051)
@@ -24,13 +24,10 @@
import java.io.ByteArrayInputStream;
import java.io.File;
import java.net.URL;
-import java.util.Iterator;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.soap.MessageFactory;
-import javax.xml.soap.Name;
-import javax.xml.soap.Node;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.soap.SOAPElement;
@@ -41,7 +38,6 @@
import org.jboss.test.ws.JBossWSTest;
import org.jboss.test.ws.JBossWSTestSetup;
import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl;
-import org.jboss.ws.core.soap.NameImpl;
/**
* The prefix "xsi" for attribute "xsi:nil" is not bound
@@ -106,33 +102,24 @@
public void testMessageAccess() throws Exception
{
MessageFactory factory = MessageFactory.newInstance();
-
+
// The xsi namespace is declared on the envelope
String reqStr =
- "<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
- " <env:Body>" +
- " <ns1:echo
xmlns:ns1='http://org.jboss.test.ws/jbws1186'>" +
- " <String_1 xsi:nil='1'/>" +
- " <UserType_2>" +
- " <name xsi:nil='1'/>" +
- " </UserType_2>" +
- " </ns1:echo>" +
- " </env:Body>" +
+ "<env:Envelope
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+ " <env:Body>" +
+ " <ns1:echo
xmlns:ns1='http://org.jboss.test.ws/jbws1186'>" +
+ " <String_1 xsi:nil='1'/>" +
+ " <UserType_2>" +
+ " <name xsi:nil='1'/>" +
+ " </UserType_2>" +
+ " </ns1:echo>" +
+ " </env:Body>" +
"</env:Envelope>";
-
+
SOAPMessage reqMessage = factory.createMessage(null, new
ByteArrayInputStream(reqStr.getBytes()));
SOAPConnection con = SOAPConnectionFactory.newInstance().createConnection();
SOAPMessage resMessage = con.call(reqMessage, "http://" + getServerHost()
+ ":8080/jaxrpc-jbws1186");
SOAPElement soapElement =
(SOAPElement)resMessage.getSOAPBody().getChildElements().next();
- Name headerName = new NameImpl("Bar", "ns2",
"http://org.jboss.ws/header2");
-
- Iterator it = soapElement.getChildElements();
- while (it.hasNext())
- {
- Object currentNode = (Node)it.next();
- System.out.println(currentNode.getClass().getName());
- }
-
soapElement = (SOAPElement)soapElement.getChildElements().next();
assertEquals("1", soapElement.getAttribute("xsi:nil"));
}