Methods Summary |
---|
public static com.sun.xml.ws.policy.impl.bindings.AppliesTo | createAppliesTo(java.lang.String appliesTo)
final AttributedURI uri = new AttributedURI();
uri.setValue(appliesTo);
final EndpointReference epr = new EndpointReference();
epr.setAddress(uri);
final AppliesTo applTo = (new com.sun.xml.ws.policy.impl.bindings.ObjectFactory()).createAppliesTo();
applTo.getAny().add((new com.sun.xml.ws.security.trust.impl.bindings.ObjectFactory()).createEndpointReference(epr));
return applTo;
|
public static javax.xml.soap.SOAPFault | createSOAP11Fault(com.sun.xml.ws.security.trust.WSTrustSOAPFaultException sfex)create and return a SOAP 1.1 Fault corresponding to this exception
throw new UnsupportedOperationException("To Do");
|
public static javax.xml.soap.SOAPFault | createSOAP12Fault(com.sun.xml.ws.security.trust.WSTrustSOAPFaultException sfex)create and return a SOAP 1.2 Fault corresponding to this exception
throw new UnsupportedOperationException("To Do");
|
public static com.sun.xml.ws.security.SecurityContextToken | createSecurityContextToken(com.sun.xml.ws.security.secconv.WSSCElementFactory eleFac)
final String identifier = "urn:uuid:" + UUID.randomUUID().toString();
URI idURI;
try{
idURI = new URI(identifier);
}catch (URISyntaxException ex){
throw new WSSecureConversationException(ex.getMessage(), ex);
}
final String wsuId = "uuid-" + UUID.randomUUID().toString();
return eleFac.createSecurityContextToken(idURI, null, wsuId);
|
public static byte[] | generateRandomSecret(int keySize)
// Create binary secret
final SecureRandom random = new SecureRandom();
final byte[] secret = new byte[(int)keySize];
random.nextBytes(secret);
return secret;
|
public static java.lang.String | getAppliesToURI(com.sun.xml.ws.policy.impl.bindings.AppliesTo appliesTo)
final List list = appliesTo.getAny();
EndpointReference epr = null;
if (!list.isEmpty()){
for (int i = 0; i < list.size(); i++) {
final Object obj = list.get(i);
if (obj instanceof EndpointReference){
epr = (EndpointReference)obj;
} else if (obj instanceof JAXBElement){
final JAXBElement ele = (JAXBElement)obj;
final String local = ele.getName().getLocalPart();
if (local.equalsIgnoreCase("EndpointReference")) {
epr = (EndpointReference)ele.getValue();
}
}
if (epr != null){
final AttributedURI uri = epr.getAddress();
if (uri != null){
return uri.getValue();
}
}
}
}
return null;
|
public static boolean | isAddressingMetadata(com.sun.xml.ws.policy.PolicyAssertion assertion)
if ( !PolicyUtil.isAddressingNS(assertion)) {
return false;
}
if ( assertion.getName().getLocalPart().equals(Metadata)) {
return true;
}
return false;
|
public static boolean | isMEXNS(com.sun.xml.ws.policy.PolicyAssertion assertion)
if ( MEX_NS.equals(assertion.getName().getNamespaceURI()) ) {
return true;
}
return false;
|
public static boolean | isMetadata(com.sun.xml.ws.policy.PolicyAssertion assertion)
if ( !isMEXNS(assertion)) {
return false;
}
if ( assertion.getName().getLocalPart().equals(Metadata)) {
return true;
}
return false;
|
public static boolean | isMetadataReference(com.sun.xml.ws.policy.PolicyAssertion assertion)
if ( !isMEXNS(assertion)) {
return false;
}
if ( assertion.getName().getLocalPart().equals(MetadataReference)) {
return true;
}
return false;
|
public static boolean | isMetadataSection(com.sun.xml.ws.policy.PolicyAssertion assertion)
if ( !isMEXNS(assertion)) {
return false;
}
if ( assertion.getName().getLocalPart().equals(MetadataSection)) {
return true;
}
return false;
|