You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2005/02/15 21:43:06 UTC
svn commit: r153952 [1/4] - in incubator/apollo/trunk/src:
java/org/apache/ws/resource/faults/ java/org/apache/ws/resource/faults/axis/
java/org/apache/ws/resource/faults/axis/v1_2_draft01/
java/org/apache/ws/resource/faults/axis/v1_2_draft03/
java/org/apache/ws/resource/faults/v1_2_draft03/
java/org/apache/ws/resource/handler/
java/org/apache/ws/resource/handler/axis/ java/org/apache/ws/resource/impl/
java/org/apache/ws/resource/lifetime/faults/
java/org/apache/ws/resource/lifetime/v1_2_draft04/
java/org/apache/ws/resource/lifetime/v1_2_draft04/porttype/
java/org/apache/ws/resource/lifetime/v1_2_draft04/porttype/impl/
java/org/apache/ws/resource/properties/
java/org/apache/ws/resource/properties/faults/
java/org/apache/ws/resource/properties/impl/
java/org/apache/ws/resource/properties/query/impl/
java/org/apache/ws/resource/properties/query/xpath/impl/
java/org/apache/ws/resource/properties/v1_2_draft05/
java/org/apache/ws/resource/properties/v1_2_draft05/porttype/
java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/
java/org/apache/ws/resource/servicegroup/v1_2_draft03/
java/org/apache/ws/resource/tool/ java/org/apache/ws/resource/tool/porttype/
java/org/apache/ws/resource/tool/porttype/v1_2_draft01/
java/org/apache/ws/resource/tool/porttype/v1_2_draft05/
java/org/apache/ws/resource/tool/velocity/ site/content/xdocs/
templates/1_2_draft01/ templates/1_2_draft05/
test/org/apache/ws/resource/properties/ webapp/WEB-INF/
Author: scamp
Date: Tue Feb 15 12:38:57 2005
New Revision: 153952
URL: http://svn.apache.org/viewcvs?view=rev&rev=153952
Log: (empty)
Added:
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/BaseFaultType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_Description.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_ErrorCode.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/BaseFaultType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_Description.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_ErrorCode.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v1_2_draft03/
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v1_2_draft03/Faults1_2Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2_draft04/
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2_draft04/ResourceLifetime1_2Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2_draft04/porttype/
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2_draft04/porttype/ImmediateResourceTerminationPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2_draft04/porttype/ScheduledResourceTerminationPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2_draft04/porttype/impl/
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2_draft04/porttype/impl/ImmediateResourceTerminationPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/v1_2_draft04/porttype/impl/ScheduledResourceTerminationPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/NamespaceVersionHolder.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/impl/AbstractResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/impl/AbstractXmlBeansResourcePropertyValueChangeEvent.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/ResourcePropertiesConstants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/DeleteResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/GetMultipleResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/GetResourcePropertyDocumentPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/GetResourcePropertyPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/InsertResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/QueryResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/SetResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/UpdateResourcePropertiesPortType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/DeleteResourcePropertiesPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/GetMultipleResourcePropertiesPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/GetResourcePropertyDocumentPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/GetResourcePropertyPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/InsertResourcePropertiesPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/NamespaceVersionHolderImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/QueryResourcePropertiesPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/SetResourcePropertiesPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/UpdateResourcePropertiesPortTypeImpl.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/XmlBeansResourcePropertyValueChangeEvent.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2_draft03/
incubator/apollo/trunk/src/java/org/apache/ws/resource/servicegroup/v1_2_draft03/ServiceGroup1_2Constants.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft01/
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft01/GetMultipleResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft01/GetResourcePropertyPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft01/ImmediateResourceTerminationPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft01/QueryResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft01/ScheduledResourceTerminationPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft01/SetResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/DeleteResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/GetMultipleResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/GetResourcePropertyDocumentPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/GetResourcePropertyPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/ImmediateResourceTerminationPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/InsertResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/QueryResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/ScheduledResourceTerminationPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/SetResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/v1_2_draft05/UpdateResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/site/content/xdocs/release.xml
Removed:
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/BaseFaultType.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/_BaseFaultType_Description.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/_BaseFaultType_ErrorCode.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/GetMultipleResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/GetResourcePropertyPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/ImmediateResourceTerminationPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/QueryResourcePropertiesPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/ScheduledResourceTerminationPortType2JavaInfo.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/porttype/SetResourcePropertiesPortType2JavaInfo.java
Modified:
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/ResoureKeyHeaderNotFoundFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/faults/ResourceNotDestroyedFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/faults/ResourceUnknownFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/faults/TerminationTimeChangeRejectedFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/faults/UnableToSetTerminationTimeFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidQueryExpressionFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidResourcePropertyQNameFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidSetResourcePropertiesRequestContentFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/QueryEvaluationErrorFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/ResourceUnknownFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/SetResourcePropertyRequestFailedFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnableToModifyResourcePropertyFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UnknownQueryExpressionDialectFaultException.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/query/impl/XmlBeansQueryExpression.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/query/xpath/impl/XalanXPathExpressionEvaluator.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/velocity/ConstQNames.java
incubator/apollo/trunk/src/site/content/xdocs/site.xml
incubator/apollo/trunk/src/templates/1_2_draft01/ImmediateResourceTermination.txt
incubator/apollo/trunk/src/templates/1_2_draft01/ScheduledResourceTermination-AbstractResource_init.txt
incubator/apollo/trunk/src/templates/1_2_draft01/ScheduledResourceTerminationResource.txt
incubator/apollo/trunk/src/templates/1_2_draft01/SetTerminationTime.txt
incubator/apollo/trunk/src/templates/1_2_draft05/GetMultiple.txt
incubator/apollo/trunk/src/templates/1_2_draft05/GetResource.txt
incubator/apollo/trunk/src/templates/1_2_draft05/ImmediateResourceTermination.txt
incubator/apollo/trunk/src/templates/1_2_draft05/Query.txt
incubator/apollo/trunk/src/templates/1_2_draft05/ScheduledResourceTermination-AbstractResource_init.txt
incubator/apollo/trunk/src/templates/1_2_draft05/ScheduledResourceTerminationResource.txt
incubator/apollo/trunk/src/templates/1_2_draft05/Set.txt
incubator/apollo/trunk/src/templates/1_2_draft05/SetTerminationTime.txt
incubator/apollo/trunk/src/test/org/apache/ws/resource/properties/AbstractSushiService.java
incubator/apollo/trunk/src/webapp/WEB-INF/server-config.wsdd
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java?view=diff&r1=153951&r2=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/BaseFaultException.java Tue Feb 15 12:38:57 2005
@@ -21,7 +21,8 @@
import org.apache.ws.util.i18n.Messages;
import org.apache.ws.resource.i18n.MessagesImpl;
import org.apache.ws.resource.i18n.Keys;
-import org.apache.ws.resource.faults.v1_2.Faults1_2Constants;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.faults.v1_2_draft01.Faults1_2Constants;
import javax.xml.namespace.QName;
import javax.xml.rpc.soap.SOAPFaultException;
@@ -40,10 +41,7 @@
/**
* DOCUMENT_ME
*/
- private static final QName DEFAULT_NAME =
- new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "BaseFault",
- Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA );
-
+ private static QName DEFAULT_NAME;
/**
* DOCUMENT_ME
*/
@@ -54,15 +52,17 @@
private QName m_name;
private String[] m_description;
private BaseFaultException[] m_faultCause;
+ private NamespaceVersionHolder m_namespaces;
- /**
+ /**
* Constructs a new BaseFaultException with the default name (wsbf:BaseFault). The SOAP fault code will be set to
* soap:Client and the SOAP fault string will be set to the fault name. Sets the timestamp field to the current time
* and the SOAP actor and detail fields to null.
+ * @param namespaces
*/
- public BaseFaultException( )
+ public BaseFaultException(NamespaceVersionHolder namespaces)
{
- this( null, null, null );
+ this( namespaces, null, null, null );
}
/**
@@ -70,40 +70,46 @@
* the SOAP fault string will be set to the fault name. Sets the timestamp field to the current time and the SOAP
* actor and detail fields to null.
*
+ * @param namespaces
* @param name XML element name to use when serializing this fault
*/
- public BaseFaultException( QName name )
+ public BaseFaultException(NamespaceVersionHolder namespaces, QName name)
{
- this( name, null, null );
+ this( namespaces, name, null, null );
}
/**
* Constructs a new BaseFaultException with the specified name and SOAP fault code. The SOAP fault string will be set
* to the fault name. Sets the timestamp field to the current time and the SOAP actor and detail fields to null.
*
+ * @param namespaces
* @param name XML element name to use when serializing this fault
* @param faultCode the SOAP fault code
*/
- public BaseFaultException( QName name,
- QName faultCode )
+ public BaseFaultException(NamespaceVersionHolder namespaces, QName name,
+ QName faultCode)
{
- this( name, faultCode, null );
+ this( namespaces, name, faultCode, null );
}
/**
* Constructs a new BaseFaultException with the specified name, SOAP fault code, and SOAP fault string. Sets the
* timestamp field to the current time and the SOAP actor and detail fields to null.
*
+ * @param namespaces
* @param name XML element name to use when serializing this fault
* @param faultCode the SOAP fault code
* @param faultString the SOAP fault string; if null, String.valueOf( name ) will be used as faultString
*/
- public BaseFaultException( QName name,
- QName faultCode,
- String faultString )
+ public BaseFaultException(NamespaceVersionHolder namespaces, QName name,
+ QName faultCode,
+ String faultString)
{
super( ( faultCode != null ) ? faultCode : DEFAULT_FAULT_CODE,
( faultString != null ) ? faultString : String.valueOf( name ), null, null );
+ DEFAULT_NAME = new QName( namespaces.getBaseFaultsXsdNamespace(), "BaseFault",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA );
+ m_namespaces = namespaces;
m_name = ( name != null ) ? name : DEFAULT_NAME;
m_timestamp = Calendar.getInstance( );
}
@@ -215,6 +221,11 @@
{
return m_timestamp;
}
+
+ public NamespaceVersionHolder getNamespaces()
+ {
+ return m_namespaces;
+ }
/**
* DOCUMENT_ME
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/ResoureKeyHeaderNotFoundFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/ResoureKeyHeaderNotFoundFaultException.java?view=diff&r1=153951&r2=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/ResoureKeyHeaderNotFoundFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/ResoureKeyHeaderNotFoundFaultException.java Tue Feb 15 12:38:57 2005
@@ -16,6 +16,7 @@
package org.apache.ws.resource.faults;
import org.apache.ws.resource.NamespaceConstants;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
import org.apache.ws.resource.i18n.MessagesImpl;
import org.apache.ws.resource.i18n.Keys;
import org.apache.ws.util.i18n.Messages;
@@ -42,12 +43,13 @@
*
* @param expectedHeaderName DOCUMENT_ME
*/
- public ResoureKeyHeaderNotFoundFaultException( QName expectedHeaderName )
+ public ResoureKeyHeaderNotFoundFaultException( NamespaceVersionHolder namespaces, QName expectedHeaderName )
{
- super( NAME );
+ super(namespaces, NAME );
setDescription( new String[]
{
MSG.getMessage(Keys.EXPECTED_ADDRESSING_HEADER,String.valueOf( expectedHeaderName ))
} );
}
+
}
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/BaseFaultType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/BaseFaultType.java?view=auto&rev=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/BaseFaultType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/BaseFaultType.java Tue Feb 15 12:38:57 2005
@@ -0,0 +1,359 @@
+/*=============================================================================*
+ * 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.axis.v1_2_draft01;
+
+import org.apache.axis.*;
+import org.apache.axis.description.*;
+import org.apache.axis.encoding.*;
+import org.apache.axis.encoding.ser.*;
+import org.apache.axis.message.*;
+import org.apache.axis.message.addressing.Constants;
+import org.apache.axis.message.addressing.*;
+import org.apache.axis.types.*;
+import org.apache.ws.resource.faults.*;
+import org.apache.ws.resource.faults.v1_2_draft01.*;
+
+import javax.xml.namespace.*;
+import javax.xml.soap.Detail;
+import javax.xml.soap.*;
+import java.io.*;
+import java.util.*;
+
+/**
+ * LOG-DONE
+ * WS-BaseFaults base fault type implemented as an {@link AxisFault}.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public class BaseFaultType
+ extends AxisFault
+{
+ /**
+ * DOCUMENT_ME
+ */
+ private static final QName DEFAULT_NAME =
+ new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "BaseFault",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA );
+
+ // Type metadata
+
+ /**
+ * DOCUMENT_ME
+ */
+ private static final TypeDesc TYPE_DESC = new TypeDesc( BaseFaultType.class, true );
+
+ static
+ {
+ // TODO: I don't think the below line should need to be commented out if sendXsiTypes=false - possible bug in SerializationContext.startElement()
+ //TYPE_DESC.setXmlType( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "BaseFaultType", Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ ElementDesc elemField = new ElementDesc( );
+ elemField.setFieldName( "timestamp" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "Timestamp",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( "http://www.w3.org/2001/XMLSchema", "dateTime", "xsd" ) );
+ TYPE_DESC.addFieldDesc( elemField );
+ elemField = new ElementDesc( );
+ elemField.setFieldName( "originator" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "Originator",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( Constants.NS_URI_ADDRESSING_03, "EndpointReferenceType" ) );
+ elemField.setMinOccurs( 0 );
+ TYPE_DESC.addFieldDesc( elemField );
+ elemField = new ElementDesc( );
+ elemField.setFieldName( "errorCode" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "ErrorCode",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, ">BaseFaultType>ErrorCode",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setMinOccurs( 0 );
+ TYPE_DESC.addFieldDesc( elemField );
+ elemField = new ElementDesc( );
+ elemField.setFieldName( "description" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "Description",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, ">BaseFaultType>Description",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setMinOccurs( 0 );
+ TYPE_DESC.addFieldDesc( elemField );
+ elemField = new ElementDesc( );
+ elemField.setFieldName( "faultCause" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "FaultCause",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "BaseFaultType",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setMinOccurs( 0 );
+ TYPE_DESC.addFieldDesc( elemField );
+ }
+
+ private QName m_name;
+ private Calendar m_timestamp;
+ private EndpointReferenceType m_originator;
+ private _BaseFaultType_ErrorCode m_errorCode;
+ private _BaseFaultType_Description[] m_description;
+ private BaseFaultType[] m_faultCause;
+
+ /**
+ * Constructs a new BaseFaultType with the specified name, SOAP fault code, and SOAP fault message. Sets the
+ * timestamp field to the current time and the SOAP actor and detail fields to null.
+ *
+ * @param name XML element name to use when serializing this fault
+ * @param _faultCode the SOAP fault code
+ * @param _faultString the SOAP fault string
+ */
+ public BaseFaultType( QName name,
+ QName _faultCode,
+ String _faultString )
+ {
+ super( _faultCode, _faultString, null, null );
+ m_name = ( name != null ) ? name : DEFAULT_NAME;
+ m_timestamp = Calendar.getInstance( );
+ }
+
+ /**
+ * Constructs a new BaseFaultType from the specified BaseFaultException.
+ *
+ * @param bfe a platform-neutral BaseFaultException
+ */
+ public BaseFaultType( BaseFaultException bfe )
+ {
+ setFaultCode( bfe.getFaultCode( ) );
+ setFaultString( bfe.getFaultString( ) );
+ setFaultActor( bfe.getFaultActor( ) );
+ if ( bfe.getDetail( ) != null )
+ {
+ setFaultDetail( new Detail[]
+ {
+ bfe.getDetail( )
+ } );
+ }
+
+ m_name = bfe.getName( );
+ m_timestamp = bfe.getTimestamp( );
+ m_originator = bfe.getOriginator( );
+ ErrorCode errorCode = bfe.getErrorCode( );
+ if ( errorCode != null )
+ {
+ try
+ {
+ m_errorCode =
+ new _BaseFaultType_ErrorCode( toMessageElements( errorCode.getContent( ) ),
+ new URI( errorCode.getDialect( ).toString( ) ) );
+ }
+ catch ( URI.MalformedURIException murie )
+ {
+ throw new RuntimeException( murie );
+ }
+ }
+
+ String[] description = bfe.getDescription( );
+ if ( description != null )
+ {
+ m_description = new _BaseFaultType_Description[description.length];
+ for ( int i = 0; i < description.length; i++ )
+ {
+ m_description[i] = new _BaseFaultType_Description( description[i] );
+ }
+ }
+
+ BaseFaultException[] faultCause = bfe.getFaultCause( );
+ if ( faultCause != null )
+ {
+ m_faultCause = new BaseFaultType[faultCause.length];
+ for ( int i = 0; i < faultCause.length; i++ )
+ {
+ m_faultCause[i] = new BaseFaultType( faultCause[i] );
+ }
+ }
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param description DOCUMENT_ME
+ */
+ public void setDescription( _BaseFaultType_Description[] description )
+ {
+ m_description = description;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public _BaseFaultType_Description[] getDescription( )
+ {
+ return m_description;
+ }
+
+ /**
+ * Gets deserializer for this fault.
+ */
+ public static Deserializer getDeserializer( String mechType,
+ Class javaType,
+ QName xmlType )
+ {
+ return new BeanDeserializer( javaType, xmlType, TYPE_DESC );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param errorCode DOCUMENT_ME
+ */
+ public void setErrorCode( _BaseFaultType_ErrorCode errorCode )
+ {
+ m_errorCode = errorCode;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public _BaseFaultType_ErrorCode getErrorCode( )
+ {
+ return m_errorCode;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param faultCause DOCUMENT_ME
+ */
+ public void setFaultCause( BaseFaultType[] faultCause )
+ {
+ m_faultCause = faultCause;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public BaseFaultType[] getFaultCause( )
+ {
+ return m_faultCause;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param originator DOCUMENT_ME
+ */
+ public void setOriginator( EndpointReferenceType originator )
+ {
+ m_originator = originator;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public EndpointReferenceType getOriginator( )
+ {
+ return m_originator;
+ }
+
+ /**
+ * Gets serializer for this fault.
+ */
+ public static Serializer getSerializer( String mechType,
+ Class javaType,
+ QName xmlType )
+ {
+ return new BeanSerializer( javaType, xmlType, TYPE_DESC );
+ }
+
+ /**
+ * 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 type metadata object (called via reflection by {@link SerializationContext#serialize}).
+ */
+ public static TypeDesc getTypeDesc( )
+ {
+ return TYPE_DESC;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String toString( )
+ {
+ // TODO
+ return super.toString( );
+ }
+
+ /**
+ * Serializes the WS-RF fault detail to the specified serialization context - called by {@link
+ * org.apache.axis.message.SOAPFault#outputImpl}.
+ *
+ * @param detailElemName the <code>QName</code> of the WS-RF fault detail element to be written (ignored by this
+ * impl)
+ * @param serContext the <code>SerializationContext</code> to write the fault detail XML to
+ *
+ * @throws java.io.IOException if serialization of the WS-RF fault detail fails
+ */
+ public void writeDetails( QName detailElemName,
+ SerializationContext serContext )
+ throws IOException
+ {
+ serContext.getMessageContext( ).setProperty( AxisEngine.PROP_SEND_XSI,
+ Boolean.FALSE.toString( ) );
+ serContext.setDoMultiRefs( false );
+ serContext.serialize( m_name, null, this, null, true, Boolean.FALSE );
+ }
+
+ /**
+ * @return
+ */
+ protected QName getName( )
+ {
+ return m_name;
+ }
+
+ private MessageElement[] toMessageElements( SOAPElement[] soapElems )
+ {
+ MessageElement[] msgElems = new MessageElement[soapElems.length];
+ for ( int i = 0; i < soapElems.length; i++ )
+ {
+ msgElems[i] = (MessageElement) soapElems[i];
+ }
+
+ return msgElems;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_Description.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_Description.java?view=auto&rev=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_Description.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_Description.java Tue Feb 15 12:38:57 2005
@@ -0,0 +1,178 @@
+/*=============================================================================*
+ * 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.axis.v1_2_draft01;
+
+
+/**
+ * LOG-DONE
+ * DOCUMENT_ME
+ *
+ * @author $author$
+ * @version $Revision: 1.4 $
+ */
+public class _BaseFaultType_Description
+ implements java.io.Serializable,
+ org.apache.axis.encoding.SimpleType
+{
+ // Type metadata
+ private static org.apache.axis.description.TypeDesc typeDesc =
+ new org.apache.axis.description.TypeDesc( _BaseFaultType_Description.class, true );
+
+ static
+ {
+ typeDesc.setXmlType( new javax.xml.namespace.QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd",
+ ">BaseFaultType>Description" ) );
+ org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc( );
+ elemField.setFieldName( "_value" );
+ elemField.setXmlName( new javax.xml.namespace.QName( "", "_value" ) );
+ elemField.setXmlType( new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string" ) );
+ typeDesc.addFieldDesc( elemField );
+ }
+
+ private java.lang.String _value;
+ private java.lang.Object __equalsCalc = null;
+ private boolean __hashCodeCalc = false;
+
+ /**
+ * Creates a new {@link _BaseFaultType_Description} object.
+ */
+ public _BaseFaultType_Description( )
+ {
+ }
+
+ // Simple Types must have a String constructor
+ public _BaseFaultType_Description( java.lang.String _value )
+ {
+ this._value = _value;
+ }
+
+ /**
+ * Get Custom Deserializer
+ */
+ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType,
+ java.lang.Class _javaType,
+ javax.xml.namespace.QName _xmlType )
+ {
+ return new org.apache.axis.encoding.ser.SimpleDeserializer( _javaType, _xmlType, typeDesc );
+ }
+
+ /**
+ * Get Custom Serializer
+ */
+ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType,
+ java.lang.Class _javaType,
+ javax.xml.namespace.QName _xmlType )
+ {
+ return new org.apache.axis.encoding.ser.SimpleSerializer( _javaType, _xmlType, typeDesc );
+ }
+
+ /**
+ * Return type metadata object
+ */
+ public static org.apache.axis.description.TypeDesc getTypeDesc( )
+ {
+ return typeDesc;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param obj DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized boolean equals( java.lang.Object obj )
+ {
+ if ( !( obj instanceof _BaseFaultType_Description ) )
+ {
+ return false;
+ }
+
+ _BaseFaultType_Description other = (_BaseFaultType_Description) obj;
+ if ( obj == null )
+ {
+ return false;
+ }
+
+ if ( this == obj )
+ {
+ return true;
+ }
+
+ if ( __equalsCalc != null )
+ {
+ return ( __equalsCalc == obj );
+ }
+
+ __equalsCalc = obj;
+ boolean _equals;
+ _equals =
+ true
+ && ( ( ( this._value == null ) && ( other.get_value( ) == null ) )
+ || ( ( this._value != null ) && this._value.equals( other.get_value( ) ) ) );
+ __equalsCalc = null;
+ return _equals;
+ }
+
+ /**
+ * Gets the _value value for this _BaseFaultType_Description.
+ *
+ * @return _value
+ */
+ public java.lang.String get_value( )
+ {
+ return _value;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized int hashCode( )
+ {
+ if ( __hashCodeCalc )
+ {
+ return 0;
+ }
+
+ __hashCodeCalc = true;
+ int _hashCode = 1;
+ if ( get_value( ) != null )
+ {
+ _hashCode += get_value( ).hashCode( );
+ }
+
+ __hashCodeCalc = false;
+ return _hashCode;
+ }
+
+ /**
+ * Sets the _value value for this _BaseFaultType_Description.
+ *
+ * @param _value
+ */
+ public void set_value( java.lang.String _value )
+ {
+ this._value = _value;
+ }
+
+ // Simple Types must have a toString for serializing the value
+ public java.lang.String toString( )
+ {
+ return _value;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_ErrorCode.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_ErrorCode.java?view=auto&rev=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_ErrorCode.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft01/_BaseFaultType_ErrorCode.java Tue Feb 15 12:38:57 2005
@@ -0,0 +1,217 @@
+/*=============================================================================*
+ * 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.axis.v1_2_draft01;
+
+
+/**
+ * LOG-DONE
+ * DOCUMENT_ME
+ *
+ * @author $author$
+ * @version $Revision: 1.4 $
+ */
+public class _BaseFaultType_ErrorCode
+ extends java.lang.Object
+ implements java.io.Serializable,
+ org.apache.axis.encoding.MixedContentType
+{
+ // Type metadata
+ private static org.apache.axis.description.TypeDesc typeDesc =
+ new org.apache.axis.description.TypeDesc( _BaseFaultType_ErrorCode.class, true );
+
+ static
+ {
+ typeDesc.setXmlType( new javax.xml.namespace.QName( "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd",
+ ">BaseFaultType>ErrorCode" ) );
+ org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc( );
+ attrField.setFieldName( "dialect" );
+ attrField.setXmlName( new javax.xml.namespace.QName( "", "dialect" ) );
+ attrField.setXmlType( new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "anyURI" ) );
+ typeDesc.addFieldDesc( attrField );
+ }
+
+ private org.apache.axis.message.MessageElement[] _any; // attribute
+ private org.apache.axis.types.URI dialect; // attribute
+ private java.lang.Object __equalsCalc = null;
+ private boolean __hashCodeCalc = false;
+
+ /**
+ * Creates a new {@link _BaseFaultType_ErrorCode} object.
+ */
+ public _BaseFaultType_ErrorCode( )
+ {
+ }
+
+ /**
+ * Creates a new {@link _BaseFaultType_ErrorCode} object.
+ *
+ * @param _any DOCUMENT_ME
+ * @param dialect DOCUMENT_ME
+ */
+ public _BaseFaultType_ErrorCode( org.apache.axis.message.MessageElement[] _any,
+ org.apache.axis.types.URI dialect )
+ {
+ this._any = _any;
+ this.dialect = dialect;
+ }
+
+ /**
+ * Get Custom Deserializer
+ */
+ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType,
+ java.lang.Class _javaType,
+ javax.xml.namespace.QName _xmlType )
+ {
+ return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc );
+ }
+
+ /**
+ * Sets the dialect value for this _BaseFaultType_ErrorCode.
+ *
+ * @param dialect
+ */
+ public void setDialect( org.apache.axis.types.URI dialect )
+ {
+ this.dialect = dialect;
+ }
+
+ /**
+ * Gets the dialect value for this _BaseFaultType_ErrorCode.
+ *
+ * @return dialect
+ */
+ public org.apache.axis.types.URI getDialect( )
+ {
+ return dialect;
+ }
+
+ /**
+ * Get Custom Serializer
+ */
+ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType,
+ java.lang.Class _javaType,
+ javax.xml.namespace.QName _xmlType )
+ {
+ return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc );
+ }
+
+ /**
+ * Return type metadata object
+ */
+ public static org.apache.axis.description.TypeDesc getTypeDesc( )
+ {
+ return typeDesc;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param obj DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized boolean equals( java.lang.Object obj )
+ {
+ if ( !( obj instanceof _BaseFaultType_ErrorCode ) )
+ {
+ return false;
+ }
+
+ _BaseFaultType_ErrorCode other = (_BaseFaultType_ErrorCode) obj;
+ if ( obj == null )
+ {
+ return false;
+ }
+
+ if ( this == obj )
+ {
+ return true;
+ }
+
+ if ( __equalsCalc != null )
+ {
+ return ( __equalsCalc == obj );
+ }
+
+ __equalsCalc = obj;
+ boolean _equals;
+ _equals =
+ super.equals( obj )
+ && ( ( ( this._any == null ) && ( other.get_any( ) == null ) )
+ || ( ( this._any != null ) && java.util.Arrays.equals( this._any,
+ other.get_any( ) ) ) )
+ && ( ( ( this.dialect == null ) && ( other.getDialect( ) == null ) )
+ || ( ( this.dialect != null ) && this.dialect.equals( other.getDialect( ) ) ) );
+ __equalsCalc = null;
+ return _equals;
+ }
+
+ /**
+ * Gets the _any value for this _BaseFaultType_ErrorCode.
+ *
+ * @return _any
+ */
+ public org.apache.axis.message.MessageElement[] get_any( )
+ {
+ return _any;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized int hashCode( )
+ {
+ if ( __hashCodeCalc )
+ {
+ return 0;
+ }
+
+ __hashCodeCalc = true;
+ int _hashCode = super.hashCode( );
+ if ( get_any( ) != null )
+ {
+ for ( int i = 0; i < java.lang.reflect.Array.getLength( get_any( ) ); i++ )
+ {
+ java.lang.Object obj = java.lang.reflect.Array.get( get_any( ),
+ i );
+ if ( ( obj != null ) && !obj.getClass( ).isArray( ) )
+ {
+ _hashCode += obj.hashCode( );
+ }
+ }
+ }
+
+ if ( getDialect( ) != null )
+ {
+ _hashCode += getDialect( ).hashCode( );
+ }
+
+ __hashCodeCalc = false;
+ return _hashCode;
+ }
+
+ /**
+ * Sets the _any value for this _BaseFaultType_ErrorCode.
+ *
+ * @param _any
+ */
+ public void set_any( org.apache.axis.message.MessageElement[] _any )
+ {
+ this._any = _any;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/BaseFaultType.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/BaseFaultType.java?view=auto&rev=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/BaseFaultType.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/BaseFaultType.java Tue Feb 15 12:38:57 2005
@@ -0,0 +1,366 @@
+/*=============================================================================*
+ * 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.axis.v1_2_draft03;
+
+import org.apache.axis.AxisEngine;
+import org.apache.axis.AxisFault;
+import org.apache.axis.description.ElementDesc;
+import org.apache.axis.description.TypeDesc;
+import org.apache.axis.encoding.Deserializer;
+import org.apache.axis.encoding.SerializationContext;
+import org.apache.axis.encoding.Serializer;
+import org.apache.axis.encoding.ser.BeanDeserializer;
+import org.apache.axis.encoding.ser.BeanSerializer;
+import org.apache.axis.message.MessageElement;
+import org.apache.axis.message.addressing.EndpointReferenceType;
+import org.apache.axis.message.addressing.Constants;
+import org.apache.axis.types.URI;
+import org.apache.ws.resource.faults.BaseFaultException;
+import org.apache.ws.resource.faults.ErrorCode;
+import org.apache.ws.resource.faults.v1_2_draft03.Faults1_2Constants;
+
+
+import javax.xml.namespace.QName;
+import javax.xml.soap.Detail;
+import javax.xml.soap.SOAPElement;
+import java.io.IOException;
+import java.util.Calendar;
+
+/**
+ * LOG-DONE
+ * WS-BaseFaults base fault type implemented as an {@link AxisFault}.
+ *
+ * @author Ian P. Springer (Hewlett-Packard Company)
+ */
+public class BaseFaultType
+ extends AxisFault
+{
+ /**
+ * DOCUMENT_ME
+ */
+ private static final QName DEFAULT_NAME =
+ new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "BaseFault",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA );
+
+ // Type metadata
+
+ /**
+ * DOCUMENT_ME
+ */
+ private static final TypeDesc TYPE_DESC = new TypeDesc( BaseFaultType.class, true );
+
+ static
+ {
+ // TODO: I don't think the below line should need to be commented out if sendXsiTypes=false - possible bug in SerializationContext.startElement()
+ //TYPE_DESC.setXmlType( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "BaseFaultType", Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ ElementDesc elemField = new ElementDesc( );
+ elemField.setFieldName( "timestamp" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "Timestamp",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( "http://www.w3.org/2001/XMLSchema", "dateTime", "xsd" ) );
+ TYPE_DESC.addFieldDesc( elemField );
+ elemField = new ElementDesc( );
+ elemField.setFieldName( "originator" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "Originator",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( Constants.NS_URI_ADDRESSING_08, "EndpointReferenceType" ) );
+ elemField.setMinOccurs( 0 );
+ TYPE_DESC.addFieldDesc( elemField );
+ elemField = new ElementDesc( );
+ elemField.setFieldName( "errorCode" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "ErrorCode",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, ">BaseFaultType>ErrorCode",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setMinOccurs( 0 );
+ TYPE_DESC.addFieldDesc( elemField );
+ elemField = new ElementDesc( );
+ elemField.setFieldName( "description" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "Description",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, ">BaseFaultType>Description",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setMinOccurs( 0 );
+ TYPE_DESC.addFieldDesc( elemField );
+ elemField = new ElementDesc( );
+ elemField.setFieldName( "faultCause" );
+ elemField.setXmlName( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "FaultCause",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setXmlType( new QName( Faults1_2Constants.NSURI_BASEFAULTS_SCHEMA, "BaseFaultType",
+ Faults1_2Constants.NSPREFIX_BASEFAULTS_SCHEMA ) );
+ elemField.setMinOccurs( 0 );
+ TYPE_DESC.addFieldDesc( elemField );
+ }
+
+ private QName m_name;
+ private Calendar m_timestamp;
+ private EndpointReferenceType m_originator;
+ private _BaseFaultType_ErrorCode m_errorCode;
+ private _BaseFaultType_Description[] m_description;
+ private BaseFaultType[] m_faultCause;
+
+ /**
+ * Constructs a new BaseFaultType with the specified name, SOAP fault code, and SOAP fault message. Sets the
+ * timestamp field to the current time and the SOAP actor and detail fields to null.
+ *
+ * @param name XML element name to use when serializing this fault
+ * @param _faultCode the SOAP fault code
+ * @param _faultString the SOAP fault string
+ */
+ public BaseFaultType( QName name,
+ QName _faultCode,
+ String _faultString )
+ {
+ super( _faultCode, _faultString, null, null );
+ m_name = ( name != null ) ? name : DEFAULT_NAME;
+ m_timestamp = Calendar.getInstance( );
+ }
+
+ /**
+ * Constructs a new BaseFaultType from the specified BaseFaultException.
+ *
+ * @param bfe a platform-neutral BaseFaultException
+ */
+ public BaseFaultType( BaseFaultException bfe )
+ {
+ setFaultCode( bfe.getFaultCode( ) );
+ setFaultString( bfe.getFaultString( ) );
+ setFaultActor( bfe.getFaultActor( ) );
+ if ( bfe.getDetail( ) != null )
+ {
+ setFaultDetail( new Detail[]
+ {
+ bfe.getDetail( )
+ } );
+ }
+
+ m_name = bfe.getName( );
+ m_timestamp = bfe.getTimestamp( );
+ m_originator = bfe.getOriginator( );
+ ErrorCode errorCode = bfe.getErrorCode( );
+ if ( errorCode != null )
+ {
+ try
+ {
+ m_errorCode =
+ new _BaseFaultType_ErrorCode( toMessageElements( errorCode.getContent( ) ),
+ new URI( errorCode.getDialect( ).toString( ) ) );
+ }
+ catch ( URI.MalformedURIException murie )
+ {
+ throw new RuntimeException( murie );
+ }
+ }
+
+ String[] description = bfe.getDescription( );
+ if ( description != null )
+ {
+ m_description = new _BaseFaultType_Description[description.length];
+ for ( int i = 0; i < description.length; i++ )
+ {
+ m_description[i] = new _BaseFaultType_Description( description[i] );
+ }
+ }
+
+ BaseFaultException[] faultCause = bfe.getFaultCause( );
+ if ( faultCause != null )
+ {
+ m_faultCause = new BaseFaultType[faultCause.length];
+ for ( int i = 0; i < faultCause.length; i++ )
+ {
+ m_faultCause[i] = new BaseFaultType( faultCause[i] );
+ }
+ }
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param description DOCUMENT_ME
+ */
+ public void setDescription( _BaseFaultType_Description[] description )
+ {
+ m_description = description;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public _BaseFaultType_Description[] getDescription( )
+ {
+ return m_description;
+ }
+
+ /**
+ * Gets deserializer for this fault.
+ */
+ public static Deserializer getDeserializer( String mechType,
+ Class javaType,
+ QName xmlType )
+ {
+ return new BeanDeserializer( javaType, xmlType, TYPE_DESC );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param errorCode DOCUMENT_ME
+ */
+ public void setErrorCode( _BaseFaultType_ErrorCode errorCode )
+ {
+ m_errorCode = errorCode;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public _BaseFaultType_ErrorCode getErrorCode( )
+ {
+ return m_errorCode;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param faultCause DOCUMENT_ME
+ */
+ public void setFaultCause( BaseFaultType[] faultCause )
+ {
+ m_faultCause = faultCause;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public BaseFaultType[] getFaultCause( )
+ {
+ return m_faultCause;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param originator DOCUMENT_ME
+ */
+ public void setOriginator( EndpointReferenceType originator )
+ {
+ m_originator = originator;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public EndpointReferenceType getOriginator( )
+ {
+ return m_originator;
+ }
+
+ /**
+ * Gets serializer for this fault.
+ */
+ public static Serializer getSerializer( String mechType,
+ Class javaType,
+ QName xmlType )
+ {
+ return new BeanSerializer( javaType, xmlType, TYPE_DESC );
+ }
+
+ /**
+ * 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 type metadata object (called via reflection by {@link SerializationContext#serialize}).
+ */
+ public static TypeDesc getTypeDesc( )
+ {
+ return TYPE_DESC;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String toString( )
+ {
+ // TODO
+ return super.toString( );
+ }
+
+ /**
+ * Serializes the WS-RF fault detail to the specified serialization context - called by {@link
+ * org.apache.axis.message.SOAPFault#outputImpl}.
+ *
+ * @param detailElemName the <code>QName</code> of the WS-RF fault detail element to be written (ignored by this
+ * impl)
+ * @param serContext the <code>SerializationContext</code> to write the fault detail XML to
+ *
+ * @throws IOException if serialization of the WS-RF fault detail fails
+ */
+ public void writeDetails( QName detailElemName,
+ SerializationContext serContext )
+ throws IOException
+ {
+ serContext.getMessageContext( ).setProperty( AxisEngine.PROP_SEND_XSI,
+ Boolean.FALSE.toString( ) );
+ serContext.setDoMultiRefs( false );
+ serContext.serialize( m_name, null, this, null, true, Boolean.FALSE );
+ }
+
+ /**
+ * @return
+ */
+ protected QName getName( )
+ {
+ return m_name;
+ }
+
+ private MessageElement[] toMessageElements( SOAPElement[] soapElems )
+ {
+ MessageElement[] msgElems = new MessageElement[soapElems.length];
+ for ( int i = 0; i < soapElems.length; i++ )
+ {
+ msgElems[i] = (MessageElement) soapElems[i];
+ }
+
+ return msgElems;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_Description.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_Description.java?view=auto&rev=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_Description.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_Description.java Tue Feb 15 12:38:57 2005
@@ -0,0 +1,178 @@
+/*=============================================================================*
+ * 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.axis.v1_2_draft03;
+
+
+/**
+ * LOG-DONE
+ * DOCUMENT_ME
+ *
+ * @author $author$
+ * @version $Revision: 1.4 $
+ */
+public class _BaseFaultType_Description
+ implements java.io.Serializable,
+ org.apache.axis.encoding.SimpleType
+{
+ // Type metadata
+ private static org.apache.axis.description.TypeDesc typeDesc =
+ new org.apache.axis.description.TypeDesc( _BaseFaultType_Description.class, true );
+
+ static
+ {
+ typeDesc.setXmlType( new javax.xml.namespace.QName( "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-BaseFaults-1.2-draft-03.xsd",
+ ">BaseFaultType>Description" ) );
+ org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc( );
+ elemField.setFieldName( "_value" );
+ elemField.setXmlName( new javax.xml.namespace.QName( "", "_value" ) );
+ elemField.setXmlType( new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "string" ) );
+ typeDesc.addFieldDesc( elemField );
+ }
+
+ private String _value;
+ private Object __equalsCalc = null;
+ private boolean __hashCodeCalc = false;
+
+ /**
+ * Creates a new {@link _BaseFaultType_Description} object.
+ */
+ public _BaseFaultType_Description( )
+ {
+ }
+
+ // Simple Types must have a String constructor
+ public _BaseFaultType_Description( String _value )
+ {
+ this._value = _value;
+ }
+
+ /**
+ * Get Custom Deserializer
+ */
+ public static org.apache.axis.encoding.Deserializer getDeserializer( String mechType,
+ Class _javaType,
+ javax.xml.namespace.QName _xmlType )
+ {
+ return new org.apache.axis.encoding.ser.SimpleDeserializer( _javaType, _xmlType, typeDesc );
+ }
+
+ /**
+ * Get Custom Serializer
+ */
+ public static org.apache.axis.encoding.Serializer getSerializer( String mechType,
+ Class _javaType,
+ javax.xml.namespace.QName _xmlType )
+ {
+ return new org.apache.axis.encoding.ser.SimpleSerializer( _javaType, _xmlType, typeDesc );
+ }
+
+ /**
+ * Return type metadata object
+ */
+ public static org.apache.axis.description.TypeDesc getTypeDesc( )
+ {
+ return typeDesc;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param obj DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized boolean equals( Object obj )
+ {
+ if ( !( obj instanceof _BaseFaultType_Description ) )
+ {
+ return false;
+ }
+
+ _BaseFaultType_Description other = (_BaseFaultType_Description) obj;
+ if ( obj == null )
+ {
+ return false;
+ }
+
+ if ( this == obj )
+ {
+ return true;
+ }
+
+ if ( __equalsCalc != null )
+ {
+ return ( __equalsCalc == obj );
+ }
+
+ __equalsCalc = obj;
+ boolean _equals;
+ _equals =
+ true
+ && ( ( ( this._value == null ) && ( other.get_value( ) == null ) )
+ || ( ( this._value != null ) && this._value.equals( other.get_value( ) ) ) );
+ __equalsCalc = null;
+ return _equals;
+ }
+
+ /**
+ * Gets the _value value for this _BaseFaultType_Description.
+ *
+ * @return _value
+ */
+ public String get_value( )
+ {
+ return _value;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized int hashCode( )
+ {
+ if ( __hashCodeCalc )
+ {
+ return 0;
+ }
+
+ __hashCodeCalc = true;
+ int _hashCode = 1;
+ if ( get_value( ) != null )
+ {
+ _hashCode += get_value( ).hashCode( );
+ }
+
+ __hashCodeCalc = false;
+ return _hashCode;
+ }
+
+ /**
+ * Sets the _value value for this _BaseFaultType_Description.
+ *
+ * @param _value
+ */
+ public void set_value( String _value )
+ {
+ this._value = _value;
+ }
+
+ // Simple Types must have a toString for serializing the value
+ public String toString( )
+ {
+ return _value;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_ErrorCode.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_ErrorCode.java?view=auto&rev=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_ErrorCode.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/axis/v1_2_draft03/_BaseFaultType_ErrorCode.java Tue Feb 15 12:38:57 2005
@@ -0,0 +1,217 @@
+/*=============================================================================*
+ * 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.axis.v1_2_draft03;
+
+
+/**
+ * LOG-DONE
+ * DOCUMENT_ME
+ *
+ * @author $author$
+ * @version $Revision: 1.4 $
+ */
+public class _BaseFaultType_ErrorCode
+ extends Object
+ implements java.io.Serializable,
+ org.apache.axis.encoding.MixedContentType
+{
+ // Type metadata
+ private static org.apache.axis.description.TypeDesc typeDesc =
+ new org.apache.axis.description.TypeDesc( _BaseFaultType_ErrorCode.class, true );
+
+ static
+ {
+ typeDesc.setXmlType( new javax.xml.namespace.QName( "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-BaseFaults-1.2-draft-03.xsd",
+ ">BaseFaultType>ErrorCode" ) );
+ org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc( );
+ attrField.setFieldName( "dialect" );
+ attrField.setXmlName( new javax.xml.namespace.QName( "", "dialect" ) );
+ attrField.setXmlType( new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "anyURI" ) );
+ typeDesc.addFieldDesc( attrField );
+ }
+
+ private org.apache.axis.message.MessageElement[] _any; // attribute
+ private org.apache.axis.types.URI dialect; // attribute
+ private Object __equalsCalc = null;
+ private boolean __hashCodeCalc = false;
+
+ /**
+ * Creates a new {@link _BaseFaultType_ErrorCode} object.
+ */
+ public _BaseFaultType_ErrorCode( )
+ {
+ }
+
+ /**
+ * Creates a new {@link _BaseFaultType_ErrorCode} object.
+ *
+ * @param _any DOCUMENT_ME
+ * @param dialect DOCUMENT_ME
+ */
+ public _BaseFaultType_ErrorCode( org.apache.axis.message.MessageElement[] _any,
+ org.apache.axis.types.URI dialect )
+ {
+ this._any = _any;
+ this.dialect = dialect;
+ }
+
+ /**
+ * Get Custom Deserializer
+ */
+ public static org.apache.axis.encoding.Deserializer getDeserializer( String mechType,
+ Class _javaType,
+ javax.xml.namespace.QName _xmlType )
+ {
+ return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc );
+ }
+
+ /**
+ * Sets the dialect value for this _BaseFaultType_ErrorCode.
+ *
+ * @param dialect
+ */
+ public void setDialect( org.apache.axis.types.URI dialect )
+ {
+ this.dialect = dialect;
+ }
+
+ /**
+ * Gets the dialect value for this _BaseFaultType_ErrorCode.
+ *
+ * @return dialect
+ */
+ public org.apache.axis.types.URI getDialect( )
+ {
+ return dialect;
+ }
+
+ /**
+ * Get Custom Serializer
+ */
+ public static org.apache.axis.encoding.Serializer getSerializer( String mechType,
+ Class _javaType,
+ javax.xml.namespace.QName _xmlType )
+ {
+ return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc );
+ }
+
+ /**
+ * Return type metadata object
+ */
+ public static org.apache.axis.description.TypeDesc getTypeDesc( )
+ {
+ return typeDesc;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param obj DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized boolean equals( Object obj )
+ {
+ if ( !( obj instanceof _BaseFaultType_ErrorCode ) )
+ {
+ return false;
+ }
+
+ _BaseFaultType_ErrorCode other = (_BaseFaultType_ErrorCode) obj;
+ if ( obj == null )
+ {
+ return false;
+ }
+
+ if ( this == obj )
+ {
+ return true;
+ }
+
+ if ( __equalsCalc != null )
+ {
+ return ( __equalsCalc == obj );
+ }
+
+ __equalsCalc = obj;
+ boolean _equals;
+ _equals =
+ super.equals( obj )
+ && ( ( ( this._any == null ) && ( other.get_any( ) == null ) )
+ || ( ( this._any != null ) && java.util.Arrays.equals( this._any,
+ other.get_any( ) ) ) )
+ && ( ( ( this.dialect == null ) && ( other.getDialect( ) == null ) )
+ || ( ( this.dialect != null ) && this.dialect.equals( other.getDialect( ) ) ) );
+ __equalsCalc = null;
+ return _equals;
+ }
+
+ /**
+ * Gets the _any value for this _BaseFaultType_ErrorCode.
+ *
+ * @return _any
+ */
+ public org.apache.axis.message.MessageElement[] get_any( )
+ {
+ return _any;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public synchronized int hashCode( )
+ {
+ if ( __hashCodeCalc )
+ {
+ return 0;
+ }
+
+ __hashCodeCalc = true;
+ int _hashCode = super.hashCode( );
+ if ( get_any( ) != null )
+ {
+ for ( int i = 0; i < java.lang.reflect.Array.getLength( get_any( ) ); i++ )
+ {
+ Object obj = java.lang.reflect.Array.get( get_any( ),
+ i );
+ if ( ( obj != null ) && !obj.getClass( ).isArray( ) )
+ {
+ _hashCode += obj.hashCode( );
+ }
+ }
+ }
+
+ if ( getDialect( ) != null )
+ {
+ _hashCode += getDialect( ).hashCode( );
+ }
+
+ __hashCodeCalc = false;
+ return _hashCode;
+ }
+
+ /**
+ * Sets the _any value for this _BaseFaultType_ErrorCode.
+ *
+ * @param _any
+ */
+ public void set_any( org.apache.axis.message.MessageElement[] _any )
+ {
+ this._any = _any;
+ }
+}
\ No newline at end of file
Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v1_2_draft03/Faults1_2Constants.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v1_2_draft03/Faults1_2Constants.java?view=auto&rev=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v1_2_draft03/Faults1_2Constants.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/faults/v1_2_draft03/Faults1_2Constants.java Tue Feb 15 12:38:57 2005
@@ -0,0 +1,43 @@
+/*=============================================================================*
+ * 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.v1_2_draft03;
+
+
+/**
+ * @author Sal Campana
+ */
+public interface Faults1_2Constants
+{
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_BASEFAULTS_WSDL = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-BaseFaults-1.2-draft-03.wsdl";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_BASEFAULTS_WSDL = "wsbfw";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSURI_BASEFAULTS_SCHEMA = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-BaseFaults-1.2-draft-03.xsd";
+
+ /**
+ * DOCUMENT_ME
+ */
+ String NSPREFIX_BASEFAULTS_SCHEMA = "wsbf";
+}
\ No newline at end of file
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java?view=diff&r1=153951&r2=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/DefaultMethodMap.java Tue Feb 15 12:38:57 2005
@@ -15,8 +15,6 @@
*=============================================================================*/
package org.apache.ws.resource.handler;
-import org.apache.ws.resource.properties.v1_2.ResourceProperties1_2Constants;
-import org.apache.ws.resource.lifetime.v1_2.ResourceLifetime1_2Constants;
import javax.xml.namespace.QName;
import java.util.HashMap;
@@ -43,21 +41,49 @@
private static void addWsrpOperations( Map map )
{
- map.put( new QName( ResourceProperties1_2Constants.NSURI_WSRP_SCHEMA, "GetResourceProperty", ResourceProperties1_2Constants.NSPREFIX_WSRP_SCHEMA ),
+ //draft 01
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "GetResourceProperty", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
"getResourceProperty" );
- map.put( new QName( ResourceProperties1_2Constants.NSURI_WSRP_SCHEMA, "QueryResourceProperties", ResourceProperties1_2Constants.NSPREFIX_WSRP_SCHEMA ),
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "QueryResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
"queryResourceProperties" );
- map.put( new QName( ResourceProperties1_2Constants.NSURI_WSRP_SCHEMA, "SetResourceProperties", ResourceProperties1_2Constants.NSPREFIX_WSRP_SCHEMA ),
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "SetResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
"setResourceProperties" );
- map.put( new QName( ResourceProperties1_2Constants.NSURI_WSRP_SCHEMA, "GetMultipleResourceProperties", ResourceProperties1_2Constants.NSPREFIX_WSRP_SCHEMA ),
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "GetMultipleResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
"getMultipleResourceProperties" );
+
+ //draft 05
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "GetResourceProperty", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
+ "getResourceProperty" );
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "QueryResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
+ "queryResourceProperties" );
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "SetResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
+ "setResourceProperties" );
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "GetMultipleResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
+ "getMultipleResourceProperties" );
+
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "GetResourcePropertyDocument", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
+ "getResourcePropertyDocument" );
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "InsertResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
+ "insertResourceProperties" );
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "UpdateResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
+ "updateResourceProperties" );
+ map.put( new QName( org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSURI_WSRP_SCHEMA, "DeleteResourceProperties", org.apache.ws.resource.properties.v1_2_draft01.ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA ),
+ "deleteResourceProperties" );
+
}
private static void addWsrlOperations( Map map )
{
- map.put( new QName( ResourceLifetime1_2Constants.NSURI_WSRL_SCHEMA, "SetTerminationTime", ResourceLifetime1_2Constants.NSPREFIX_WSRL_SCHEMA ),
+ //draft 01
+ map.put( new QName( org.apache.ws.resource.lifetime.v1_2_draft01.ResourceLifetime1_2Constants.NSURI_WSRL_SCHEMA, "SetTerminationTime", org.apache.ws.resource.lifetime.v1_2_draft01.ResourceLifetime1_2Constants.NSPREFIX_WSRL_SCHEMA ),
+ "setTerminationTime" );
+ map.put( new QName( org.apache.ws.resource.lifetime.v1_2_draft01.ResourceLifetime1_2Constants.NSURI_WSRL_SCHEMA, "Destroy", org.apache.ws.resource.lifetime.v1_2_draft01.ResourceLifetime1_2Constants.NSPREFIX_WSRL_SCHEMA ),
+ "destroy" );
+
+ //draft 04
+ map.put( new QName( org.apache.ws.resource.lifetime.v1_2_draft04.ResourceLifetime1_2Constants.NSURI_WSRL_SCHEMA, "SetTerminationTime", org.apache.ws.resource.lifetime.v1_2_draft04.ResourceLifetime1_2Constants.NSPREFIX_WSRL_SCHEMA ),
"setTerminationTime" );
- map.put( new QName( ResourceLifetime1_2Constants.NSURI_WSRL_SCHEMA, "Destroy", ResourceLifetime1_2Constants.NSPREFIX_WSRL_SCHEMA ),
+ map.put( new QName( org.apache.ws.resource.lifetime.v1_2_draft04.ResourceLifetime1_2Constants.NSURI_WSRL_SCHEMA, "Destroy", org.apache.ws.resource.lifetime.v1_2_draft04.ResourceLifetime1_2Constants.NSPREFIX_WSRL_SCHEMA ),
"destroy" );
}
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java?view=diff&r1=153951&r2=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/handler/axis/ResourceProvider.java Tue Feb 15 12:38:57 2005
@@ -25,7 +25,7 @@
import org.apache.ws.resource.i18n.MessagesImpl;
import org.apache.ws.resource.i18n.Keys;
import org.apache.ws.resource.faults.BaseFaultException;
-import org.apache.ws.resource.faults.axis.BaseFaultType;
+
import org.apache.ws.resource.handler.ResourceHandler;
import org.apache.ws.util.i18n.Messages;
import org.apache.xmlbeans.XmlObject;
@@ -200,7 +200,16 @@
}
catch ( BaseFaultException bfe )
{
- throw new BaseFaultType( bfe );
+ org.apache.ws.resource.properties.NamespaceVersionHolder namespaces = bfe.getNamespaces();
+ if( namespaces instanceof org.apache.ws.resource.properties.v1_2_draft05.porttype.impl.NamespaceVersionHolderImpl)
+ {
+ throw new org.apache.ws.resource.faults.axis.v1_2_draft03.BaseFaultType( bfe );
+ }
+ else
+ {
+ throw new org.apache.ws.resource.faults.axis.v1_2_draft01.BaseFaultType( bfe );
+ }
+
}
}
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java?view=diff&r1=153951&r2=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/impl/AbstractResourceHome.java Tue Feb 15 12:38:57 2005
@@ -28,11 +28,9 @@
import org.apache.ws.resource.ResourceException;
import org.apache.ws.resource.ResourceHome;
import org.apache.ws.resource.ResourceKey;
-import org.apache.ws.resource.PropertiesResource;
import org.apache.ws.resource.i18n.Keys;
import org.apache.ws.resource.i18n.MessagesImpl;
import org.apache.ws.resource.lifetime.ScheduledResourceTerminationResource;
-import org.apache.ws.resource.properties.ResourcePropertySet;
import org.apache.ws.util.Cache;
import org.apache.ws.util.i18n.Messages;
import org.apache.ws.util.jndi.Initializable;
Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/faults/ResourceNotDestroyedFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/faults/ResourceNotDestroyedFaultException.java?view=diff&r1=153951&r2=153952
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/faults/ResourceNotDestroyedFaultException.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/lifetime/faults/ResourceNotDestroyedFaultException.java Tue Feb 15 12:38:57 2005
@@ -16,10 +16,11 @@
package org.apache.ws.resource.lifetime.faults;
import org.apache.ws.resource.ResourceUnknownException;
-import org.apache.ws.resource.i18n.MessagesImpl;
-import org.apache.ws.resource.i18n.Keys;
import org.apache.ws.resource.faults.BaseFaultException;
-import org.apache.ws.resource.lifetime.v1_2.ResourceLifetime1_2Constants;
+import org.apache.ws.resource.i18n.Keys;
+import org.apache.ws.resource.i18n.MessagesImpl;
+import org.apache.ws.resource.lifetime.v1_2_draft01.ResourceLifetime1_2Constants;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
import org.apache.ws.util.i18n.Messages;
import javax.xml.namespace.QName;
@@ -34,12 +35,7 @@
extends BaseFaultException
{
public static final Messages MSG = MessagesImpl.getInstance();
- /**
- * DOCUMENT_ME
- */
- private static final QName NAME =
- new QName( ResourceLifetime1_2Constants.NSURI_WSRL_SCHEMA, "ResourceUnknownFault",
- ResourceLifetime1_2Constants.NSPREFIX_WSRL_SCHEMA );
+
private Object m_resourceId;
private String m_serviceName;
@@ -50,10 +46,10 @@
* @param resourceId
* @param serviceName
*/
- public ResourceNotDestroyedFaultException( Object resourceId,
+ public ResourceNotDestroyedFaultException( NamespaceVersionHolder namespaces, Object resourceId,
String serviceName )
{
- super( NAME );
+ super(namespaces, getQName(namespaces) );
setDescription( new String[]
{
MSG.getMessage( Keys.UNABLE_TO_DESTROY_RESOURCE,serviceName,resourceId)
@@ -65,10 +61,10 @@
/**
* @param rue
*/
- public ResourceNotDestroyedFaultException( ResourceUnknownException rue )
+ public ResourceNotDestroyedFaultException( NamespaceVersionHolder namespaces, ResourceUnknownException rue )
{
// TODO
- this( rue.getResourceId( ),
+ this( namespaces, rue.getResourceId( ),
rue.getServiceName( ) );
}
@@ -91,4 +87,11 @@
{
return m_serviceName;
}
+
+ private static QName getQName(NamespaceVersionHolder namespaces)
+ {
+ return new QName( namespaces.getLifetimeXsdNamespace(), "ResourceUnknownFault",
+ ResourceLifetime1_2Constants.NSPREFIX_WSRL_SCHEMA );
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org