You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ch...@apache.org on 2006/10/24 12:01:08 UTC
svn commit: r467299 - in
/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm:
CreateSequenceResponseTest.java CreateSequenceTest.java
MakeConnectionTest.java
Author: chamikara
Date: Tue Oct 24 03:01:07 2006
New Revision: 467299
URL: http://svn.apache.org/viewvc?view=rev&rev=467299
Log:
Updated the test cases.
Modified:
webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java
webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java
webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/MakeConnectionTest.java
Modified: webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java?view=diff&rev=467299&r1=467298&r2=467299
==============================================================================
--- webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java (original)
+++ webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceResponseTest.java Tue Oct 24 03:01:07 2006
@@ -21,6 +21,7 @@
import org.apache.sandesha2.Sandesha2Constants;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axiom.om.OMAbstractFactory;
@@ -39,7 +40,7 @@
}
- public void testFromOMElement() throws SandeshaException {
+ public void testFromOMElement() throws AxisFault {
CreateSequenceResponse res = new CreateSequenceResponse(rmNamespaceValue,addressingNamespaceValue);
SOAPEnvelope env = getSOAPEnvelope("", "CreateSequenceResponse.xml");
res.fromOMElement(env.getBody());
@@ -48,13 +49,12 @@
assertEquals("uuid:88754b00-161a-11da-b6d6-8198de3c47c5", identifier.getIdentifier());
Accept accept = res.getAccept();
- AcksTo acksTo = accept.getAcksTo();
- Address address = acksTo.getAddress();
- assertEquals("http://localhost:8070/axis/services/TestService", address.getEpr().getAddress());
+ AcksTo acksTo = accept.getAcksTo ();
+ assertEquals("http://localhost:8070/axis/services/TestService", acksTo.getEPR().getAddress());
}
- public void testToSOAPEnvelope() throws SandeshaException {
+ public void testToSOAPEnvelope() throws AxisFault {
CreateSequenceResponse res = new CreateSequenceResponse(rmNamespaceValue,addressingNamespaceValue);
Identifier identifier = new Identifier(rmNamespaceValue);
@@ -64,8 +64,7 @@
Accept accept = new Accept(rmNamespaceValue,addressingNamespaceValue);
AcksTo acksTo = new AcksTo(rmNamespaceValue,addressingNamespaceValue);
Address address = new Address(addressingNamespaceValue);
- address.setEpr(new EndpointReference("http://localhost:8070/axis/services/TestService"));
- acksTo.setAddress(address);
+ acksTo.setAddress (new EndpointReference ("http://localhost:8070/axis/services/TestService"));
accept.setAcksTo(acksTo);
res.setAccept(accept);
Modified: webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java?view=diff&rev=467299&r1=467298&r2=467299
==============================================================================
--- webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java (original)
+++ webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/CreateSequenceTest.java Tue Oct 24 03:01:07 2006
@@ -22,6 +22,7 @@
import org.apache.axiom.om.OMElement;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.sandesha2.Sandesha2Constants;
@@ -38,13 +39,13 @@
super("CreateSequenceTest");
}
- public void testfromOMElement() throws SandeshaException {
+ public void testfromOMElement() throws AxisFault {
+
CreateSequence createSequence = new CreateSequence(rmNamespaceValue,addressingNamespaceValue);
createSequence.fromOMElement(getSOAPEnvelope("", "CreateSequence.xml").getBody());
AcksTo acksTo = createSequence.getAcksTo();
- Address address = acksTo.getAddress();
- assertEquals("http://127.0.0.1:9090/axis/services/RMService", address.getEpr().getAddress());
+ assertEquals("http://127.0.0.1:9090/axis/services/RMService", acksTo.getEPR().getAddress());
SequenceOffer offer = createSequence.getSequenceOffer();
Identifier identifier = offer.getIdentifer();
@@ -52,13 +53,11 @@
}
- public void testToSOAPEnvelope() throws SandeshaException {
+ public void testToSOAPEnvelope() throws AxisFault {
CreateSequence createSequence = new CreateSequence(rmNamespaceValue,addressingNamespaceValue);
AcksTo acksTo = new AcksTo(rmNamespaceValue,addressingNamespaceValue);
- Address address = new Address(addressingNamespaceValue);
- address.setEpr(new EndpointReference("http://127.0.0.1:9090/axis/services/RMService"));
- acksTo.setAddress(address);
+ acksTo.setAddress(new EndpointReference("http://127.0.0.1:9090/axis/services/RMService"));
createSequence.setAcksTo(acksTo);
SequenceOffer sequenceOffer = new SequenceOffer(rmNamespaceValue);
Modified: webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/MakeConnectionTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/MakeConnectionTest.java?view=diff&rev=467299&r1=467298&r2=467299
==============================================================================
--- webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/MakeConnectionTest.java (original)
+++ webservices/sandesha/trunk/java/test/src/org/apache/sandesha2/wsrm/MakeConnectionTest.java Tue Oct 24 03:01:07 2006
@@ -22,6 +22,7 @@
import org.apache.axiom.om.OMElement;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.AddressingConstants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.sandesha2.Sandesha2Constants;
@@ -38,7 +39,7 @@
super("MakeConnectionTest");
}
- public void testfromOMElement() throws SandeshaException {
+ public void testfromOMElement() throws AxisFault {
MakeConnection makeConnection = new MakeConnection(rmNamespaceValue);
SOAPEnvelope envelope = getSOAPEnvelope("", "MakeConnection.xml");
OMElement makeConnectionElement = envelope.getBody().getFirstChildWithName(new QName (rmNamespaceValue,Sandesha2Constants.WSRM_COMMON.MAKE_CONNECTION));
@@ -50,16 +51,15 @@
Address address = makeConnection.getAddress();
assertNotNull(address);
- assertEquals(address.getEpr().getAddress(),"http://docs.oasis-open.org/wsrx/wsrm/200608/anonymous?id=550e8400-e29b-11d4-a716-446655440000");
+ assertEquals(address.getAddress(),"http://docs.oasis-open.org/wsrx/wsrm/200608/anonymous?id=550e8400-e29b-11d4-a716-446655440000");
}
public void testToSOAPEnvelope() throws SandeshaException {
MakeConnection makeConnection = new MakeConnection (rmNamespaceValue);
- Address address = new Address (new EndpointReference (
- "http://docs.oasis-open.org/wsrx/wsrm/200608/anonymous?id=550e8400-e29b-11d4-a716-446655440000")
- ,rmNamespaceValue);
+ Address address = new Address (rmNamespaceValue);
+ address.setAddress("http://docs.oasis-open.org/wsrx/wsrm/200608/anonymous?id=550e8400-e29b-11d4-a716-446655440000");
Identifier identifier = new Identifier (rmNamespaceValue);
identifier.setIndentifer("uuid:c3671020-15e0-11da-9b3b-f0439d4867bd");
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org