You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-commits@ws.apache.org by sc...@apache.org on 2005/08/02 18:30:44 UTC
svn commit: r227033 [2/27] - in /webservices/wsrf/trunk: ./
src/java/org/apache/ws/ src/java/org/apache/ws/addressing/
src/java/org/apache/ws/addressing/v2003_03/
src/java/org/apache/ws/addressing/v2004_08_10/
src/java/org/apache/ws/resource/ src/java/...
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/PropertiesResource.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/PropertiesResource.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/PropertiesResource.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/PropertiesResource.java Tue Aug 2 09:28:49 2005
@@ -1,23 +1,39 @@
-package org.apache.ws.resource;
-
-import org.apache.ws.resource.properties.ResourcePropertySet;
-
-/**
- * A resource that has a properties document, as defined by WSRF-RP.
- */
-public interface PropertiesResource extends Resource
-{
- /**
- * Returns this resource's property set.
- *
- * @return this resource's property set
- */
- ResourcePropertySet getResourcePropertySet( );
-
- /**
- * Sets this resource's property set.
- *
- * @param propSet a resource property set
- */
- void setResourcePropertySet( ResourcePropertySet propSet );
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+import org.apache.ws.resource.properties.ResourcePropertySet;
+
+/**
+ * A resource that has a properties document, as defined by WSRF-RP.
+ */
+public interface PropertiesResource
+ extends Resource
+{
+ /**
+ * Sets this resource's property set.
+ *
+ * @param propSet a resource property set
+ */
+ void setResourcePropertySet( ResourcePropertySet propSet );
+
+ /**
+ * Returns this resource's property set.
+ *
+ * @return this resource's property set
+ */
+ ResourcePropertySet getResourcePropertySet( );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/Resource.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/Resource.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/Resource.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/Resource.java Tue Aug 2 09:28:49 2005
@@ -15,17 +15,29 @@
*=============================================================================*/
package org.apache.ws.resource;
-import org.apache.ws.resource.lifetime.ResourceTerminationListener;
import org.apache.ws.addressing.EndpointReference;
-
+import org.apache.ws.resource.lifetime.ResourceTerminationListener;
/**
* A marker interface for a resource. All resource objects must implement this interface.
*/
public interface Resource
{
+ /**
+ * Sets the EndpointReference associated with this Resource.
+ *
+ * @param epr The EndpointReference for the Resource.
+ */
+ void setEndpointReference( EndpointReference epr );
+
+ /**
+ * Returns the EndpointReference associated with this Resource.
+ *
+ * @return The Resource's EndpointReference
+ */
+ EndpointReference getEndpointReference( );
- /**
+ /**
* @param id
*
* @throws IllegalArgumentException if the specified ID is not the of the correct type for this resource
@@ -42,36 +54,22 @@
Object getID( );
/**
+ * Adds a listener to be invoked when the resource has been terminated.
+ *
+ * @param listener
+ */
+ void addTerminationListener( ResourceTerminationListener listener );
+
+ /**
* Called by the resource home to indicate to a resource that the resource is
* being taken out of service.
*/
- void destroy();
+ void destroy( );
/**
* Called by the resource home to indicate to a resource that the resource is
* being placed into service. A resource can use this method to initialize
* its properties or any other state.
*/
- void init();
-
- /**
- * Adds a listener to be invoked when the resource has been terminated.
- *
- * @param listener
- */
- void addTerminationListener( ResourceTerminationListener listener);
-
- /**
- * Returns the EndpointReference associated with this Resource.
- *
- * @return The Resource's EndpointReference
- */
- EndpointReference getEndpointReference();
-
- /**
- * Sets the EndpointReference associated with this Resource.
- *
- * @param epr The EndpointReference for the Resource.
- */
- void setEndpointReference(EndpointReference epr);
+ void init( );
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCapability.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCapability.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCapability.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCapability.java Tue Aug 2 09:28:49 2005
@@ -1,18 +1,18 @@
-/*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
package org.apache.ws.resource;
import javax.wsdl.Definition;
@@ -27,86 +27,84 @@
*/
public interface ResourceCapability
{
-
- /**
- * @return the names of all custom operations (i.e. operations that are not derived from a "base"
- * ResourceDefinition)
- */
- String[] getCustomOperationNames();
-
- /**
- * @return the names of all custom properties (i.e. proeprties that are not derived from a "base"
- * ResourceDefinition)
- */
- QName[] getCustomPropertyNames();
-
- /**
- * Returns the JWSDL {@link Definition} for this WS-Resource capability.
- *
- * @return
- */
- Definition getDefinition();
-
- /**
- * Returns the JWSDL {@link PortType} corresponding to this WS-Resource capability.
- *
- * @return
- */
- PortType getPortType();
-
- /**
- * @return a map of any other {@link ResourceCapability}s that this capability implements;
- * the map's keys are the {@link QName}s of the capability portTypes, and the values
- * are the ResourceCapabilitys.
- */
- Map getImplementedResourceCapabilities();
-
- /**
- *
- * @param capabilityName
- *
- * @return
- */
- boolean implementsResourceCapability( QName capabilityName );
-
- /**
- * Returns a list of the QNames of the resource properties that are defined for the specified portType, or null if
- * the portType does not have any associated resource properties.
- *
- * @return the QNames of the resource properties defined for the specified portType
- */
- QName[] getPropertyNames();
-
- /**
- * @return true if this resource defines a resource properties document, or false if it does not
- */
- boolean hasProperties();
-
- /**
- * Returns the name of the resource properties document element, as specified by
- * the wsrf-rp:ResourceProperties attribute on the portType, or null if this
- * resource does not define a properties document.
- *
- * @return
- */
- QName getPropertiesDocumentName();
-
- /**
- * Returns the name of the WS-RMD metadata descriptor, as specified by
- * the wsrmd:MetadataDescriptor attribute on the portType, or null if this
- * resource does not define a metadata descriptor.
- *
- * @return
- */
- QName getMetadataDescriptorName();
-
- /**
- * Returns the location of the WS-RMD metadata definitions document, as specified by
- * the wsrmd:MetadataDescriptorLocation attribute on the portType, or null if this
- * resource does not define a metadata descriptor.
- *
- * @return
- */
- String getMetadataDescriptorLocation();
-
-}
+ /**
+ * @return the names of all custom operations (i.e. operations that are not derived from a "base"
+ * ResourceDefinition)
+ */
+ String[] getCustomOperationNames( );
+
+ /**
+ * @return the names of all custom properties (i.e. proeprties that are not derived from a "base"
+ * ResourceDefinition)
+ */
+ QName[] getCustomPropertyNames( );
+
+ /**
+ * Returns the JWSDL {@link Definition} for this WS-Resource capability.
+ *
+ * @return
+ */
+ Definition getDefinition( );
+
+ /**
+ * @return a map of any other {@link ResourceCapability}s that this capability implements;
+ * the map's keys are the {@link QName}s of the capability portTypes, and the values
+ * are the ResourceCapabilitys.
+ */
+ Map getImplementedResourceCapabilities( );
+
+ /**
+ * Returns the location of the WS-RMD metadata definitions document, as specified by
+ * the wsrmd:MetadataDescriptorLocation attribute on the portType, or null if this
+ * resource does not define a metadata descriptor.
+ *
+ * @return
+ */
+ String getMetadataDescriptorLocation( );
+
+ /**
+ * Returns the name of the WS-RMD metadata descriptor, as specified by
+ * the wsrmd:MetadataDescriptor attribute on the portType, or null if this
+ * resource does not define a metadata descriptor.
+ *
+ * @return
+ */
+ QName getMetadataDescriptorName( );
+
+ /**
+ * Returns the JWSDL {@link PortType} corresponding to this WS-Resource capability.
+ *
+ * @return
+ */
+ PortType getPortType( );
+
+ /**
+ * Returns the name of the resource properties document element, as specified by
+ * the wsrf-rp:ResourceProperties attribute on the portType, or null if this
+ * resource does not define a properties document.
+ *
+ * @return
+ */
+ QName getPropertiesDocumentName( );
+
+ /**
+ * Returns a list of the QNames of the resource properties that are defined for the specified portType, or null if
+ * the portType does not have any associated resource properties.
+ *
+ * @return the QNames of the resource properties defined for the specified portType
+ */
+ QName[] getPropertyNames( );
+
+ /**
+ * @return true if this resource defines a resource properties document, or false if it does not
+ */
+ boolean hasProperties( );
+
+ /**
+ *
+ * @param capabilityName
+ *
+ * @return
+ */
+ boolean implementsResourceCapability( QName capabilityName );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceContext.java Tue Aug 2 09:28:49 2005
@@ -1,5 +1,5 @@
/*=============================================================================*
- * Copyright 2004-2005 The Apache Software Foundation
+ * Copyright 2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,10 +15,9 @@
*=============================================================================*/
package org.apache.ws.resource;
-import javax.xml.rpc.handler.soap.SOAPMessageContext;
import javax.xml.soap.SOAPMessage;
-import java.net.URL;
import java.net.URI;
+import java.net.URL;
import java.util.Iterator;
/**
@@ -29,91 +28,91 @@
*/
public interface ResourceContext
{
-
- /**
- * @see SOAPMessageContext#setProperty(String, Object)
- */
- void setProperty( String name, Object value );
-
- /**
- * @see SOAPMessageContext#getProperty(String)
- */
- public abstract Object getProperty( String name );
-
- /**
- * @see SOAPMessageContext#getPropertyNames()
- */
- public abstract Iterator getPropertyNames();
-
- /**
- * Returns the resource instance that was targeted by the request associated
- * with this context.
- *
- * @return the resource instance that was targeted by the request associated
- * with this context
- *
- * @throws ResourceException upon failure to lookup a resource instance from the home
- */
- Resource getResource() throws ResourceException;
-
- /**
- * Gets <code>ResourceHome</code> associated with the service.
- *
- * @return <code>ResourceHome</code> associated with the service. Cannot be null.
- */
- ResourceHome getResourceHome();
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- SOAPMessage getSOAPMessage();
-
- /**
- * Gets name of the service.
- *
- * @return The name of the service.
- */
- String getServiceName();
-
- /**
- * Gets the endpoint URL of the service.
- *
- * @return The endpoint URL of the service
- */
- URL getServiceURL();
-
- /**
- * Gets the base URL from which service URLs are based.
- *
- * @return The String representation of the base url
- */
- String getBaseURL();
-
- /**
- * @see SOAPMessageContext#containsProperty(String)
- */
- boolean containsProperty( String name );
-
- /**
- * @see SOAPMessageContext#removeProperty(String)
- */
- void removeProperty( String name );
-
- /**
- * Returns the value of the request's wsa:Action header element.
- *
- * @return the value of the request's wsa:Action header element
- */
- String getRequestAction();
-
- /**
- * Sets the value that should be used for the response's wsa:Action header element.
- *
- * @param action the value that should be used for the response's wsa:Action header element;
- * if null, a default value will be generated by the resource invocation framework
- */
- void setResponseAction( URI action );
-
+ /**
+ * @see SOAPMessageContext#getProperty(String)
+ */
+ public abstract Object getProperty( String name );
+
+ /**
+ * @see SOAPMessageContext#getPropertyNames()
+ */
+ public abstract Iterator getPropertyNames( );
+
+ /**
+ * Gets the base URL from which service URLs are based.
+ *
+ * @return The String representation of the base url
+ */
+ String getBaseURL( );
+
+ /**
+ * @see SOAPMessageContext#setProperty(String, Object)
+ */
+ void setProperty( String name,
+ Object value );
+
+ /**
+ * Returns the value of the request's wsa:Action header element.
+ *
+ * @return the value of the request's wsa:Action header element
+ */
+ String getRequestAction( );
+
+ /**
+ * Returns the resource instance that was targeted by the request associated
+ * with this context.
+ *
+ * @return the resource instance that was targeted by the request associated
+ * with this context
+ *
+ * @throws ResourceException upon failure to lookup a resource instance from the home
+ */
+ Resource getResource( )
+ throws ResourceException;
+
+ /**
+ * Gets <code>ResourceHome</code> associated with the service.
+ *
+ * @return <code>ResourceHome</code> associated with the service. Cannot be null.
+ */
+ ResourceHome getResourceHome( );
+
+ /**
+ * Sets the value that should be used for the response's wsa:Action header element.
+ *
+ * @param action the value that should be used for the response's wsa:Action header element;
+ * if null, a default value will be generated by the resource invocation framework
+ */
+ void setResponseAction( URI action );
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ SOAPMessage getSOAPMessage( );
+
+ /**
+ * Gets name of the service.
+ *
+ * @return The name of the service.
+ */
+ String getServiceName( );
+
+ /**
+ * Gets the endpoint URL of the service.
+ *
+ * @return The endpoint URL of the service
+ */
+ URL getServiceURL( );
+
+ /**
+ * @see SOAPMessageContext#containsProperty(String)
+ */
+ boolean containsProperty( String name );
+
+ /**
+ * @see SOAPMessageContext#removeProperty(String)
+ */
+ void removeProperty( String name );
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreation.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreation.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreation.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreation.java Tue Aug 2 09:28:49 2005
@@ -1,24 +1,40 @@
-package org.apache.ws.resource;
-
-/**
- * An interface for exposing resource creation events.
- *
- * @author Sal Campana
- */
-public interface ResourceCreation
-{
- /**
- * Adds a listener for ResourceCreationEvents
- *
- * @param listener
- */
- void addResourceCreationListener( ResourceCreationListener listener);
-
- /**
- * Removes a listener for ResourceCreationEvents
- *
- * @param listener
- * @return true if the listener was removed, else false
- */
- boolean removeResourceCreationListener( ResourceCreationListener listener);
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+
+/**
+ * An interface for exposing resource creation events.
+ *
+ * @author Sal Campana
+ */
+public interface ResourceCreation
+{
+ /**
+ * Adds a listener for ResourceCreationEvents
+ *
+ * @param listener
+ */
+ void addResourceCreationListener( ResourceCreationListener listener );
+
+ /**
+ * Removes a listener for ResourceCreationEvents
+ *
+ * @param listener
+ * @return true if the listener was removed, else false
+ */
+ boolean removeResourceCreationListener( ResourceCreationListener listener );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreationEvent.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreationEvent.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreationEvent.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreationEvent.java Tue Aug 2 09:28:49 2005
@@ -1,29 +1,49 @@
-package org.apache.ws.resource;
-
-import org.apache.ws.addressing.EndpointReference;
-
-/**
- * A Resource Creation Event which contains the EndpointReference for
- * the Resource which was created.
- *
- * @author Sal Campana
- */
-public class ResourceCreationEvent implements ResourceEvent
-{
- private Resource m_resource;
-
- public ResourceCreationEvent(Resource resource)
- {
- m_resource = resource;
- }
-
- /**
- * Returns the Resource for which the event has occurred.
- *
- * @return EndpointReference
- */
- public Resource getResource()
- {
- return m_resource;
- }
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+
+/**
+ * A Resource Creation Event which contains the EndpointReference for
+ * the Resource which was created.
+ *
+ * @author Sal Campana
+ */
+public class ResourceCreationEvent
+ implements ResourceEvent
+{
+ private Resource m_resource;
+
+ /**
+ * Creates a new {@link ResourceCreationEvent} object.
+ *
+ * @param resource DOCUMENT_ME
+ */
+ public ResourceCreationEvent( Resource resource )
+ {
+ m_resource = resource;
+ }
+
+ /**
+ * Returns the Resource for which the event has occurred.
+ *
+ * @return EndpointReference
+ */
+ public Resource getResource( )
+ {
+ return m_resource;
+ }
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreationListener.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreationListener.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreationListener.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceCreationListener.java Tue Aug 2 09:28:49 2005
@@ -1,18 +1,34 @@
-package org.apache.ws.resource;
-
-/**
- * This interface is provided for listeners to be able to be notified
- * when a Resource is added to the ResourceHome. Addition to the home
- * is viewed as the resource being created and accessible.
- *
- * @author Sal Campana
- */
-public interface ResourceCreationListener
-{
- /**
- * Method to receive notifcations when resources are created (added to the home).
- *
- * @param rce
- */
- void creationOccurred(ResourceCreationEvent rce);
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+
+/**
+ * This interface is provided for listeners to be able to be notified
+ * when a Resource is added to the ResourceHome. Addition to the home
+ * is viewed as the resource being created and accessible.
+ *
+ * @author Sal Campana
+ */
+public interface ResourceCreationListener
+{
+ /**
+ * Method to receive notifcations when resources are created (added to the home).
+ *
+ * @param rce
+ */
+ void creationOccurred( ResourceCreationEvent rce );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDefinition.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDefinition.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDefinition.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDefinition.java Tue Aug 2 09:28:49 2005
@@ -1,50 +1,48 @@
-/*=============================================================================*
- * Copyright 2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *=============================================================================*/
-package org.apache.ws.resource;
-
-import javax.wsdl.Service;
-import javax.wsdl.Port;
-
-/**
- * A WSRF resource definition.
- *
- * @author Ian Springer (ian DOT springer AT hp DOT com)
- */
-public interface ResourceDefinition extends ResourceCapability
-{
-
- /**
- * Returns the last portion of the service endpoint URL for this resource definition.
- *
- * @return the last portion of the service endpoint URL for this resource definition
- */
- String getName();
-
- /**
- * Returns the JWSDL Service for this resource definition.
- *
- * @return the JWSDL Service for this resource definition
- */
- Port getPort();
-
- /**
- * Returns the service endpoint URL for this resource definition.
- *
- * @return the service endpoint URL for this resource definition
- */
- String getEndpointURL();
-
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+import javax.wsdl.Port;
+
+/**
+ * A WSRF resource definition.
+ *
+ * @author Ian Springer (ian DOT springer AT hp DOT com)
+ */
+public interface ResourceDefinition
+ extends ResourceCapability
+{
+ /**
+ * Returns the service endpoint URL for this resource definition.
+ *
+ * @return the service endpoint URL for this resource definition
+ */
+ String getEndpointURL( );
+
+ /**
+ * Returns the last portion of the service endpoint URL for this resource definition.
+ *
+ * @return the last portion of the service endpoint URL for this resource definition
+ */
+ String getName( );
+
+ /**
+ * Returns the JWSDL Service for this resource definition.
+ *
+ * @return the JWSDL Service for this resource definition
+ */
+ Port getPort( );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestruction.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestruction.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestruction.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestruction.java Tue Aug 2 09:28:49 2005
@@ -1,24 +1,40 @@
-package org.apache.ws.resource;
-
-/**
- * An interface for exposing resource destruction events.
- *
- * @author Sal Campana
- */
-public interface ResourceDestruction
-{
- /**
- * Adds a listener for ResourceDestructionEvents
- *
- * @param listener
- */
- void addResourceDestructionListener( ResourceDestructionListener listener);
-
- /**
- * Removes a listener for ResourceDestructionEvents
- *
- * @param listener
- * @return true if the listener was removed, else false
- */
- boolean removeResourceDestructionListener( ResourceDestructionListener listener);
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+
+/**
+ * An interface for exposing resource destruction events.
+ *
+ * @author Sal Campana
+ */
+public interface ResourceDestruction
+{
+ /**
+ * Adds a listener for ResourceDestructionEvents
+ *
+ * @param listener
+ */
+ void addResourceDestructionListener( ResourceDestructionListener listener );
+
+ /**
+ * Removes a listener for ResourceDestructionEvents
+ *
+ * @param listener
+ * @return true if the listener was removed, else false
+ */
+ boolean removeResourceDestructionListener( ResourceDestructionListener listener );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestructionEvent.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestructionEvent.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestructionEvent.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestructionEvent.java Tue Aug 2 09:28:49 2005
@@ -1,32 +1,55 @@
-package org.apache.ws.resource;
-
-import org.apache.ws.addressing.EndpointReference;
-
-/**
- * A Resource Destruction Event which contains the EndpointReference for
- * the Resource which was destroyed.
- *
- * @author Sal Campana
- */
-public class ResourceDestructionEvent implements ResourceEvent
-{
- EndpointReference m_epr;
- Object m_resourceId;
- private Resource m_resource;
-
-
- public ResourceDestructionEvent(Resource resource)
- {
- m_resource = resource;
- }
-
- /**
- * Returns the Resource of the resource the event is about.
- *
- * @return The resource.
- */
- public Resource getResource()
- {
- return m_resource;
- }
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+import org.apache.ws.addressing.EndpointReference;
+
+/**
+ * A Resource Destruction Event which contains the EndpointReference for
+ * the Resource which was destroyed.
+ *
+ * @author Sal Campana
+ */
+public class ResourceDestructionEvent
+ implements ResourceEvent
+{
+ /** DOCUMENT_ME */
+ EndpointReference m_epr;
+
+ /** DOCUMENT_ME */
+ Object m_resourceId;
+ private Resource m_resource;
+
+ /**
+ * Creates a new {@link ResourceDestructionEvent} object.
+ *
+ * @param resource DOCUMENT_ME
+ */
+ public ResourceDestructionEvent( Resource resource )
+ {
+ m_resource = resource;
+ }
+
+ /**
+ * Returns the Resource of the resource the event is about.
+ *
+ * @return The resource.
+ */
+ public Resource getResource( )
+ {
+ return m_resource;
+ }
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestructionListener.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestructionListener.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestructionListener.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceDestructionListener.java Tue Aug 2 09:28:49 2005
@@ -1,18 +1,34 @@
-package org.apache.ws.resource;
-
-/**
- * This interface is provided for listeners to be able to be notified
- * when a Resource is removed from the ResourceHome. Removal from the home
- * is viewed as the resource being destroyed and unaccessible.
- *
- * @author Sal Campana
- */
-public interface ResourceDestructionListener
-{
- /**
- * Method to receive notifcations when resources are deleted (removed from home).
- *
- * @param rde
- */
- void destructionOccurred( ResourceDestructionEvent rde );
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+
+/**
+ * This interface is provided for listeners to be able to be notified
+ * when a Resource is removed from the ResourceHome. Removal from the home
+ * is viewed as the resource being destroyed and unaccessible.
+ *
+ * @author Sal Campana
+ */
+public interface ResourceDestructionListener
+{
+ /**
+ * Method to receive notifcations when resources are deleted (removed from home).
+ *
+ * @param rde
+ */
+ void destructionOccurred( ResourceDestructionEvent rde );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceEvent.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceEvent.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceEvent.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceEvent.java Tue Aug 2 09:28:49 2005
@@ -1,19 +1,32 @@
-package org.apache.ws.resource;
-
-import org.apache.ws.addressing.EndpointReference;
-
-/**
- * An interface defining a base event for resource destruction and creation.
- *
- * @author Sal Campana
- */
-public interface ResourceEvent
-{
- /**
- * Returns the Resource for which the event has occurred.
- *
- * @return EndpointReference
- */
- Resource getResource();
-
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource;
+
+
+/**
+ * An interface defining a base event for resource destruction and creation.
+ *
+ * @author Sal Campana
+ */
+public interface ResourceEvent
+{
+ /**
+ * Returns the Resource for which the event has occurred.
+ *
+ * @return EndpointReference
+ */
+ Resource getResource( );
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceHome.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceHome.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceHome.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceHome.java Tue Aug 2 09:28:49 2005
@@ -16,140 +16,141 @@
package org.apache.ws.resource;
-
/**
* Defines a basic interface through which resources are discovered and removed. The purpose of
* <code>ResourceHome</code> is to interact with a collection of resources of the same type. Each resource type will
* have its own custom implementation the <code>ResourceHome</code> interface. The implementation is expected to provide
* custom methods for creating new resources and optionally methods that act on a set of resource objects.
*/
-public interface ResourceHome extends ResourceCreation, ResourceDestruction
+public interface ResourceHome
+ extends ResourceCreation,
+ ResourceDestruction
{
-
- /**
- * Gets the name of the SOAP header element from which this home will extract
- * a resource identifier.
- *
- * @return the resource identifier header element name, represented as
- * a string in the format defined by
- * {@link javax.xml.namespace.QName#toString()};
- * or null if this home manages a singleton resource
- */
- String getResourceIdentifierReferenceParameterName();
-
- /**
- * Sets the classname of the Resource Impl.
- *
- * @param className The class name of the Resource Impl.
- */
- void setResourceClassName( String className );
-
- /**
- * Returns the Class of the Resource Impl.
- *
- * @return The Class of the Resource Impl
- */
- String getResourceClassName();
-
- /**
- * Sets the name of the SOAP header element from which this home will extract
- * a resource identifier. Set to null if this home manages a singleton resource.
- *
- * @param name resource identifier header element name, represented as
- * a string as defined by {@link javax.xml.namespace.QName#toString()}
- * (e.g. "{http://http://ws.apache.org/namespaces/wsrf/}ResourceIdentifier")
- */
- void setResourceIdentifierReferenceParameterName( String name );
-
- /**
- * Sets the Service Impl's .Class
- *
- * @param className String representation of the class
- */
- void setServiceClassName( String className );
-
- /**
- * Returns the name of the Service class.
- *
- * @return the name of the Service class
- */
- String getServiceClassName();
-
- /**
- * Sets the target namespace of the WSDL of this home's service.
- *
- * @param targetNamespace
- */
- void setWsdlTargetNamespace( String targetNamespace );
-
- /**
- * Returns the target namespace of the WSDL.
- *
- * @return The String of the targetnamespace
- */
- String getWsdlTargetNamespace();
-
- /**
- * Adds the specified resource to this home if it is not already present
- * (optional operation). More formally, adds the specified resource,
- * <code>resource</code>, to this home if this home contains no resource
- * <code>existing</code> such that
- * <code>(resource.getID().equals(existing.getID())</code>.
- * If this home already contains a resource with the same ID as the
- * specified resource, the call leaves the home unchanged and returns
- * <tt>false</tt>.
- *
- * This method will also check to see if the EndpointReference (EPR) has been set on
- * the Resource. If the EPR is null, it will create one and set it on the Resource.
- *
- * @param resource the resource to be added; must not be null
- *
- * @throws UnsupportedOperationException if the <tt>add</tt> method is not
- * supported by this home
- * @throws IllegalResourceTypeException if the resource is not of the type
- * supported by this home
- */
- boolean add( Resource resource ) throws IllegalResourceTypeException;
-
- /**
- * Retrieves a resource. <b>Note:</b> This function must not return null. It must
- * either return the resource object or throw an exception if there is no resource
- * with the specified identifier.
- * </br>
- * If a resource is found and its EndpointReference member variable is not set, the
- * EndpointReference variable will get set on the resource with values obtained from
- * the jndi-config configuration.
- *
- * @param resourceId a resource identifier
- *
- * @return non-null resource
- *
- * @throws ResourceUnknownException if no resource exists with the given key
- * @throws ResourceException if any other error occurs.
- */
- Resource find( Object resourceId )
- throws
- ResourceUnknownException,
- ResourceException;
-
- /**
- * Removes a resource. Invokes the resource's {@link Resource#destroy()} method
- * prior to removal.
- *
- * @throws ResourceUnknownException if no resource exists with the given key
- * @throws ResourceException if any other error occurs
- */
- void remove( Object resourceId ) throws ResourceUnknownException, ResourceException;
-
- /**
- * Extracts the resource identifier from the specified resource context -
- * typically, this is done by deserializing a particular SOAP header
- * element that contains the identifier.
- *
- * @param context a resource context
- *
- * @return the resource identifier
- */
- Object extractResourceIdentifier( ResourceContext context );
-
-}
+ /**
+ * Sets the classname of the Resource Impl.
+ *
+ * @param className The class name of the Resource Impl.
+ */
+ void setResourceClassName( String className );
+
+ /**
+ * Returns the Class of the Resource Impl.
+ *
+ * @return The Class of the Resource Impl
+ */
+ String getResourceClassName( );
+
+ /**
+ * Sets the name of the SOAP header element from which this home will extract
+ * a resource identifier. Set to null if this home manages a singleton resource.
+ *
+ * @param name resource identifier header element name, represented as
+ * a string as defined by {@link javax.xml.namespace.QName#toString()}
+ * (e.g. "{http://http://ws.apache.org/namespaces/wsrf/}ResourceIdentifier")
+ */
+ void setResourceIdentifierReferenceParameterName( String name );
+
+ /**
+ * Gets the name of the SOAP header element from which this home will extract
+ * a resource identifier.
+ *
+ * @return the resource identifier header element name, represented as
+ * a string in the format defined by
+ * {@link javax.xml.namespace.QName#toString()};
+ * or null if this home manages a singleton resource
+ */
+ String getResourceIdentifierReferenceParameterName( );
+
+ /**
+ * Sets the Service Impl's .Class
+ *
+ * @param className String representation of the class
+ */
+ void setServiceClassName( String className );
+
+ /**
+ * Returns the name of the Service class.
+ *
+ * @return the name of the Service class
+ */
+ String getServiceClassName( );
+
+ /**
+ * Sets the target namespace of the WSDL of this home's service.
+ *
+ * @param targetNamespace
+ */
+ void setWsdlTargetNamespace( String targetNamespace );
+
+ /**
+ * Returns the target namespace of the WSDL.
+ *
+ * @return The String of the targetnamespace
+ */
+ String getWsdlTargetNamespace( );
+
+ /**
+ * Adds the specified resource to this home if it is not already present
+ * (optional operation). More formally, adds the specified resource,
+ * <code>resource</code>, to this home if this home contains no resource
+ * <code>existing</code> such that
+ * <code>(resource.getID().equals(existing.getID())</code>.
+ * If this home already contains a resource with the same ID as the
+ * specified resource, the call leaves the home unchanged and returns
+ * <tt>false</tt>.
+ *
+ * This method will also check to see if the EndpointReference (EPR) has been set on
+ * the Resource. If the EPR is null, it will create one and set it on the Resource.
+ *
+ * @param resource the resource to be added; must not be null
+ *
+ * @throws UnsupportedOperationException if the <tt>add</tt> method is not
+ * supported by this home
+ * @throws IllegalResourceTypeException if the resource is not of the type
+ * supported by this home
+ */
+ boolean add( Resource resource )
+ throws IllegalResourceTypeException;
+
+ /**
+ * Extracts the resource identifier from the specified resource context -
+ * typically, this is done by deserializing a particular SOAP header
+ * element that contains the identifier.
+ *
+ * @param context a resource context
+ *
+ * @return the resource identifier
+ */
+ Object extractResourceIdentifier( ResourceContext context );
+
+ /**
+ * Retrieves a resource. <b>Note:</b> This function must not return null. It must
+ * either return the resource object or throw an exception if there is no resource
+ * with the specified identifier.
+ * </br>
+ * If a resource is found and its EndpointReference member variable is not set, the
+ * EndpointReference variable will get set on the resource with values obtained from
+ * the jndi-config configuration.
+ *
+ * @param resourceId a resource identifier
+ *
+ * @return non-null resource
+ *
+ * @throws ResourceUnknownException if no resource exists with the given key
+ * @throws ResourceException if any other error occurs.
+ */
+ Resource find( Object resourceId )
+ throws ResourceUnknownException,
+ ResourceException;
+
+ /**
+ * Removes a resource. Invokes the resource's {@link Resource#destroy()} method
+ * prior to removal.
+ *
+ * @throws ResourceUnknownException if no resource exists with the given key
+ * @throws ResourceException if any other error occurs
+ */
+ void remove( Object resourceId )
+ throws ResourceUnknownException,
+ ResourceException;
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceUnknownException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceUnknownException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceUnknownException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/ResourceUnknownException.java Tue Aug 2 09:28:49 2005
@@ -26,9 +26,10 @@
public class ResourceUnknownException
extends ResourceException
{
- public static final Messages MSG = MessagesImpl.getInstance();
- private Object m_resourceId;
- private String m_serviceName;
+ /** DOCUMENT_ME */
+ public static final Messages MSG = MessagesImpl.getInstance( );
+ private Object m_resourceId;
+ private String m_serviceName;
/**
* @param resourceId the resource id that was unknown
@@ -37,7 +38,7 @@
public ResourceUnknownException( Object resourceId,
String serviceName )
{
- super( MSG.getMessage(Keys.RESOURCE_NOT_FOUND, resourceId, serviceName ));
+ super( MSG.getMessage( Keys.RESOURCE_NOT_FOUND, resourceId, serviceName ) );
m_resourceId = resourceId;
m_serviceName = serviceName;
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/AbstractBaseFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/AbstractBaseFaultException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/AbstractBaseFaultException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/AbstractBaseFaultException.java Tue Aug 2 09:28:49 2005
@@ -1,325 +1,383 @@
-/*=============================================================================*
- * Copyright 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *=============================================================================*/
-package org.apache.ws.resource.faults;
-
-import org.apache.commons.lang.builder.ToStringBuilder;
-import org.apache.ws.Soap1_1Constants;
-import org.apache.ws.addressing.EndpointReference;
-import org.apache.ws.resource.i18n.Keys;
-import org.apache.ws.resource.i18n.MessagesImpl;
-import org.apache.ws.resource.impl.UnsupportedVersionException;
-import org.apache.ws.resource.properties.NamespaceVersionHolder;
-import org.apache.ws.util.XmlBeanNameUtils;
-import org.apache.ws.util.XmlBeanUtils;
-import org.apache.ws.util.i18n.Messages;
-import org.apache.xmlbeans.XmlObject;
-
-import javax.xml.namespace.QName;
-import javax.xml.soap.Detail;
-import javax.xml.soap.DetailEntry;
-import java.lang.reflect.Method;
-import java.util.Calendar;
-
-/**
- * The WS-BaseFaults base fault type implemented as a Java exception.
- *
- * @author Ian P. Springer
- */
-public abstract class AbstractBaseFaultException extends FaultException
-{
-
- private static final Messages MSG = MessagesImpl.getInstance();
-
- private static final QName DEFAULT_FAULT_CODE = Soap1_1Constants.FAULT_CLIENT;
-
- private Calendar m_timestamp;
- private EndpointReference m_originator;
- private ErrorCode m_errorCode;
- private Description[] m_description;
- private AbstractBaseFaultException[] m_faultCause;
- private NamespaceVersionHolder m_namespaceSet;
- private DetailEntry m_detailEntry;
-
- public AbstractBaseFaultException( NamespaceVersionHolder namespaceSet, String faultString, QName faultCode )
- {
- super( faultCode, faultString );
- m_namespaceSet = namespaceSet;
- m_timestamp = Calendar.getInstance();
- }
-
- public AbstractBaseFaultException( NamespaceVersionHolder namespaceSet, String faultString )
- {
- this( namespaceSet, faultString, DEFAULT_FAULT_CODE );
- }
-
- /**
- * DOCUMENT_ME
- *
- * @param description DOCUMENT_ME
- */
- public void setDescription( Description[] description )
- {
- m_description = description;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public Description[] getDescription()
- {
- return m_description;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @param errorCode DOCUMENT_ME
- */
- public void setErrorCode( ErrorCode errorCode )
- {
- m_errorCode = errorCode;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public ErrorCode getErrorCode()
- {
- return m_errorCode;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @param faultCause DOCUMENT_ME
- */
- public void setFaultCause( AbstractBaseFaultException[] faultCause )
- {
- m_faultCause = faultCause;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public AbstractBaseFaultException[] getFaultCause()
- {
- return m_faultCause;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @param originator DOCUMENT_ME
- */
- public void setOriginator( EndpointReference originator )
- {
- m_originator = originator;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public EndpointReference getOriginator()
- {
- return m_originator;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @param timestamp DOCUMENT_ME
- */
- public void setTimestamp( Calendar timestamp )
- {
- m_timestamp = timestamp;
- }
-
- /**
- * DOCUMENT_ME
- *
- * @return DOCUMENT_ME
- */
- public Calendar getTimestamp()
- {
- return m_timestamp;
- }
-
- public NamespaceVersionHolder getNamespaceSet()
- {
- return m_namespaceSet;
- }
-
- public abstract QName getBaseFaultName();
-
- public Detail getDetail()
- {
- updateDetail();
- return super.getDetail();
- }
-
- public XmlObject toXmlObject()
- {
- if ( m_description == null )
- {
- m_description = new Description[]{new Description( getFaultString() )};
- }
- XmlObject baseFaultXBean = createBaseFaultXmlBean();
- populateBaseFaultXmlBean( baseFaultXBean );
- return baseFaultXBean;
- }
-
- /**
- * Returns a string representation of this exception.
- *
- * @return a string representation of this exception
- */
- public String toString()
- {
- return new ToStringBuilder( this ).append( MSG.getMessage( Keys.FAULTCODE ),
- getFaultCode() )
- .append( MSG.getMessage( Keys.FAULTSTRING ),
- getFaultString() ).append( MSG.getMessage( Keys.DESCRIPTION ), m_description )
- .append( MSG.getMessage( Keys.ERRORCODE ), m_errorCode ).append( MSG.getMessage( Keys.FAULTCAUSE ),
- m_faultCause )
- .toString();
- }
-
- private XmlObject createBaseFaultXmlBean()
- {
- try
- {
- String docFactoryClassName = XmlBeanNameUtils.getDocumentElementXmlBeanFactoryClassName(
- getBaseFaultName() );
- Class docFactoryClass = Class.forName( docFactoryClassName );
- Method newInstanceMethod = docFactoryClass.getMethod( "newInstance", new Class[0] );
- XmlObject docXBean = (XmlObject) newInstanceMethod.invoke( null, new Object[0] );
- Class docXBeanClass = docXBean.getClass();
- Method addNewMethod = docXBeanClass.getMethod(
- "addNew" + XmlBeanNameUtils.getElementXmlBeanUnqualifiedClassName( getBaseFaultName() ),
- new Class[0] );
- XmlObject xBean = (XmlObject) addNewMethod.invoke( docXBean, new Object[0] );
- return xBean;
- }
- catch ( Exception e )
- {
- throw new RuntimeException(
- "Failed to create strongly-typed XmlBean for global element with name " + getBaseFaultName(), e );
- }
- }
-
- private void populateBaseFaultXmlBean( XmlObject baseFaultXBean )
- {
- if ( m_namespaceSet instanceof org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl )
- {
- org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSBaseFaults12Draft03.BaseFaultType baseFaultType = (org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSBaseFaults12Draft03.BaseFaultType) baseFaultXBean;
- baseFaultType.setTimestamp( m_timestamp );
- if ( m_description != null )
- {
- for ( int i = 0; i < m_description.length; i++ )
- {
- org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSBaseFaults12Draft03.BaseFaultType.Description description = baseFaultType.addNewDescription();
- description.setStringValue( m_description[i].getValue() );
- if ( m_description[i].getLang() != null )
- {
- description.setLang( m_description[i].getLang() );
- }
- }
- }
- if ( m_errorCode != null )
- {
- org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSBaseFaults12Draft03.BaseFaultType.ErrorCode errorCode = baseFaultType.addNewErrorCode();
- errorCode.setDialect( m_errorCode.getDialect().toString() );
- XmlObject[] elems = m_errorCode.getContent();
- for ( int i = 0; i < elems.length; i++ )
- {
- XmlBeanUtils.addChildElement( errorCode, elems[i] );
- }
- }
- if ( m_faultCause != null )
- {
- for ( int i = 0; i < m_faultCause.length; i++ )
- {
- XmlBeanUtils.addChildElement( baseFaultType, m_faultCause[i].toXmlObject() );
- }
- }
- if ( m_originator != null )
- {
- // TODO (low priority)
- }
- }
- else if ( m_namespaceSet instanceof org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl )
- {
- org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType baseFaultType = (org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType) baseFaultXBean;
- baseFaultType.setTimestamp( m_timestamp );
- if ( m_description != null )
- {
- for ( int i = 0; i < m_description.length; i++ )
- {
- org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType.Description description = baseFaultType.addNewDescription();
- description.setStringValue( m_description[i].getValue() );
- if ( m_description[i].getLang() != null )
- {
- description.setLang( m_description[i].getLang() );
- }
- }
- }
- if ( m_errorCode != null )
- {
- org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType.ErrorCode errorCode = baseFaultType.addNewErrorCode();
- errorCode.setDialect( m_errorCode.getDialect().toString() );
- XmlObject[] elems = m_errorCode.getContent();
- for ( int i = 0; i < elems.length; i++ )
- {
- XmlBeanUtils.addChildElement( errorCode, elems[i] );
- }
- }
- if ( m_faultCause != null )
- {
- for ( int i = 0; i < m_faultCause.length; i++ )
- {
- XmlBeanUtils.addChildElement( baseFaultType, m_faultCause[i].toXmlObject() );
- }
- }
- if ( m_originator != null )
- {
- // TODO (low priority)
- }
- }
- else
- {
- throw new UnsupportedVersionException( m_namespaceSet );
- }
- }
-
- private void updateDetail()
- {
- XmlObject baseFaultDocXBean = toXmlObject();
- if ( m_detailEntry != null )
- {
- m_detailEntry.detachNode();
- }
- m_detailEntry = addDetailEntry( baseFaultDocXBean );
- }
-
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource.faults;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.ws.Soap1_1Constants;
+import org.apache.ws.addressing.EndpointReference;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.impl.UnsupportedVersionException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.util.XmlBeanNameUtils;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.ws.util.i18n.Messages;
+import org.apache.xmlbeans.XmlObject;
+import javax.xml.namespace.QName;
+import javax.xml.soap.Detail;
+import javax.xml.soap.DetailEntry;
+import java.lang.reflect.Method;
+import java.util.Calendar;
+
+/**
+ * The WS-BaseFaults base fault type implemented as a Java exception.
+ *
+ * @author Ian P. Springer
+ */
+public abstract class AbstractBaseFaultException
+ extends FaultException
+{
+ private static final Messages MSG = MessagesImpl.getInstance( );
+ private static final QName DEFAULT_FAULT_CODE = Soap1_1Constants.FAULT_CLIENT;
+ private Calendar m_timestamp;
+ private EndpointReference m_originator;
+ private ErrorCode m_errorCode;
+ private Description[] m_description;
+ private AbstractBaseFaultException[] m_faultCause;
+ private NamespaceVersionHolder m_namespaceSet;
+ private DetailEntry m_detailEntry;
+
+ /**
+ * Creates a new {@link AbstractBaseFaultException} object.
+ *
+ * @param namespaceSet DOCUMENT_ME
+ * @param faultString DOCUMENT_ME
+ * @param faultCode DOCUMENT_ME
+ */
+ public AbstractBaseFaultException( NamespaceVersionHolder namespaceSet,
+ String faultString,
+ QName faultCode )
+ {
+ super( faultCode, faultString );
+ m_namespaceSet = namespaceSet;
+ m_timestamp = Calendar.getInstance( );
+ }
+
+ /**
+ * Creates a new {@link AbstractBaseFaultException} object.
+ *
+ * @param namespaceSet DOCUMENT_ME
+ * @param faultString DOCUMENT_ME
+ */
+ public AbstractBaseFaultException( NamespaceVersionHolder namespaceSet,
+ String faultString )
+ {
+ this( namespaceSet, faultString, DEFAULT_FAULT_CODE );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public abstract QName getBaseFaultName( );
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param description DOCUMENT_ME
+ */
+ public void setDescription( Description[] description )
+ {
+ m_description = description;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public Description[] getDescription( )
+ {
+ return m_description;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public Detail getDetail( )
+ {
+ updateDetail( );
+ return super.getDetail( );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param errorCode DOCUMENT_ME
+ */
+ public void setErrorCode( ErrorCode errorCode )
+ {
+ m_errorCode = errorCode;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public ErrorCode getErrorCode( )
+ {
+ return m_errorCode;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param faultCause DOCUMENT_ME
+ */
+ public void setFaultCause( AbstractBaseFaultException[] faultCause )
+ {
+ m_faultCause = faultCause;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public AbstractBaseFaultException[] getFaultCause( )
+ {
+ return m_faultCause;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public NamespaceVersionHolder getNamespaceSet( )
+ {
+ return m_namespaceSet;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param originator DOCUMENT_ME
+ */
+ public void setOriginator( EndpointReference originator )
+ {
+ m_originator = originator;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public EndpointReference getOriginator( )
+ {
+ return m_originator;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param timestamp DOCUMENT_ME
+ */
+ public void setTimestamp( Calendar timestamp )
+ {
+ m_timestamp = timestamp;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public Calendar getTimestamp( )
+ {
+ return m_timestamp;
+ }
+
+ /**
+ * Returns a string representation of this exception.
+ *
+ * @return a string representation of this exception
+ */
+ public String toString( )
+ {
+ return new ToStringBuilder( this ).append( MSG.getMessage( Keys.FAULTCODE ),
+ getFaultCode( ) )
+ .append( MSG.getMessage( Keys.FAULTSTRING ),
+ getFaultString( ) )
+ .append( MSG.getMessage( Keys.DESCRIPTION ),
+ m_description )
+ .append( MSG.getMessage( Keys.ERRORCODE ),
+ m_errorCode )
+ .append( MSG.getMessage( Keys.FAULTCAUSE ),
+ m_faultCause ).toString( );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public XmlObject toXmlObject( )
+ {
+ if ( m_description == null )
+ {
+ m_description = new Description[]
+ {
+ new Description( getFaultString( ) )
+ };
+ }
+
+ XmlObject baseFaultXBean = createBaseFaultXmlBean( );
+ populateBaseFaultXmlBean( baseFaultXBean );
+ return baseFaultXBean;
+ }
+
+ private XmlObject createBaseFaultXmlBean( )
+ {
+ try
+ {
+ String docFactoryClassName =
+ XmlBeanNameUtils.getDocumentElementXmlBeanFactoryClassName( getBaseFaultName( ) );
+ Class docFactoryClass = Class.forName( docFactoryClassName );
+ Method newInstanceMethod = docFactoryClass.getMethod( "newInstance",
+ new Class[0] );
+ XmlObject docXBean = (XmlObject) newInstanceMethod.invoke( null,
+ new Object[0] );
+ Class docXBeanClass = docXBean.getClass( );
+ Method addNewMethod =
+ docXBeanClass.getMethod( "addNew"
+ + XmlBeanNameUtils.getElementXmlBeanUnqualifiedClassName( getBaseFaultName( ) ),
+ new Class[0] );
+ XmlObject xBean = (XmlObject) addNewMethod.invoke( docXBean,
+ new Object[0] );
+ return xBean;
+ }
+ catch ( Exception e )
+ {
+ throw new RuntimeException( "Failed to create strongly-typed XmlBean for global element with name "
+ + getBaseFaultName( ), e );
+ }
+ }
+
+ private void populateBaseFaultXmlBean( XmlObject baseFaultXBean )
+ {
+ if ( m_namespaceSet instanceof org.apache.ws.resource.properties.v2004_11.impl.NamespaceVersionHolderImpl )
+ {
+ org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSBaseFaults12Draft03.BaseFaultType baseFaultType =
+ (org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSBaseFaults12Draft03.BaseFaultType) baseFaultXBean;
+ baseFaultType.setTimestamp( m_timestamp );
+ if ( m_description != null )
+ {
+ for ( int i = 0; i < m_description.length; i++ )
+ {
+ org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSBaseFaults12Draft03.BaseFaultType.Description description =
+ baseFaultType.addNewDescription( );
+ description.setStringValue( m_description[i].getValue( ) );
+ if ( m_description[i].getLang( ) != null )
+ {
+ description.setLang( m_description[i].getLang( ) );
+ }
+ }
+ }
+
+ if ( m_errorCode != null )
+ {
+ org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSBaseFaults12Draft03.BaseFaultType.ErrorCode errorCode =
+ baseFaultType.addNewErrorCode( );
+ errorCode.setDialect( m_errorCode.getDialect( ).toString( ) );
+ XmlObject[] elems = m_errorCode.getContent( );
+ for ( int i = 0; i < elems.length; i++ )
+ {
+ XmlBeanUtils.addChildElement( errorCode, elems[i] );
+ }
+ }
+
+ if ( m_faultCause != null )
+ {
+ for ( int i = 0; i < m_faultCause.length; i++ )
+ {
+ XmlBeanUtils.addChildElement( baseFaultType,
+ m_faultCause[i].toXmlObject( ) );
+ }
+ }
+
+ if ( m_originator != null )
+ {
+ // TODO (low priority)
+ }
+ }
+ else if ( m_namespaceSet instanceof org.apache.ws.resource.properties.v2004_06.impl.NamespaceVersionHolderImpl )
+ {
+ org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType baseFaultType =
+ (org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType) baseFaultXBean;
+ baseFaultType.setTimestamp( m_timestamp );
+ if ( m_description != null )
+ {
+ for ( int i = 0; i < m_description.length; i++ )
+ {
+ org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType.Description description =
+ baseFaultType.addNewDescription( );
+ description.setStringValue( m_description[i].getValue( ) );
+ if ( m_description[i].getLang( ) != null )
+ {
+ description.setLang( m_description[i].getLang( ) );
+ }
+ }
+ }
+
+ if ( m_errorCode != null )
+ {
+ org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSBaseFaults12Draft01.BaseFaultType.ErrorCode errorCode =
+ baseFaultType.addNewErrorCode( );
+ errorCode.setDialect( m_errorCode.getDialect( ).toString( ) );
+ XmlObject[] elems = m_errorCode.getContent( );
+ for ( int i = 0; i < elems.length; i++ )
+ {
+ XmlBeanUtils.addChildElement( errorCode, elems[i] );
+ }
+ }
+
+ if ( m_faultCause != null )
+ {
+ for ( int i = 0; i < m_faultCause.length; i++ )
+ {
+ XmlBeanUtils.addChildElement( baseFaultType,
+ m_faultCause[i].toXmlObject( ) );
+ }
+ }
+
+ if ( m_originator != null )
+ {
+ // TODO (low priority)
+ }
+ }
+ else
+ {
+ throw new UnsupportedVersionException( m_namespaceSet );
+ }
+ }
+
+ private void updateDetail( )
+ {
+ XmlObject baseFaultDocXBean = toXmlObject( );
+ if ( m_detailEntry != null )
+ {
+ m_detailEntry.detachNode( );
+ }
+
+ m_detailEntry = addDetailEntry( baseFaultDocXBean );
+ }
+}
\ No newline at end of file
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java Tue Aug 2 09:28:49 2005
@@ -1,56 +1,65 @@
-/*=============================================================================*
- * Copyright 2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *=============================================================================*/
-package org.apache.ws.resource.faults;
-
-import org.apache.ws.resource.properties.NamespaceVersionHolder;
-
-import javax.xml.namespace.QName;
-
-/**
- * WS-BaseFaults BaseFault XSD global element implemented as a Java exception.
- *
- * @author Ian P. Springer
- */
-public final class BaseFaultException
- extends AbstractBaseFaultException
-{
-
- public BaseFaultException( NamespaceVersionHolder namespaceSet, String faultString, QName faultCode )
- {
- super( namespaceSet, faultString, faultCode );
- }
-
- /**
- * Constructs a new NewBaseFaultException.
- *
- * @param faultString a message describing this fault
- */
- public BaseFaultException( NamespaceVersionHolder namespaces, String faultString )
- {
- super( namespaces, faultString );
- }
-
- /**
- * Returns the element name for this base fault.
- *
- * @return the element name for this base fault
- */
- public QName getBaseFaultName()
- {
- return new QName( getNamespaceSet().getBaseFaultsXsdNamespace(), "BaseFault", "wsbf" );
- }
-
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource.faults;
+
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import javax.xml.namespace.QName;
+
+/**
+ * WS-BaseFaults BaseFault XSD global element implemented as a Java exception.
+ *
+ * @author Ian P. Springer
+ */
+public final class BaseFaultException
+ extends AbstractBaseFaultException
+{
+ /**
+ * Creates a new {@link BaseFaultException} object.
+ *
+ * @param namespaceSet DOCUMENT_ME
+ * @param faultString DOCUMENT_ME
+ * @param faultCode DOCUMENT_ME
+ */
+ public BaseFaultException( NamespaceVersionHolder namespaceSet,
+ String faultString,
+ QName faultCode )
+ {
+ super( namespaceSet, faultString, faultCode );
+ }
+
+ /**
+ * Constructs a new NewBaseFaultException.
+ *
+ * @param faultString a message describing this fault
+ */
+ public BaseFaultException( NamespaceVersionHolder namespaces,
+ String faultString )
+ {
+ super( namespaces, faultString );
+ }
+
+ /**
+ * Returns the element name for this base fault.
+ *
+ * @return the element name for this base fault
+ */
+ public QName getBaseFaultName( )
+ {
+ return new QName( getNamespaceSet( ).getBaseFaultsXsdNamespace( ),
+ "BaseFault",
+ "wsbf" );
+ }
}
Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/Description.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/Description.java?rev=227033&r1=227032&r2=227033&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/Description.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/faults/Description.java Tue Aug 2 09:28:49 2005
@@ -1,49 +1,68 @@
-/*=============================================================================*
- * Copyright 2005 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *=============================================================================*/
-package org.apache.ws.resource.faults;
-
-/**
- * The WS-BaseFaults Description type.
- *
- * @author Ian P. Springer
- */
-public class Description
-{
-
- private String m_value;
- private String m_lang;
-
- public Description( String value )
- {
- m_value = value;
- }
-
- public String getValue()
- {
- return m_value;
- }
-
- public String getLang()
- {
- return m_lang;
- }
-
- public void setLang( String lang )
- {
- m_lang = lang;
- }
-
-}
+/*=============================================================================*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+package org.apache.ws.resource.faults;
+
+
+/**
+ * The WS-BaseFaults Description type.
+ *
+ * @author Ian P. Springer
+ */
+public class Description
+{
+ private String m_value;
+ private String m_lang;
+
+ /**
+ * Creates a new {@link Description} object.
+ *
+ * @param value DOCUMENT_ME
+ */
+ public Description( String value )
+ {
+ m_value = value;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param lang DOCUMENT_ME
+ */
+ public void setLang( String lang )
+ {
+ m_lang = lang;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String getLang( )
+ {
+ return m_lang;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String getValue( )
+ {
+ return m_value;
+ }
+}
\ No newline at end of file