/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. 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
* 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 opensso/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]"
*
* $Id: Description.java,v 1.2 2008/06/25 05:47:10 qcheng Exp $
*
*/
/**
* The class <code>Description</code> represents a
* Description Type of a service instance.
* <p>The following schema fragment specifies the expected content within the
* <code>Description</code> object.
* <p>
* <pre>
* <complexType name="DescriptionType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SecurityMechID" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded"/>
* <element name="CredentialRef" type="{http://www.w3.org/2001/XMLSchema}IDREF" maxOccurs="unbounded" minOccurs="0"/>
* <choice>
* <group ref="{urn:liberty:disco:2003-08}WsdlRef"/>
* <group ref="{urn:liberty:disco:2003-08}BriefSoapHttpDescription"/>
* </choice>
* </sequence>
* <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
* @supported.all.api
*/
public class Description {
/**
* Default constructor.
*/
public Description() {}
/**
* Constructor.
* @param securityMechID List of supported security mechanism ID as String
* @param credentialRef List of credential references
* @param endPoint SOAP endpoint URI
*/
{
this.credentialRef = credentialRef;
}
/**
* Constructs a Description object from DOM element.
* @param elem DOM Element of Description.
* @exception DiscoveryException if error occurs.
*/
throw new DiscoveryException(
}
{
throw new DiscoveryException(
}
if ((nameSpaceURI == null) ||
{
+ "invalid namespace for node " + nodeName);
}
throw new DiscoveryException(
}
+ "missing SecurityMechID value.");
}
throw new DiscoveryException(
}
}
+ "missing CredentialRef value.");
}
throw new DiscoveryException(
}
if (credentialRef == null) {
credentialRef = new ArrayList();
}
} else {
+ "invalid node" + nodeName);
}
throw new DiscoveryException(
}
}
}
+ "SecurityMechID element.");
}
throw new DiscoveryException(
}
+ "WsdlRef or BriefSoapHttpDescription.");
}
throw new DiscoveryException(
}
}
(serviceNameRef != null))
{
+ "included more Endpoint.");
}
throw new DiscoveryException(
}
+ "missing Endpoint value.");
}
throw new DiscoveryException(
}
}
(serviceNameRef != null))
{
+ "included more SoapAction.");
}
throw new DiscoveryException(
}
+ "missing SoapAction value.");
}
throw new DiscoveryException(
}
}
(soapAction != null))
{
+ "included more WsdlURI.");
}
throw new DiscoveryException(
}
+ "missing WsdlURI value.");
}
throw new DiscoveryException(
}
}
(soapAction != null))
{
+ "included more WsdlURI.");
}
throw new DiscoveryException(
}
+ "missing ServiceNameRef value.");
}
throw new DiscoveryException(
}
+ "wrong ServiceNameRef value.");
}
throw new DiscoveryException(
}
}
} else {
}
} else {
}
}
/**
* Gets id attribute.
*
* @return id attribute.
* @see #setId(String)
*/
return id;
}
/**
* Sets id attribute.
*
* @param id id attribute.
* @see #getId()
*/
}
/**
* Gets SOAP action.
*
* @return SOAP action.
* @see #setSoapAction(String)
*/
return soapAction;
}
/**
* Sets SOAP action.
* @param value SOAP action to be set
* @see #getSoapAction()
*/
soapAction = value;
}
/**
* Gets supported Security Mechanism IDs.
*
* @return List of IDs as String for security mechanism
*
*/
return mechID;
}
/**
* Sets supported Security Mechanism IDs.
*
* @param mechIDs List of IDs as String for security mechanism
*
*/
}
/**
* Gets WSDL service name reference.
*
* @return WSDL service name reference.
* @see #setServiceNameRef(QName)
*/
return serviceNameRef;
}
/**
* Sets WSDL service name reference.
*
* @param nameRef service name reference.
* @see #getServiceNameRef()
*/
}
/**
* Gets URI to WSDL resource containing the service description.
*
* @return URI to WSDL resource containing the service description.
* @see #setWsdlURI(String)
*/
return wsdlURI;
}
/**
* Sets URI to WSDL resource containing the service description.
*
* @param uri URI to the WSDL resource
* @see #getWsdlURI()
*/
}
/**
* Gets the value of the <code>CredentialRef</code> property.
*
* @return value of the <code>CredentialRef</code> property.
* @see #setCredentialRef(List)
*/
return credentialRef;
}
/**
* Sets the value of the <code>CredentialRef</code> property.
*
* @param refs List of String value of the <code>CredentialRef</code>
* property.
* @see #getCredentialRef()
*
*/
}
/**
* Gets SOAP end point URI.
* @return SOAP end point URI
* @see #setEndpoint(String)
*/
return soapEndpoint;
}
/**
* Sets SOAP end point URI.
* @param uri end point URI to be set
* @see #getEndpoint()
*/
soapEndpoint = uri;
}
/**
* Returns formatted string of the service description.
*
* @return formatted string of the service description.
*/
append("\"");
}
append("</SecurityMechID>");
}
}
if (credentialRef != null) {
append("</CredentialRef>");
}
}
if (soapEndpoint != null) {
if (soapAction != null) {
append("</SoapAction>");
}
} else {
}
}
}
append("</ServiceNameRef>");
}
}
}