/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2016 ForgeRock AS. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt.
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file at legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
*/
/**
* This class provides an example of how to programmatically publish soap-sts instances.
*/
public class SoapSTSInstancePublisher {
public SoapSTSInstancePublisher(@Named(SoapSTSIntegrationTestModule.PUBLISH_ENDPOINT_URL) String publishEndpoint,
this.publishEndpoint = publishEndpoint;
this.adminPassword = adminPassword;
this.amDeploymentUrl = amDeploymentUrl;
}
SoapSTSInstanceConfig instanceConfig = soapSTSInstanceConfigFactory.createSoapSTSInstanceConfig(urlElement, realm,
EndpointSpecification.getStandardEndpointSpecification(), publishContext, wsdlFile, amDeploymentUrl,
logger.log(Level.FINE, "Publishing instance according to the following config state: " + jsonString);
return parseInstanceUrl(response);
}
/*
The fullSTSId should be the string returned by publishInstance.
*/
}
return parsePublishResponse(response);
}
try {
} catch (JsonException e) {
throw e;
}
continue;
}
}
return instanceConfigs;
}
private String getPublishedRestSTSInstancesConfigContent(String publishEndpoint) throws IOException {
}
connection.setDoOutput(true);
connection.setRequestProperty(SharedSTSConstants.CONTENT_TYPE, SharedSTSConstants.APPLICATION_JSON);
return getSuccessMessage(connection);
} else {
}
}
connection.setDoOutput(true);
connection.setRequestProperty(SharedSTSConstants.CONTENT_TYPE, SharedSTSConstants.APPLICATION_JSON);
return getSuccessMessage(connection);
} else {
}
}
}
} else {
}
}
}
}
if (inputStream == null) {
return "Empty error stream";
} else {
}
}
try {
} catch (IOException e) {
throw new IOException("Could not map the response from the PublishService to a json object. The response: "
+ publishResponse + "; The exception: " + e);
}
}
}
}
field(AMSTSConstants.STS_PUBLISH_INVOCATION_CONTEXT, AMSTSConstants.STS_PUBLISH_INVOCATION_CONTEXT_CLIENT_SDK),
}
}