[java-opensaml] branch master updated: Replace deprecated methods.
Scott Cantor
cantor.2 at osu.edu
Tue Dec 10 15:13:47 EST 2019
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=d7194798e3a5ced5322ab77b0254e7d7f773b14f
The following commit(s) were added to refs/heads/master by this push:
new d719479 Replace deprecated methods.
d719479 is described below
commit d7194798e3a5ced5322ab77b0254e7d7f773b14f
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Dec 10 14:13:41 2019 -0600
Replace deprecated methods.
---
.../binding/impl/ExtractProxiedRequestersHandler.java | 4 ++--
.../saml/saml2/metadata/impl/AffiliateMemberTest.java | 6 +++---
.../http/impl/HttpClientRequestSOAP11EncoderTest.java | 2 +-
.../src/test/java/org/opensaml/soap/soap11/SOAPTest.java | 4 ++--
.../soap11/encoder/http/impl/HTTPSOAP11EncoderTest.java | 2 +-
.../soap/soap11/profile/impl/AddSOAPFaultTest.java | 2 +-
.../wsaddressing/impl/WSAddressingObjectsTestCase.java | 6 +++---
.../messaging/impl/AddActionHandlerTest.java | 16 ++++++++--------
.../messaging/impl/AddMessageIDHandlerTest.java | 14 +++++---------
.../messaging/impl/AddRelatesToHandlerTest.java | 4 ++--
.../messaging/impl/ExtractMessageIDHandlerTest.java | 2 +-
.../messaging/impl/ValidateActionHandlerTest.java | 10 +++++-----
.../soap/wstrust/impl/WSTrustObjectsTestCase.java | 14 +++++++-------
13 files changed, 41 insertions(+), 45 deletions(-)
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/impl/ExtractProxiedRequestersHandler.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/impl/ExtractProxiedRequestersHandler.java
index 3151c80..3e21e99 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/impl/ExtractProxiedRequestersHandler.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/binding/impl/ExtractProxiedRequestersHandler.java
@@ -78,8 +78,8 @@ public class ExtractProxiedRequestersHandler extends AbstractMessageHandler {
}
for (final RequesterID id : scoping.getRequesterIDs()) {
- if (id != null && id.getRequesterID() != null) {
- proxyContext.getRequesters().add(id.getRequesterID());
+ if (id != null && id.getURI() != null) {
+ proxyContext.getRequesters().add(id.getURI());
}
}
}
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AffiliateMemberTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AffiliateMemberTest.java
index 93fbc75..c3d03f7 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AffiliateMemberTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/AffiliateMemberTest.java
@@ -48,7 +48,7 @@ public class AffiliateMemberTest extends XMLObjectProviderBaseTestCase {
public void testSingleElementUnmarshall() {
AffiliateMember member = (AffiliateMember)unmarshallElement(singleElementFile);
- String memberID = member.getID();
+ String memberID = member.getURI();
Assert.assertEquals(memberID, expectedMemberID, "Affiliation memeber ID was " + memberID + ", expected " + expectedMemberID);
}
@@ -65,7 +65,7 @@ public class AffiliateMemberTest extends XMLObjectProviderBaseTestCase {
}
try {
- member.setID(stringBuilder.toString());
+ member.setURI(stringBuilder.toString());
Assert.fail();
} catch (IllegalArgumentException e) {
//OK
@@ -74,7 +74,7 @@ public class AffiliateMemberTest extends XMLObjectProviderBaseTestCase {
member = (new AffiliateMemberBuilder()).buildObject();
- member.setID(expectedMemberID);
+ member.setURI(expectedMemberID);
assertXMLEquals(expectedDOM, member);
}
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/encoder/http/impl/HttpClientRequestSOAP11EncoderTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/encoder/http/impl/HttpClientRequestSOAP11EncoderTest.java
index 9ddd67c..76e4b54 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/encoder/http/impl/HttpClientRequestSOAP11EncoderTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/client/soap11/encoder/http/impl/HttpClientRequestSOAP11EncoderTest.java
@@ -88,7 +88,7 @@ public class HttpClientRequestSOAP11EncoderTest extends XMLObjectBaseTestCase {
// "For real" this would be added by a MessageHandler. Here just add manually.
Action action = buildXMLObject(Action.ELEMENT_NAME);
- action.setValue("urn:test:action:foo");
+ action.setURI("urn:test:action:foo");
if (envelope.getHeader() == null) {
envelope.setHeader((Header) buildXMLObject(Header.DEFAULT_ELEMENT_NAME));
}
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/SOAPTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/SOAPTest.java
index 51481df..0850bef 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/SOAPTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/SOAPTest.java
@@ -127,7 +127,7 @@ public class SOAPTest extends XMLObjectBaseTestCase {
FaultActor actor = fault.getActor();
Assert.assertNotNull(actor, "FaultActor was null");
- Assert.assertEquals(actor.getValue(), expectedFaultActor, "FaultActor had unexpected value");
+ Assert.assertEquals(actor.getURI(), expectedFaultActor, "FaultActor had unexpected value");
FaultCode code = fault.getCode();
Assert.assertNotNull(code, "FaultCode was null");
@@ -174,7 +174,7 @@ public class SOAPTest extends XMLObjectBaseTestCase {
fault.setMessage(faultString);
FaultActor faultActor = (FaultActor) buildXMLObject(FaultActor.DEFAULT_ELEMENT_NAME);
- faultActor.setValue(expectedFaultActor);
+ faultActor.setURI(expectedFaultActor);
fault.setActor(faultActor);
Detail detail = (Detail) buildXMLObject(Detail.DEFAULT_ELEMENT_NAME);
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/encoder/http/impl/HTTPSOAP11EncoderTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/encoder/http/impl/HTTPSOAP11EncoderTest.java
index 69dd142..c36e495 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/encoder/http/impl/HTTPSOAP11EncoderTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/encoder/http/impl/HTTPSOAP11EncoderTest.java
@@ -235,7 +235,7 @@ public class HTTPSOAP11EncoderTest extends XMLObjectBaseTestCase {
envelope.setHeader(header);
Action action = buildXMLObject(Action.ELEMENT_NAME);
- action.setValue("urn:test:soap:action");
+ action.setURI("urn:test:soap:action");
header.getUnknownXMLObjects().add(action);
XMLObjectBuilder<XSAny> xsAnyBuilder = getBuilder(XSAny.TYPE_NAME);
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/profile/impl/AddSOAPFaultTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/profile/impl/AddSOAPFaultTest.java
index ef32189..a03c724 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/profile/impl/AddSOAPFaultTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/soap11/profile/impl/AddSOAPFaultTest.java
@@ -161,7 +161,7 @@ public class AddSOAPFaultTest extends OpenSAMLInitBaseTestCase {
Assert.assertEquals(fault.getMessage().getValue(), "TheClientError");
- Assert.assertEquals(fault.getActor().getValue(), "TheFaultActor");
+ Assert.assertEquals(fault.getActor().getURI(), "TheFaultActor");
Assert.assertNotNull(fault.getDetail());
Assert.assertEquals(fault.getDetail().getUnknownXMLObjects().size(), 1);
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/impl/WSAddressingObjectsTestCase.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/impl/WSAddressingObjectsTestCase.java
index 093f31b..19822a9 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/impl/WSAddressingObjectsTestCase.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/impl/WSAddressingObjectsTestCase.java
@@ -38,14 +38,14 @@ public class WSAddressingObjectsTestCase extends WSBaseTestCase {
@Test
public void testAction() throws Exception {
Action action= buildXMLObject(Action.ELEMENT_NAME);
- action.setValue("urn:test:foo:bar");
+ action.setURI("urn:test:foo:bar");
marshallAndUnmarshall(action);
}
@Test
public void testAddress() throws Exception {
Address address= buildXMLObject(Address.ELEMENT_NAME);
- address.setValue(Address.ANONYMOUS);
+ address.setURI(Address.ANONYMOUS);
marshallAndUnmarshall(address);
}
@@ -53,7 +53,7 @@ public class WSAddressingObjectsTestCase extends WSBaseTestCase {
public void testEndpointReference() throws Exception {
EndpointReference epr= buildXMLObject(EndpointReference.ELEMENT_NAME);
Address address= buildXMLObject(Address.ELEMENT_NAME);
- address.setValue(Address.ANONYMOUS);
+ address.setURI(Address.ANONYMOUS);
ReferenceParameters referenceParameters= buildXMLObject(ReferenceParameters.ELEMENT_NAME);
Metadata metadata= buildXMLObject(Metadata.ELEMENT_NAME);
epr.setAddress(address);
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddActionHandlerTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddActionHandlerTest.java
index da108e3..98f0e24 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddActionHandlerTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddActionHandlerTest.java
@@ -61,7 +61,7 @@ public class AddActionHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).isEmpty());
Action action = (Action) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).get(0);
- Assert.assertEquals(action.getValue(), "urn:test:action1");
+ Assert.assertEquals(action.getURI(), "urn:test:action1");
}
@Test
@@ -73,7 +73,7 @@ public class AddActionHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).isEmpty());
Action action = (Action) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).get(0);
- Assert.assertEquals(action.getValue(), "urn:test:action1");
+ Assert.assertEquals(action.getURI(), "urn:test:action1");
}
@Test
@@ -86,7 +86,7 @@ public class AddActionHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).isEmpty());
Action action = (Action) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).get(0);
- Assert.assertEquals(action.getValue(), "urn:test:action2");
+ Assert.assertEquals(action.getURI(), "urn:test:action2");
}
@Test
@@ -101,7 +101,7 @@ public class AddActionHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).isEmpty());
Action action = (Action) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).get(0);
- Assert.assertEquals(action.getValue(), "urn:test:action1");
+ Assert.assertEquals(action.getURI(), "urn:test:action1");
}
@Test
@@ -116,7 +116,7 @@ public class AddActionHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).isEmpty());
Action action = (Action) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).get(0);
- Assert.assertEquals(action.getValue(), "urn:test:action1");
+ Assert.assertEquals(action.getURI(), "urn:test:action1");
}
@Test
@@ -132,7 +132,7 @@ public class AddActionHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).isEmpty());
Action action = (Action) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).get(0);
- Assert.assertEquals(action.getValue(), "urn:test:action2");
+ Assert.assertEquals(action.getURI(), "urn:test:action2");
}
@Test
@@ -145,7 +145,7 @@ public class AddActionHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).isEmpty());
Action action = (Action) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).get(0);
- Assert.assertEquals(action.getValue(), WSAddressingConstants.ACTION_URI_SOAP_FAULT);
+ Assert.assertEquals(action.getURI(), WSAddressingConstants.ACTION_URI_SOAP_FAULT);
}
@Test
@@ -158,7 +158,7 @@ public class AddActionHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).isEmpty());
Action action = (Action) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), Action.ELEMENT_NAME).get(0);
- Assert.assertEquals(action.getValue(), WSAddressingConstants.ACTION_URI_FAULT);
+ Assert.assertEquals(action.getURI(), WSAddressingConstants.ACTION_URI_FAULT);
}
}
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddMessageIDHandlerTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddMessageIDHandlerTest.java
index af3d33a..e5a1018 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddMessageIDHandlerTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddMessageIDHandlerTest.java
@@ -31,9 +31,6 @@ import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-/**
- *
- */
public class AddMessageIDHandlerTest extends SOAPMessagingBaseTestCase {
private AddMessageIDHandler handler;
@@ -50,7 +47,7 @@ public class AddMessageIDHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), MessageID.ELEMENT_NAME).isEmpty());
MessageID messageID = (MessageID) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), MessageID.ELEMENT_NAME).get(0);
- Assert.assertTrue(messageID.getValue().startsWith("urn:uuid:"));
+ Assert.assertTrue(messageID.getURI().startsWith("urn:uuid:"));
}
@Test
@@ -73,7 +70,7 @@ public class AddMessageIDHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), MessageID.ELEMENT_NAME).isEmpty());
MessageID messageID = (MessageID) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), MessageID.ELEMENT_NAME).get(0);
- Assert.assertEquals(messageID.getValue(), "urn:test:abc123");
+ Assert.assertEquals(messageID.getURI(), "urn:test:abc123");
}
@Test
@@ -85,7 +82,7 @@ public class AddMessageIDHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), MessageID.ELEMENT_NAME).isEmpty());
MessageID messageID = (MessageID) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), MessageID.ELEMENT_NAME).get(0);
- Assert.assertEquals(messageID.getValue(), "urn:test:abc123");
+ Assert.assertEquals(messageID.getURI(), "urn:test:abc123");
}
@Test
@@ -94,9 +91,8 @@ public class AddMessageIDHandlerTest extends SOAPMessagingBaseTestCase {
@Nonnull public String generateIdentifier(boolean xmlSafe) {
if (xmlSafe) {
return "urn:test:abc123:xmlsafe";
- } else {
- return "urn:test:abc123";
}
+ return "urn:test:abc123";
}
@Nonnull public String generateIdentifier() {
return generateIdentifier(true);
@@ -110,7 +106,7 @@ public class AddMessageIDHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), MessageID.ELEMENT_NAME).isEmpty());
MessageID messageID = (MessageID) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), MessageID.ELEMENT_NAME).get(0);
- Assert.assertEquals(messageID.getValue(), "urn:test:def456");
+ Assert.assertEquals(messageID.getURI(), "urn:test:def456");
}
}
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddRelatesToHandlerTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddRelatesToHandlerTest.java
index 252f08b..9a6c9cc 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddRelatesToHandlerTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/AddRelatesToHandlerTest.java
@@ -62,7 +62,7 @@ public class AddRelatesToHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), RelatesTo.ELEMENT_NAME).isEmpty());
RelatesTo relatesTo = (RelatesTo) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), RelatesTo.ELEMENT_NAME).get(0);
- Assert.assertEquals(relatesTo.getValue(), "urn:test:abc123");
+ Assert.assertEquals(relatesTo.getURI(), "urn:test:abc123");
Assert.assertEquals(relatesTo.getRelationshipType(), RelatesTo.RELATIONSHIP_TYPE_REPLY);
}
@@ -80,7 +80,7 @@ public class AddRelatesToHandlerTest extends SOAPMessagingBaseTestCase {
Assert.assertFalse(SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), RelatesTo.ELEMENT_NAME).isEmpty());
RelatesTo relatesTo = (RelatesTo) SOAPMessagingSupport.getOutboundHeaderBlock(getMessageContext(), RelatesTo.ELEMENT_NAME).get(0);
- Assert.assertEquals(relatesTo.getValue(), "urn:test:def456");
+ Assert.assertEquals(relatesTo.getURI(), "urn:test:def456");
Assert.assertEquals(relatesTo.getRelationshipType(), "urn:test:foo");
}
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/ExtractMessageIDHandlerTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/ExtractMessageIDHandlerTest.java
index 5506563..465dacb 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/ExtractMessageIDHandlerTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/ExtractMessageIDHandlerTest.java
@@ -43,7 +43,7 @@ public class ExtractMessageIDHandlerTest extends SOAPMessagingBaseTestCase {
@Test
public void testHeaderPresent() throws ComponentInitializationException, MessageHandlerException {
MessageID messageID = buildXMLObject(MessageID.ELEMENT_NAME);
- messageID.setValue("abc123");
+ messageID.setURI("abc123");
SOAPMessagingSupport.addHeaderBlock(getMessageContext(), messageID);
handler.initialize();
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/ValidateActionHandlerTest.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/ValidateActionHandlerTest.java
index af92219..b47aa68 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/ValidateActionHandlerTest.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wsaddressing/messaging/impl/ValidateActionHandlerTest.java
@@ -43,7 +43,7 @@ public class ValidateActionHandlerTest extends SOAPMessagingBaseTestCase {
@Test
public void testNoExpected() throws ComponentInitializationException, MessageHandlerException {
Action action = buildXMLObject(Action.ELEMENT_NAME);
- action.setValue("urn:test:action1");
+ action.setURI("urn:test:action1");
SOAPMessagingSupport.addHeaderBlock(getMessageContext(), action);
handler.initialize();
@@ -55,7 +55,7 @@ public class ValidateActionHandlerTest extends SOAPMessagingBaseTestCase {
@Test
public void testLocalExpected() throws ComponentInitializationException, MessageHandlerException {
Action action = buildXMLObject(Action.ELEMENT_NAME);
- action.setValue("urn:test:action1");
+ action.setURI("urn:test:action1");
SOAPMessagingSupport.addHeaderBlock(getMessageContext(), action);
handler.setExpectedActionURI("urn:test:action1");
@@ -69,7 +69,7 @@ public class ValidateActionHandlerTest extends SOAPMessagingBaseTestCase {
@Test
public void testContextExpected() throws ComponentInitializationException, MessageHandlerException {
Action action = buildXMLObject(Action.ELEMENT_NAME);
- action.setValue("urn:test:action1");
+ action.setURI("urn:test:action1");
SOAPMessagingSupport.addHeaderBlock(getMessageContext(), action);
getMessageContext().getSubcontext(WSAddressingContext.class, true).setActionURI("urn:test:action1");
@@ -83,7 +83,7 @@ public class ValidateActionHandlerTest extends SOAPMessagingBaseTestCase {
@Test
public void testContextOverride() throws ComponentInitializationException, MessageHandlerException {
Action action = buildXMLObject(Action.ELEMENT_NAME);
- action.setValue("urn:test:action1");
+ action.setURI("urn:test:action1");
SOAPMessagingSupport.addHeaderBlock(getMessageContext(), action);
handler.setExpectedActionURI("urn:test:action2");
@@ -98,7 +98,7 @@ public class ValidateActionHandlerTest extends SOAPMessagingBaseTestCase {
@Test(expectedExceptions=MessageHandlerException.class)
public void testNoMatch() throws ComponentInitializationException, MessageHandlerException {
Action action = buildXMLObject(Action.ELEMENT_NAME);
- action.setValue("urn:test:action1");
+ action.setURI("urn:test:action1");
SOAPMessagingSupport.addHeaderBlock(getMessageContext(), action);
handler.setExpectedActionURI("urn:test:action2");
diff --git a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wstrust/impl/WSTrustObjectsTestCase.java b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wstrust/impl/WSTrustObjectsTestCase.java
index 89996a8..f6f6b4b 100644
--- a/opensaml-soap-impl/src/test/java/org/opensaml/soap/wstrust/impl/WSTrustObjectsTestCase.java
+++ b/opensaml-soap-impl/src/test/java/org/opensaml/soap/wstrust/impl/WSTrustObjectsTestCase.java
@@ -83,7 +83,7 @@ public class WSTrustObjectsTestCase extends WSBaseTestCase {
@Test
public void testAuthenticationType() throws Exception {
AuthenticationType authenticationType= buildXMLObject(AuthenticationType.ELEMENT_NAME);
- authenticationType.setValue("urn:mace:switch.ch:SWITCHaai:loa:3");
+ authenticationType.setURI("urn:mace:switch.ch:SWITCHaai:loa:3");
marshallAndUnmarshall(authenticationType);
}
@@ -123,7 +123,7 @@ public class WSTrustObjectsTestCase extends WSBaseTestCase {
@Test
public void testCanonicalizationAlgorithm() throws Exception {
CanonicalizationAlgorithm canonicalizationAlgorithm= buildXMLObject(CanonicalizationAlgorithm.ELEMENT_NAME);
- canonicalizationAlgorithm.setValue("CanonicalizationAlgorithmValue");
+ canonicalizationAlgorithm.setURI("CanonicalizationAlgorithmValue");
marshallAndUnmarshall(canonicalizationAlgorithm);
}
@@ -143,7 +143,7 @@ public class WSTrustObjectsTestCase extends WSBaseTestCase {
@Test
public void testCode() throws Exception {
Code code= buildXMLObject(Code.ELEMENT_NAME);
- code.setValue(Code.VALID);
+ code.setURI(Code.VALID);
marshallAndUnmarshall(code);
}
@@ -156,14 +156,14 @@ public class WSTrustObjectsTestCase extends WSBaseTestCase {
@Test
public void testComputedKey() throws Exception {
ComputedKey computedKey= buildXMLObject(ComputedKey.ELEMENT_NAME);
- computedKey.setValue(ComputedKey.PSHA1);
+ computedKey.setURI(ComputedKey.PSHA1);
marshallAndUnmarshall(computedKey);
}
@Test
public void testComputedKeyAlgorithm() throws Exception {
ComputedKeyAlgorithm computedKeyAlgorithm= buildXMLObject(ComputedKeyAlgorithm.ELEMENT_NAME);
- computedKeyAlgorithm.setValue("ComputedKeyAlgorithmValue");
+ computedKeyAlgorithm.setURI("ComputedKeyAlgorithmValue");
marshallAndUnmarshall(computedKeyAlgorithm);
}
@@ -319,10 +319,10 @@ public class WSTrustObjectsTestCase extends WSBaseTestCase {
String context= "Context-" + System.currentTimeMillis();
rst.setContext(context);
RequestType requestType= buildXMLObject(RequestType.ELEMENT_NAME);
- requestType.setValue(RequestType.ISSUE);
+ requestType.setURI(RequestType.ISSUE);
rst.getUnknownXMLObjects().add(requestType);
TokenType tokenType= buildXMLObject(TokenType.ELEMENT_NAME);
- tokenType.setValue("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0");
+ tokenType.setURI("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0");
rst.getUnknownXMLObjects().add(tokenType);
Claims claims= createClaims();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list