You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ru...@apache.org on 2006/03/27 10:02:11 UTC
svn commit: r389047 [5/7] - in /webservices/commons/trunk/modules/axiom: ./
src/org/apache/axiom/om/impl/dom/ src/org/apache/axiom/om/impl/dom/factory/
src/org/apache/axiom/om/impl/dom/jaxp/
src/org/apache/axiom/om/impl/dom/msg/ src/org/apache/axiom/so...
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/msg/XMLMessages.properties
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/msg/XMLMessages.properties?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/msg/XMLMessages.properties (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/msg/XMLMessages.properties Mon Mar 27 00:02:06 2006
@@ -0,0 +1,292 @@
+# This file contains error and warning messages related to XML
+# The messages are arranged in key and value tuples in a ListResourceBundle.
+#
+# @version
+
+ BadMessageKey = The error message corresponding to the message key can not be found.
+ FormatFailed = An internal error occurred while formatting the following message:\n
+
+# Document messages
+ PrematureEOF=Premature end of file.
+# 2.1 Well-Formed XML Documents
+ RootElementRequired = The root element is required in a well-formed document.
+# 2.2 Characters
+ InvalidCharInCDSect = An invalid XML character (Unicode: 0x{0}) was found in the CDATA section.
+ InvalidCharInContent = An invalid XML character (Unicode: 0x{0}) was found in the element content of the document.
+ TwoColonsInQName = An invalid second ':' was found in the element type or attribute name.
+ ColonNotLegalWithNS = A colon is not allowed in the name ''{0}'' when namespaces are enabled.
+ InvalidCharInMisc = An invalid XML character (Unicode: 0x{0}) was found in markup after the end of the element content.
+ InvalidCharInProlog = An invalid XML character (Unicode: 0x{0}) was found in the prolog of the document.
+ InvalidCharInXMLDecl = An invalid XML character (Unicode: 0x{0}) was found in the XML declaration.
+# 2.4 Character Data and Markup
+ CDEndInContent = The character sequence \"]]>\" must not appear in content unless used to mark the end of a CDATA section.
+# 2.7 CDATA Sections
+ CDSectUnterminated = The CDATA section must end with \"]]>\".
+# 2.8 Prolog and Document Type Declaration
+ XMLDeclMustBeFirst = The XML declaration may only appear at the very beginning of the document.
+ EqRequiredInXMLDecl = The '' = '' character must follow \"{0}\" in the XML declaration.
+ QuoteRequiredInXMLDecl = The value following \"{0}\" in the XML declaration must be a quoted string.
+ XMLDeclUnterminated = The XML declaration must end with \"?>\".
+ VersionInfoRequired = The version is required in the XML declaration.
+ SpaceRequiredBeforeVersionInXMLDecl = White space is required before the version pseudo attribute in the XML declaration.
+ SpaceRequiredBeforeEncodingInXMLDecl = White space is required before the encoding pseudo attribute in the XML declaration.
+ SpaceRequiredBeforeStandalone = White space is required before the encoding pseudo attribute in the XML declaration.
+ MarkupNotRecognizedInProlog = The markup in the document preceding the root element must be well-formed.
+ MarkupNotRecognizedInMisc = The markup in the document following the root element must be well-formed.
+ AlreadySeenDoctype = Already seen doctype.
+ DoctypeNotAllowed = DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
+ ContentIllegalInProlog = Content is not allowed in prolog.
+ ReferenceIllegalInProlog = Reference is not allowed in prolog.
+# Trailing Misc
+ ContentIllegalInTrailingMisc=Content is not allowed in trailing section.
+ ReferenceIllegalInTrailingMisc=Reference is not allowed in trailing section.
+
+# 2.9 Standalone Document Declaration
+ SDDeclInvalid = The standalone document declaration value must be \"yes\" or \"no\", not \"{0}\".
+# 2.12 Language Identification
+ XMLLangInvalid = The xml:lang attribute value \"{0}\" is an invalid language identifier.
+# 3. Logical Structures
+ ETagRequired = The element type \"{0}\" must be terminated by the matching end-tag \"</{0}>\".
+# 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+ ElementUnterminated = Element type \"{0}\" must be followed by either attribute specifications, \">\" or \"/>\".
+ EqRequiredInAttribute = Attribute name \"{1}\" associated with an element type \"{0}\" must be followed by the '' = '' character.
+ OpenQuoteExpected = Open quote is expected for attribute \"{1}\" associated with an element type \"{0}\".
+ CloseQuoteExpected = Close quote is expected for attribute \"{1}\" associated with an element type \"{0}\".
+ AttributeNotUnique = Attribute \"{1}\" was already specified for element \"{0}\".
+ AttributeNSNotUnique = Attribute \"{1}\" bound to namespace \"{2}\" was already specified for element \"{0}\".
+ ETagUnterminated = The end-tag for element type \"{0}\" must end with a ''>'' delimiter.
+ MarkupNotRecognizedInContent = The content of elements must consist of well-formed character data or markup.
+ DoctypeIllegalInContent = A DOCTYPE is not allowed in content.
+# 4.1 Character and Entity References
+ ReferenceUnterminated = The reference must be terminated by a ';' delimiter.
+# 4.3.2 Well-Formed Parsed Entities
+ ReferenceNotInOneEntity = The reference must be entirely contained within the same parsed entity.
+ ElementEntityMismatch = The element \"{0}\" must start and end within the same entity.
+ MarkupEntityMismatch=XML document structures must start and end within the same entity.
+
+# Messages common to Document and DTD
+# 2.2 Characters
+ InvalidCharInAttValue = An invalid XML character (Unicode: 0x{2}) was found in the value of attribute \"{1}\" and element is \"{0}\".
+ InvalidCharInComment = An invalid XML character (Unicode: 0x{0}) was found in the comment.
+ InvalidCharInPI = An invalid XML character (Unicode: 0x{0}) was found in the processing instruction.
+ InvalidCharInInternalSubset = An invalid XML character (Unicode: 0x{0}) was found in the internal subset of the DTD.
+ InvalidCharInTextDecl = An invalid XML character (Unicode: 0x{0}) was found in the text declaration.
+# 2.3 Common Syntactic Constructs
+ QuoteRequiredInAttValue = The value of attribute \"{1}\" must begin with either a single or double quote character.
+ LessthanInAttValue = The value of attribute \"{1}\" associated with an element type \"{0}\" must not contain the ''<'' character.
+ AttributeValueUnterminated = The value for attribute \"{1}\" must end with the matching quote character.
+# 2.5 Comments
+ InvalidCommentStart = Comment must start with \"<!--\".
+ DashDashInComment = The string \"--\" is not permitted within comments.
+ CommentUnterminated = The comment must end with \"-->\".
+ COMMENT_NOT_IN_ONE_ENTITY = The comment is not enclosed xin the same entity.
+# 2.6 Processing Instructions
+ PITargetRequired = The processing instruction must begin with the name of the target.
+ SpaceRequiredInPI = White space is required between the processing instruction target and data.
+ PIUnterminated = The processing instruction must end with \"?>\".
+ ReservedPITarget = The processing instruction target matching \"[xX][mM][lL]\" is not allowed.
+ PI_NOT_IN_ONE_ENTITY = The processing instruction is not enclosed in the same entity.
+# 2.8 Prolog and Document Type Declaration
+ VersionInfoInvalid = Invalid version \"{0}\".
+ VersionNotSupported = XML version \"{0}\" is not supported, only XML 1.0 is supported.
+ VersionNotSupported11 = XML version \"{0}\" is not supported, only XML 1.0 and XML 1.1 are supported.
+# 4.1 Character and Entity References
+ DigitRequiredInCharRef = A decimal representation must immediately follow the \"&#\" in a character reference.
+ HexdigitRequiredInCharRef = A hexadecimal representation must immediately follow the \"&#x\" in a character reference.
+ SemicolonRequiredInCharRef = The character reference must end with the ';' delimiter.
+ InvalidCharRef = Character reference \"&#{0}\" is an invalid XML character.
+ NameRequiredInReference = The entity name must immediately follow the '&' in the entity reference.
+ SemicolonRequiredInReference = The reference to entity \"{0}\" must end with the '';'' delimiter.
+# 4.3.1 The Text Declaration
+ TextDeclMustBeFirst = The text declaration may only appear at the very beginning of the external parsed entity.
+ EqRequiredInTextDecl = The '' = '' character must follow \"{0}\" in the text declaration.
+ QuoteRequiredInTextDecl = The value following \"{0}\" in the text declaration must be a quoted string.
+ CloseQuoteMissingInTextDecl = closing quote in the value following \"{0}\" in the text declaration is missing.
+ SpaceRequiredBeforeVersionInTextDecl = White space is required before the version pseudo attribute in the text declaration.
+ SpaceRequiredBeforeEncodingInTextDecl = White space is required before the encoding pseudo attribute in the text declaration.
+ TextDeclUnterminated = The text declaration must end with \"?>\".
+ EncodingDeclRequired = The encoding declaration is required in the text declaration.
+ NoMorePseudoAttributes = No more pseudo attributes are allowed.
+ MorePseudoAttributes = More pseudo attributes are expected.
+ PseudoAttrNameExpected = A pseudo attribute name is expected.
+# 4.3.2 Well-Formed Parsed Entities
+ CommentNotInOneEntity = The comment must be entirely contained within the same parsed entity.
+ PINotInOneEntity = The processing instruction must be entirely contained within the same parsed entity.
+# 4.3.3 Character Encoding in Entities
+ EncodingDeclInvalid = Invalid encoding name \"{0}\".
+ EncodingByteOrderUnsupported = Given byte order for encoding \"{0}\" is not supported.
+ InvalidByte = Invalid byte {0} of {1}-byte UTF-8 sequence.
+ ExpectedByte = Expected byte {0} of {1}-byte UTF-8 sequence.
+ InvalidHighSurrogate = High surrogate bits in UTF-8 sequence must not exceed 0x10 but found 0x{0}.
+ OperationNotSupported = Operation \"{0}\" not supported by {1} reader.
+ InvalidASCII = Byte \"{0}\" is not a member of the (7-bit) ASCII character set.
+ CharConversionFailure = An entity determined to be in a certain encoding must not contain sequences illegal in that encoding.
+
+# DTD Messages
+# 2.2 Characters
+ InvalidCharInEntityValue = An invalid XML character (Unicode: 0x{0}) was found in the literal entity value.
+ InvalidCharInExternalSubset = An invalid XML character (Unicode: 0x{0}) was found in the external subset of the DTD.
+ InvalidCharInIgnoreSect = An invalid XML character (Unicode: 0x{0}) was found in the excluded conditional section.
+ InvalidCharInPublicID = An invalid XML character (Unicode: 0x{0}) was found in the public identifier.
+ InvalidCharInSystemID = An invalid XML character (Unicode: 0x{0}) was found in the system identifier.
+# 2.3 Common Syntactic Constructs
+ SpaceRequiredAfterSYSTEM = White space is required after keyword SYSTEM in DOCTYPE decl.
+ QuoteRequiredInSystemID = The system identifier must begin with either a single or double quote character.
+ SystemIDUnterminated = The system identifier must end with the matching quote character.
+ SpaceRequiredAfterPUBLIC = White spaces are required after keyword PUBLIC in DOCTYPE decl.
+ QuoteRequiredInPublicID = The public identifier must begin with either a single or double quote character.
+ PublicIDUnterminated = The public identifier must end with the matching quote character.
+ PubidCharIllegal = The character (Unicode: 0x{0}) is not permitted in the public identifier.
+ SpaceRequiredBetweenPublicAndSystem = White spaces are required between publicId and systemId.
+# 2.8 Prolog and Document Type Declaration
+ MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = White space is required after \"<!DOCTYPE\" in the document type declaration.
+ MSG_ROOT_ELEMENT_TYPE_REQUIRED = The root element type must appear after \"<!DOCTYPE\" in the document type declaration.
+ DoctypedeclUnterminated = The document type declaration for root element type \"{0}\" must end with ''>''.
+ PEReferenceWithinMarkup = The parameter entity reference \"%{0};\" cannot occur within markup in the internal subset of the DTD.
+ MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = The markup declarations contained or pointed to by the document type declaration must be well-formed.
+# 2.10 White Space Handling
+ MSG_XML_SPACE_DECLARATION_ILLEGAL = The attribute declaration for \"xml:space\" must be given as an enumerated type whose only possible values are \"default\" and \"preserve\".
+# 3.2 Element Type Declarations
+ MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL = White space is required after \"<!ELEMENT\" in the element type declaration.
+ MSG_ELEMENT_TYPE_REQUIRED_IN_ELEMENTDECL = The element type is required in the element type declaration.
+ MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL = White space is required after the element type \"{0}\" in the element type declaration.
+ MSG_CONTENTSPEC_REQUIRED_IN_ELEMENTDECL = The constraint is required after the element type \"{0}\" in the element type declaration.
+ ElementDeclUnterminated = The declaration for element type \"{0}\" must end with ''>''.
+# 3.2.1 Element Content
+ MSG_OPEN_PAREN_OR_ELEMENT_TYPE_REQUIRED_IN_CHILDREN = A ''('' character or an element type is required in the declaration of element type \"{0}\".
+ MSG_CLOSE_PAREN_REQUIRED_IN_CHILDREN = A '')'' is required in the declaration of element type \"{0}\".
+# 3.2.2 Mixed Content
+ MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT = An element type is required in the declaration of element type \"{0}\".
+ MSG_CLOSE_PAREN_REQUIRED_IN_MIXED = A '')'' is required in the declaration of element type \"{0}\".
+ MixedContentUnterminated = The mixed content model \"{0}\" must end with \")*\" when the types of child elements are constrained.
+# 3.3 Attribute-List Declarations
+ MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL = White space is required after \"<!ATTLIST\" in the attribute-list declaration.
+ MSG_ELEMENT_TYPE_REQUIRED_IN_ATTLISTDECL = The element type is required in the attribute-list declaration.
+ MSG_SPACE_REQUIRED_BEFORE_ATTRIBUTE_NAME_IN_ATTDEF = White space is required before the attribute name in the attribute-list declaration for element \"{0}\".
+ AttNameRequiredInAttDef = The attribute name must be specified in the attribute-list declaration for element \"{0}\".
+ MSG_SPACE_REQUIRED_BEFORE_ATTTYPE_IN_ATTDEF = White space is required before the attribute type in the declaration of attribute \"{1}\" for element \"{0}\".
+ AttTypeRequiredInAttDef = The attribute type is required in the declaration of attribute \"{1}\" for element \"{0}\".
+ MSG_SPACE_REQUIRED_BEFORE_DEFAULTDECL_IN_ATTDEF = White space is required before the attribute default in the declaration of attribute \"{1}\" for element \"{0}\".
+ MSG_DUPLICATE_ATTRIBUTE_DEFINITION = More than one attribute definition is provided for the same attribute \"{1}\" of a given element \"{0}\".
+# 3.3.1 Attribute Types
+ MSG_SPACE_REQUIRED_AFTER_NOTATION_IN_NOTATIONTYPE = White space must appear after \"NOTATION\" in the \"{1}\" attribute declaration.
+ MSG_OPEN_PAREN_REQUIRED_IN_NOTATIONTYPE = The ''('' character must follow \"NOTATION\" in the \"{1}\" attribute declaration.
+ MSG_NAME_REQUIRED_IN_NOTATIONTYPE = The notation name is required in the notation type list for the \"{1}\" attribute declaration.
+ NotationTypeUnterminated = The notation type list must end with '')'' in the \"{1}\" attribute declaration.
+ MSG_NMTOKEN_REQUIRED_IN_ENUMERATION = The name token is required in the enumerated type list for the \"{1}\" attribute declaration.
+ EnumerationUnterminated = The enumerated type list must end with '')'' in the \"{1}\" attribute declaration.
+ MSG_DISTINCT_TOKENS_IN_ENUMERATION = The enumeration value \"{1}\" was specified more than once in the declaration of attribute \"{2}\" for element \"{0}\". The NMTOKENS in a single Enumeration attribute declaration must all be distinct.
+ MSG_DISTINCT_NOTATION_IN_ENUMERATION = The enumeration value \"{1}\" was specified more than once in the declaration of attribute \"{2}\" for element \"{0}\". The NOTATION names in a single NotationType attribute declaration must all be distinct.
+# 3.3.2 Attribute Defaults
+ MSG_SPACE_REQUIRED_AFTER_FIXED_IN_DEFAULTDECL = White space must appear after \"FIXED\" in the \"{1}\" attribute declaration.
+# 3.4 Conditional Sections
+ IncludeSectUnterminated = The included conditional section must end with \"]]>\".
+ IgnoreSectUnterminated = The excluded conditional section must end with \"]]>\".
+# 4.1 Character and Entity References
+ NameRequiredInPEReference = The entity name must immediately follow the '%' in the parameter entity reference.
+ SemicolonRequiredInPEReference = The parameter entity reference \"%{0};\" must end with the '';'' delimiter.
+# 4.2 Entity Declarations
+ MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_ENTITYDECL = White space is required after \"<!ENTITY\" in the entity declaration.
+ MSG_SPACE_REQUIRED_BEFORE_PERCENT_IN_PEDECL = White space is required between \"<!ENTITY\" and the '%' character in the parameter entity declaration.
+ MSG_SPACE_REQUIRED_BEFORE_ENTITY_NAME_IN_PEDECL = White space is required between the '%' and the entity name in the parameter entity declaration.
+ MSG_ENTITY_NAME_REQUIRED_IN_ENTITYDECL = The name of the entity is required in the entity declaration.
+ MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL = White space is required between the entity name \"{0}\" and the definition in the entity declaration.
+ MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL = White space is required between \"NDATA\" and the notation name in the declaration for the entity \"{0}\".
+ MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL = White space is required before \"NDATA\" in the declaration for the entity \"{0}\".
+ MSG_NOTATION_NAME_REQUIRED_FOR_UNPARSED_ENTITYDECL = The notation name is required after \"NDATA\" in the declaration for the entity \"{0}\".
+ EntityDeclUnterminated = The declaration for the entity \"{0}\" must end with ''>''.
+ MSG_DUPLICATE_ENTITY_DEFINITION = Entity \"{0}\" is declared more than once.
+# 4.2.2 External Entities
+ ExternalIDRequired = The external entity declaration must begin with either \"SYSTEM\" or \"PUBLIC\".
+ MSG_SPACE_REQUIRED_BEFORE_PUBIDLITERAL_IN_EXTERNALID = White space is required between \"PUBLIC\" and the public identifier.
+ MSG_SPACE_REQUIRED_AFTER_PUBIDLITERAL_IN_EXTERNALID = White space is required between the public identifier and the system identifier.
+ MSG_SPACE_REQUIRED_BEFORE_SYSTEMLITERAL_IN_EXTERNALID = White space is required between \"SYSTEM\" and the system identifier.
+ MSG_URI_FRAGMENT_IN_SYSTEMID = The fragment identifier should not be specified as part of the system identifier \"{0}\".
+# 4.7 Notation Declarations
+ MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL = White space is required after \"<!NOTATION\" in the notation declaration.
+ MSG_NOTATION_NAME_REQUIRED_IN_NOTATIONDECL = The name of the notation is required in the notation declaration.
+ MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL = White space is required after the notation name \"{0}\" in the notation declaration.
+ ExternalIDorPublicIDRequired = The declaration for the notation \"{0}\" must include a system or public identifier.
+ NotationDeclUnterminated = The declaration for the notation \"{0}\" must end with ''>''.
+
+# Validation messages
+ DuplicateTypeInMixedContent = The element type \"{1}\" was already specified in the content model of the element decl \"{0}\".
+ ENTITIESInvalid = Attribute value \"{1}\" of type ENTITIES must be the names of one or more unparsed entities.
+ ENTITYInvalid = Attribute value \"{1}\" of type ENTITY must be the name of an unparsed entity.
+ IDDefaultTypeInvalid = The ID attribute \"{0}\" must have a declared default of \"#IMPLIED\" or \"#REQUIRED\".
+ IDInvalid = Attribute value \"{0}\" of type ID must be a name.
+ IDInvalidWithNamespaces = Attribute value \"{0}\" of type ID must be an NCName when namespaces are enabled.
+ IDNotUnique = Attribute value \"{0}\" of type ID must be unique within the document.
+ IDREFInvalid = Attribute value \"{0}\" of type IDREF must be a name.
+ IDREFInvalidWithNamespaces = Attribute value \"{0}\" of type IDREF must be an NCName when namespaces are enabled.
+ IDREFSInvalid = Attribute value \"{0}\" of type IDREFS must be one or more names.
+ ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL = The replacement text of parameter entity \"{0}\" must include properly nested declarations when the entity reference is used as a complete declaration.
+ ImproperDeclarationNesting = The replacement text of parameter entity \"{0}\" must include properly nested declarations.
+ ImproperGroupNesting = The replacement text of parameter entity \"{0}\" must include properly nested pairs of parentheses.
+ INVALID_PE_IN_CONDITIONAL = The replacement text of parameter entity \"{0}\" must include the entire conditional section or just INCLUDE or IGNORE.
+ MSG_ATTRIBUTE_NOT_DECLARED = Attribute \"{1}\" must be declared for element type \"{0}\".
+ MSG_ATTRIBUTE_VALUE_NOT_IN_LIST = Attribute \"{0}\" with value \"{1}\" must have a value from the list \"{2}\".
+ MSG_ATTVALUE_CHANGED_DURING_NORMALIZATION_WHEN_STANDALONE = The value \"{1}\" of attribute \"{0}\" must not be changed by normalization (to \"{2}\") in a standalone document.
+ MSG_CONTENT_INCOMPLETE = The content of element type \"{0}\" is incomplete, it must match \"{1}\".
+ MSG_CONTENT_INVALID = The content of element type \"{0}\" must match \"{1}\".
+ MSG_CONTENT_INVALID_SPECIFIED = The content of element type \"{0}\" must match \"{1}\". Children of type \"{2}\" are not allowed.
+ MSG_DEFAULTED_ATTRIBUTE_NOT_SPECIFIED = Attribute \"{1}\" for element type \"{0}\" has a default value and must be specified in a standalone document.
+ MSG_DUPLICATE_ATTDEF = Attribute \"{1}\" is already declared for element type \"{0}\".
+ MSG_ELEMENT_ALREADY_DECLARED = Element type \"{0}\" must not be declared more than once.
+ MSG_ELEMENT_NOT_DECLARED = Element type \"{0}\" must be declared.
+ MSG_GRAMMAR_NOT_FOUND = Document is invalid: no grammar found.
+ MSG_ELEMENT_WITH_ID_REQUIRED = An element with the identifier \"{0}\" must appear in the document.
+ MSG_EXTERNAL_ENTITY_NOT_PERMITTED = The reference to external entity \"{0}\" is not permitted in a standalone document.
+ MSG_FIXED_ATTVALUE_INVALID = Attribute \"{1}\" with value \"{2}\" must have a value of \"{3}\".
+ MSG_MORE_THAN_ONE_ID_ATTRIBUTE = Element type \"{0}\" already has attribute \"{1}\" of type ID, a second attribute \"{2}\" of type ID is not permitted.
+ MSG_MORE_THAN_ONE_NOTATION_ATTRIBUTE = Element type \"{0}\" already has attribute \"{1}\" of type NOTATION, a second attribute \"{2}\" of type NOTATION is not permitted.
+ MSG_NOTATION_NOT_DECLARED_FOR_NOTATIONTYPE_ATTRIBUTE = The notation \"{1}\" must be declared when referenced in the notation type list for attribute \"{0}\".
+ MSG_NOTATION_NOT_DECLARED_FOR_UNPARSED_ENTITYDECL = The notation \"{1}\" must be declared when referenced in the unparsed entity declaration for \"{0}\".
+ MSG_REFERENCE_TO_EXTERNALLY_DECLARED_ENTITY_WHEN_STANDALONE = The reference to entity \"{0}\" declared in an external parsed entity is not permitted in a standalone document.
+ MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED = Attribute \"{1}\" is required and must be specified for element type \"{0}\".
+ MSG_WHITE_SPACE_IN_ELEMENT_CONTENT_WHEN_STANDALONE = White space must not occur between elements declared in an external parsed entity with element content in a standalone document.
+ NMTOKENInvalid = Attribute value \"{0}\" of type NMTOKEN must be a name token.
+ NMTOKENSInvalid = Attribute value \"{0}\" of type NMTOKENS must be one or more name tokens.
+ NoNotationOnEmptyElement = Element type \"{0}\" which was declared EMPTY cannot declare attribute \"{1}\" of type NOTATION.
+ RootElementTypeMustMatchDoctypedecl = Document root element \"{1}\", must match DOCTYPE root \"{0}\".
+ UndeclaredElementInContentSpec = The content model of element \"{0}\" refers to the undeclared element \"{1}\".
+ UniqueNotationName = The declaration for the notation \"{0}\" is not unique. A given Name must not be declared in more than one notation declaration.
+ ENTITYFailedInitializeGrammar = ENTITYDatatype Validator: Failed Need to call initialize method with a valid Grammar reference.
+ ENTITYNotUnparsed = ENTITY \"{0}\" is not unparsed.
+ ENTITYNotValid = ENTITY \"{0}\" is not valid.
+ EmptyList = Value of type ENTITIES, IDREFS, and NMTOKENS cannot be empty list.
+
+# Entity related messages
+# 3.1 Start-Tags, End-Tags, and Empty-Element Tags
+ ReferenceToExternalEntity = The external entity reference \"&{0};\" is not permitted in an attribute value.
+# 4.1 Character and Entity References
+ EntityNotDeclared = The entity \"{0}\" was referenced, but not declared.
+ ReferenceToUnparsedEntity = The unparsed entity reference \"&{0};\" is not permitted.
+ RecursiveReference = Recursive entity reference \"{0}\". (Reference path: {1}),
+ RecursiveGeneralReference = Recursive general entity reference \"&{0};\". (Reference path: {1}),
+ RecursivePEReference = Recursive parameter entity reference \"%{0};\". (Reference path: {1}),
+# 4.3.3 Character Encoding in Entities
+ EncodingNotSupported = The encoding \"{0}\" is not supported.
+ EncodingRequired = A parsed entity not encoded in either UTF-8 or UTF-16 must contain an encoding declaration.
+
+# Namespaces support
+# 4. Using Qualified Names
+ IllegalQName = Element or attribute do not match QName production: QName::=(NCName':')?NCName.
+ ElementXMLNSPrefix = Element \"{0}\" cannot have \"xmlns\" as its prefix.
+ ElementPrefixUnbound = The prefix \"{0}\" for element \"{1}\" is not bound.
+ AttributePrefixUnbound = The prefix \"{2}\" for attribute \"{1}\" associated with an element type \"{0}\" is not bound.
+ EmptyPrefixedAttName = The value of the attribute \"{0}\" is invalid. Prefixed namespace bindings may not be empty.
+ PrefixDeclared = The namespace prefix \"{0}\" was not declared.
+ CantBindXMLNS = The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.
+ CantBindXML = The prefix "xml" cannot be bound to any namespace other than its usual namespace; neither can the namespace for "xml" be bound to any prefix other than "xml".
+ MSG_ATT_DEFAULT_INVALID = The defaultValue \"{1}\" of attribute \"{0}\" is not legal as for the lexical constraints of this attribute type.
+
+# REVISIT: These need messages
+ MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID=MSG_SPACE_REQUIRED_AFTER_SYSTEMLITERAL_IN_EXTERNALID
+ OpenQuoteMissingInDecl=OpenQuoteMissingInDecl
+ InvalidCharInLiteral=InvalidCharInLiteral
+
+
+#Application can set the limit of number of entities that should be expanded by the parser.
+EntityExpansionLimitExceeded=The parser has encountered more than \"{0}\" entity expansions in this document; this is the limit imposed by the application.
+
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/msg/XMLSerializerMessages.properties
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/msg/XMLSerializerMessages.properties?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/msg/XMLSerializerMessages.properties (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/dom/msg/XMLSerializerMessages.properties Mon Mar 27 00:02:06 2006
@@ -0,0 +1,33 @@
+# This file stores error messages for the Xerces XML
+# serializer. Many DOM Load/Save error messages also
+# live here, since the serializer largely implements that package.
+#
+# As usual with properties files, the messages are arranged in
+# key/value tuples.
+#
+# @version $Id: XMLSerializerMessages.properties,v 1.4 2005/06/18 03:36:55 mrglavas Exp $
+
+ BadMessageKey = The error message corresponding to the message key can not be found.
+ FormatFailed = An internal error occurred while formatting the following message:\n
+
+ ArgumentIsNull = Argument ''{0}'' is null.
+ NoWriterSupplied = No writer supplied for serializer.
+ MethodNotSupported = The method ''{0}'' is not supported by this factory.
+ ResetInMiddle = The serializer may not be reset in the middle of serialization.
+ Internal = Internal error: element state is zero.
+ NoName = There is no rawName and localName is null.
+ ElementQName = The element name ''{0}'' is not a QName.
+ ElementPrefix = Element ''{0}'' does not belong to any namespace: prefix could be undeclared or bound to some namespace.
+ AttributeQName = The attribute name ''{0}'' is not a QName.
+ AttributePrefix = Attribute ''{0}'' does not belong to any namespace: prefix could be undeclared or bound to some namespace.
+ InvalidNSDecl = Namespace declaration syntax is incorrect: {0}.
+ EndingCDATA = The character sequence \"]]>\" must not appear in content unless used to mark the end of a CDATA section.
+ SplittingCDATA = Splitting a CDATA section containing the CDATA section termination marker \"]]>\".
+ ResourceNotFound = The resource ''{0}'' could not be found.
+ ResourceNotLoaded = The resource ''{0}'' could not be loaded. {1}
+ SerializationStopped = Serialization stopped at user request.
+
+ # DOM Level 3 load and save messages
+ no-output-specified = no-output-specified: The output destination for data to be written to was null.
+ unsupported-encoding = unsupported-encoding: An unsupported encoding is encountered.
+ unable-to-serialize-node = unable-to-serialize-node: The node could not be serialized.
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPBodyImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMConstants;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMException;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.soap.SOAP11Constants;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPBody;
+import org.apache.axiom.soap.SOAPConstants;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+public abstract class SOAPBodyImpl extends SOAPElement implements SOAPBody,
+ OMConstants {
+
+ /**
+ * Field hasSOAPFault
+ */
+ protected boolean hasSOAPFault = false;
+
+ /**
+ * @param envelope
+ */
+ public SOAPBodyImpl(SOAPEnvelope envelope, SOAPFactory factory)
+ throws SOAPProcessingException {
+ super(envelope, SOAPConstants.BODY_LOCAL_NAME, true, factory);
+
+ }
+
+ /**
+ * Constructor SOAPBodyImpl
+ *
+ * @param envelope
+ * @param builder
+ */
+ public SOAPBodyImpl(SOAPEnvelope envelope, OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(envelope, SOAPConstants.BODY_LOCAL_NAME, builder, factory);
+ }
+
+ /**
+ * Creates a new <code>SOAPFault</code> object and adds it to
+ * this <code>SOAPBody</code> object.
+ *
+ * @param e
+ * @return the new <code>SOAPFault</code> object
+ * @throws org.apache.axiom.om.OMException
+ * if there is a SOAP error
+ * @throws OMException
+ */
+ public abstract SOAPFault addFault(Exception e) throws OMException;
+
+ /**
+ * Indicates whether a <code>SOAPFault</code> object exists in
+ * this <code>SOAPBody</code> object.
+ *
+ * @return <code>true</code> if a <code>SOAPFault</code> object exists in
+ * this <code>SOAPBody</code> object; <code>false</code>
+ * otherwise
+ */
+ public boolean hasFault() {
+ if (hasSOAPFault) {
+ return true;
+ } else {
+ OMElement element = getFirstElement();
+ if (element != null
+ && SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element
+ .getLocalName())
+ && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI
+ .equals(element.getNamespace().getName()) || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI
+ .equals(element.getNamespace().getName()))) { //added this line
+ hasSOAPFault = true;
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Returns the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+ * object.
+ *
+ * @return the <code>SOAPFault</code> object in this <code>SOAPBody</code>
+ * object
+ */
+ public SOAPFault getFault() {
+ OMElement element = getFirstElement();
+ if (hasSOAPFault) {
+ return (SOAPFault) element;
+ } else if (element != null
+ && SOAPConstants.SOAPFAULT_LOCAL_NAME.equals(element
+ .getLocalName())
+ && (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(element
+ .getNamespace().getName()) || SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI
+ .equals(element.getNamespace().getName()))) { //added this line
+ hasSOAPFault = true;
+ return (SOAPFault) element;
+ } else {
+ return null;
+ }
+
+ }
+
+ /**
+ * @param soapFault
+ * @throws org.apache.axiom.om.OMException
+ *
+ * @throws OMException
+ */
+ public void addFault(SOAPFault soapFault) throws OMException {
+ if (hasSOAPFault) {
+ throw new OMException(
+ "SOAP Body already has a SOAP Fault and there can not be " +
+ "more than one SOAP fault");
+ }
+ addChild(soapFault);
+ hasSOAPFault = true;
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ if (!(parent instanceof SOAPEnvelopeImpl)) {
+ throw new SOAPProcessingException(
+ "Expecting an implementation of SOAP Envelope as the " +
+ "parent. But received some other implementation");
+ }
+ }
+
+ /*public OMNode detach() throws OMException {
+ throw new SOAPProcessingException(
+ "Can not detach SOAP Body, SOAP Envelope must have a Body !!");
+ }*/
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPElement.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPElement.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPElement.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPElement.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.dom.DocumentImpl;
+import org.apache.axiom.om.impl.dom.ElementImpl;
+import org.apache.axiom.om.impl.dom.NamespaceImpl;
+import org.apache.axiom.om.impl.dom.ParentNode;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+public abstract class SOAPElement extends ElementImpl {
+
+ public SOAPElement(SOAPFactory factory) {
+ super(factory);
+ }
+
+ /**
+ * @param parent
+ */
+ protected SOAPElement(OMElement parent,
+ String localName,
+ boolean extractNamespaceFromParent,
+ SOAPFactory factory) throws SOAPProcessingException {
+ super((ParentNode)parent, localName, null, factory);
+ if (parent == null) {
+ throw new SOAPProcessingException(
+ " Can not create " + localName +
+ " element without a parent !!");
+ }
+ checkParent(parent);
+
+ if (extractNamespaceFromParent) {
+ this.namespace = parent.getNamespace();
+ }
+ this.localName = localName;
+ }
+
+
+ protected SOAPElement(OMElement parent,
+ String localName,
+ OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super((ParentNode)parent, localName, null, builder, factory);
+ }
+
+ protected SOAPElement(DocumentImpl doc, String localName, OMNamespace ns,
+ SOAPFactory factory) {
+ super(doc, localName, (NamespaceImpl)ns, factory);
+ }
+
+ protected SOAPElement(DocumentImpl ownerDocument, String tagName,
+ NamespaceImpl ns, OMXMLParserWrapper builder, SOAPFactory factory) {
+ super(ownerDocument, tagName, ns, builder, factory);
+ }
+
+ /**
+ * This has to be implemented by all the derived classes to check
+ * for the correct parent.
+ */
+ protected abstract void checkParent(OMElement parent)
+ throws SOAPProcessingException;
+
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMConstants;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMException;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.OMOutputImpl;
+import org.apache.axiom.om.impl.dom.DocumentImpl;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPBody;
+import org.apache.axiom.soap.SOAPConstants;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPHeader;
+import org.apache.axiom.soap.SOAPProcessingException;
+import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+public class SOAPEnvelopeImpl extends SOAPElement implements SOAPEnvelope,
+ OMConstants {
+
+
+ /**
+ * @param builder
+ */
+ public SOAPEnvelopeImpl(OMXMLParserWrapper builder, SOAPFactory factory) {
+ super(null, SOAPConstants.SOAPENVELOPE_LOCAL_NAME, builder, factory);
+ }
+
+ public SOAPEnvelopeImpl(DocumentImpl doc, OMXMLParserWrapper builder, SOAPFactory factory) {
+ super(
+ doc,
+ SOAPConstants.SOAPENVELOPE_LOCAL_NAME,
+ null,
+ builder, factory);
+ }
+ /**
+ * @param ns
+ */
+ public SOAPEnvelopeImpl(OMNamespace ns, SOAPFactory factory) {
+ super(((DOMSOAPFactory) factory).getDocument(),
+ SOAPConstants.SOAPENVELOPE_LOCAL_NAME, ns, factory);
+ this.getOwnerDocument().appendChild(this);
+ }
+
+ /**
+ * Returns the <CODE>SOAPHeader</CODE> object for this <CODE> SOAPEnvelope</CODE>
+ * object.
+ * <P>
+ * This SOAPHeader will just be a container for all the headers in the
+ * <CODE>OMMessage</CODE>
+ * </P>
+ *
+ * @return the <CODE>SOAPHeader</CODE> object or <CODE> null</CODE> if
+ * there is none
+ * @throws org.apache.axiom.om.OMException
+ * if there is a problem obtaining the <CODE>SOAPHeader</CODE>
+ * object
+ * @throws OMException
+ */
+ public SOAPHeader getHeader() throws OMException {
+ SOAPHeader header =
+ (SOAPHeader) getFirstChildWithName(new QName(SOAPConstants.HEADER_LOCAL_NAME));
+ return header;
+ }
+
+ public void addChild(OMNode child) {
+ if ((child instanceof OMElement)
+ && !(child instanceof SOAPHeader || child instanceof SOAPBody)) {
+ throw new SOAPProcessingException(
+ "SOAP Envelope can not have children other than SOAP Header and Body",
+ SOAP12Constants.FAULT_CODE_SENDER);
+ } else {
+ super.addChild(child);
+ }
+ }
+
+ /**
+ * Returns the <CODE>SOAPBody</CODE> object associated with this <CODE>SOAPEnvelope</CODE>
+ * object.
+ * <P>
+ * This SOAPBody will just be a container for all the BodyElements in the
+ * <CODE>OMMessage</CODE>
+ * </P>
+ *
+ * @return the <CODE>SOAPBody</CODE> object for this <CODE> SOAPEnvelope</CODE>
+ * object or <CODE>null</CODE> if there is none
+ * @throws org.apache.axiom.om.OMException
+ * if there is a problem obtaining the <CODE>SOAPBody</CODE>
+ * object
+ * @throws OMException
+ */
+ public SOAPBody getBody() throws OMException {
+ // check for the first element
+ OMElement element = getFirstElement();
+ if (element != null) {
+ if (SOAPConstants.BODY_LOCAL_NAME.equals(element.getLocalName())) {
+ return (SOAPBody) element;
+ } else { // if not second element SHOULD be the body
+ OMNode node = element.getNextOMSibling();
+ while (node != null && node.getType() != OMNode.ELEMENT_NODE) {
+ node = node.getNextOMSibling();
+ }
+ element = (OMElement) node;
+
+ if (node != null
+ && SOAPConstants.BODY_LOCAL_NAME.equals(element
+ .getLocalName())) {
+ return (SOAPBody) element;
+ }
+ /* else {
+ throw new OMException(
+ "SOAPEnvelope must contain a body element which is either first or second child element of the SOAPEnvelope.");
+ }*/
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Method detach
+ *
+ * @throws OMException
+ */
+ public OMNode detach() throws OMException {
+ throw new OMException("Root Element can not be detached");
+ }
+
+ protected void checkParent(OMElement parent) throws SOAPProcessingException {
+ // here do nothing as SOAPEnvelope doesn't have a parent !!!
+ }
+
+ protected void serialize(OMOutputImpl omOutput, boolean cache)
+ throws XMLStreamException {
+
+ if (!omOutput.isIgnoreXMLDeclaration()) {
+ String charSetEncoding = omOutput.getCharSetEncoding();
+ String xmlVersion = omOutput.getXmlVersion();
+ omOutput
+ .getXmlStreamWriter()
+ .writeStartDocument(
+ charSetEncoding == null ? OMConstants.DEFAULT_CHAR_SET_ENCODING
+ : charSetEncoding,
+ xmlVersion == null ? OMConstants.DEFAULT_XML_VERSION
+ : xmlVersion);
+ }
+ super.serialize(omOutput, cache);
+ }
+
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultCodeImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultCodeImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultCodeImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.OMOutputImpl;
+import org.apache.axiom.om.impl.llom.OMSerializerUtil;
+import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axiom.om.util.ElementHelper;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPFaultCode;
+import org.apache.axiom.soap.SOAPFaultSubCode;
+import org.apache.axiom.soap.SOAPFaultValue;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+
+public abstract class SOAPFaultCodeImpl extends SOAPElement implements SOAPFaultCode{
+
+ /**
+ * Constructor OMElementImpl
+ *
+ * @param parent
+ * @param builder
+ */
+ public SOAPFaultCodeImpl(SOAPFault parent, OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(parent, SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME, builder,
+ factory);
+ }
+
+ /**
+ * @param parent
+ */
+ public SOAPFaultCodeImpl(SOAPFault parent,
+ boolean extractNamespaceFromParent,
+ SOAPFactory factory) throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME,
+ extractNamespaceFromParent, factory);
+ }
+
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+ public void setValue(SOAPFaultValue value) throws SOAPProcessingException {
+ ElementHelper.setNewElement(this, value, value);
+ }
+
+ public SOAPFaultValue getValue() {
+ return (SOAPFaultValue) ElementHelper.getChildWithName(this,
+ SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME);
+ }
+
+ public void setSubCode(SOAPFaultSubCode value) throws SOAPProcessingException {
+ ElementHelper.setNewElement(this, getSubCode(), value);
+ }
+
+ public SOAPFaultSubCode getSubCode() {
+ return (SOAPFaultSubCode) ElementHelper.getChildWithName(this,
+ SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
+ }
+
+ protected void serialize(OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
+ }
+
+
+ if (!cache) {
+ //No caching
+ if (this.firstChild != null) {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ firstChild.serializeAndConsume(omOutput);
+ OMSerializerUtil.serializeEndpart(omOutput);
+ } else if (!this.done) {
+ if (builderType == PULL_TYPE_BUILDER) {
+ OMSerializerUtil.serializeByPullStream(this, omOutput);
+ } else {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ builder.setCache(cache);
+ builder.next();
+ OMSerializerUtil.serializeEndpart(omOutput);
+ }
+ } else {
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+ }
+ // do not serialise the siblings
+
+
+ } else {
+ //Cached
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+
+ // do not serialise the siblings
+ }
+
+
+ }
+
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultDetailImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.llom.OMSerializerUtil;
+import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPFaultDetail;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+import java.util.Iterator;
+
+public abstract class SOAPFaultDetailImpl extends SOAPElement implements SOAPFaultDetail {
+
+
+ protected SOAPFaultDetailImpl(SOAPFault parent,
+ boolean extractNamespaceFromParent, SOAPFactory factory)
+ throws SOAPProcessingException {
+ super(parent,
+ SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME,
+ extractNamespaceFromParent, factory);
+ }
+
+ protected SOAPFaultDetailImpl(SOAPFactory factory) {
+ super(factory);
+ }
+
+ protected SOAPFaultDetailImpl(SOAPFault parent,
+ OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(parent, SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME, builder,
+ factory);
+ }
+
+ public void addDetailEntry(OMElement detailElement) {
+ this.addChild(detailElement);
+ }
+
+ public Iterator getAllDetailEntries() {
+ return this.getChildren();
+ }
+
+ protected void serialize(org.apache.axiom.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
+ }
+
+
+ if (!cache) {
+ //No caching
+ if (this.firstChild != null) {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ firstChild.serializeAndConsume(omOutput);
+ OMSerializerUtil.serializeEndpart(omOutput);
+ } else if (!this.done) {
+ if (builderType == PULL_TYPE_BUILDER) {
+ OMSerializerUtil.serializeByPullStream(this, omOutput);
+ } else {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ builder.setCache(cache);
+ builder.next();
+ OMSerializerUtil.serializeEndpart(omOutput);
+ }
+ } else {
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+ }
+ // do not serialise the siblings
+
+
+ } else {
+ //Cached
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+
+ // do not serialise the siblings
+ }
+
+
+ }
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,242 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMConstants;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMException;
+import org.apache.axiom.om.OMNode;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.OMNodeEx;
+import org.apache.axiom.om.impl.dom.ElementImpl;
+import org.apache.axiom.om.impl.dom.ParentNode;
+import org.apache.axiom.om.impl.llom.OMSerializerUtil;
+import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPBody;
+import org.apache.axiom.soap.SOAPConstants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPFaultCode;
+import org.apache.axiom.soap.SOAPFaultDetail;
+import org.apache.axiom.soap.SOAPFaultNode;
+import org.apache.axiom.soap.SOAPFaultReason;
+import org.apache.axiom.soap.SOAPFaultRole;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Iterator;
+
+public abstract class SOAPFaultImpl extends SOAPElement implements SOAPFault,
+ OMConstants {
+
+ protected Exception e;
+ /**
+ * Constructor SOAPFaultImpl
+ *
+ * @param parent
+ * @param e
+ */
+ public SOAPFaultImpl(SOAPBody parent, Exception e, SOAPFactory factory)
+ throws SOAPProcessingException {
+ super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory);
+ setException(e);
+ }
+
+ public void setException(Exception e) {
+ this.e = e;
+ putExceptionToSOAPFault(e);
+ }
+
+ public SOAPFaultImpl(SOAPBody parent, SOAPFactory factory)
+ throws SOAPProcessingException {
+ super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, true, factory);
+ }
+
+ /**
+ * Constructor SOAPFaultImpl
+ *
+ * @param parent
+ * @param builder
+ */
+ public SOAPFaultImpl(SOAPBody parent, OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(parent, SOAPConstants.SOAPFAULT_LOCAL_NAME, builder, factory);
+ }
+
+ protected abstract SOAPFaultDetail getNewSOAPFaultDetail(SOAPFault fault)
+ throws SOAPProcessingException;
+
+ // --------------- Getters and Settors --------------------------- //
+
+ public void setCode(SOAPFaultCode soapFaultCode)
+ throws SOAPProcessingException {
+ setNewElement(getCode(), soapFaultCode);
+ }
+
+ public SOAPFaultCode getCode() {
+ return (SOAPFaultCode) this
+ .getChildWithName(SOAP12Constants.SOAP_FAULT_CODE_LOCAL_NAME);
+ }
+
+ public void setReason(SOAPFaultReason reason)
+ throws SOAPProcessingException {
+ setNewElement(getReason(), reason);
+ }
+
+ public SOAPFaultReason getReason() {
+ return (SOAPFaultReason) this
+ .getChildWithName(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME);
+ }
+
+ public void setNode(SOAPFaultNode node) throws SOAPProcessingException {
+ setNewElement(getNode(), node);
+ }
+
+ public SOAPFaultNode getNode() {
+ return (SOAPFaultNode) this
+ .getChildWithName(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME);
+ }
+
+ public void setRole(SOAPFaultRole role) throws SOAPProcessingException {
+ setNewElement(getRole(), role);
+ }
+
+ public SOAPFaultRole getRole() {
+ return (SOAPFaultRoleImpl) this
+ .getChildWithName(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME);
+ }
+
+ public void setDetail(SOAPFaultDetail detail)
+ throws SOAPProcessingException {
+ setNewElement(getDetail(), detail);
+ }
+
+ public SOAPFaultDetail getDetail() {
+ return (SOAPFaultDetail) this
+ .getChildWithName(SOAP12Constants.SOAP_FAULT_DETAIL_LOCAL_NAME);
+ }
+
+ /**
+ * If exception detailElement is not there we will return null
+ */
+ public Exception getException() throws OMException {
+ SOAPFaultDetail detail = getDetail();
+ if (detail == null) {
+ return null;
+ }
+
+ OMElement exceptionElement = getDetail().getFirstChildWithName(
+ new QName(SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY));
+ if (exceptionElement != null && exceptionElement.getText() != null) {
+ return new Exception(exceptionElement.getText());
+ }
+ return null;
+ }
+
+ protected void putExceptionToSOAPFault(Exception e)
+ throws SOAPProcessingException {
+ StringWriter sw = new StringWriter();
+ e.printStackTrace(new PrintWriter(sw));
+ sw.flush();
+ getDetail();
+ if (getDetail() == null) {
+ setDetail(getNewSOAPFaultDetail(this));
+
+ }
+ OMElement faultDetailEnty = new ElementImpl((ParentNode) this,
+ SOAPConstants.SOAP_FAULT_DETAIL_EXCEPTION_ENTRY,
+ null, this.factory);
+ faultDetailEnty.setText(sw.getBuffer().toString());
+ }
+
+ protected void setNewElement(OMElement myElement, OMElement newElement) {
+ if (myElement != null) {
+ myElement.discard();
+ }
+ if (newElement != null && newElement.getParent() != null) {
+ newElement.discard();
+ }
+ this.addChild(newElement);
+ myElement = newElement;
+ }
+
+ protected OMElement getChildWithName(String childName) {
+ Iterator childrenIter = getChildren();
+ while (childrenIter.hasNext()) {
+ OMNode node = (OMNode) childrenIter.next();
+ if (node.getType() == OMNode.ELEMENT_NODE
+ && childName.equals(((OMElement) node).getLocalName())) {
+ return (OMElement) node;
+ }
+ }
+ return null;
+ }
+
+ protected void serialize(org.apache.axiom.om.impl.OMOutputImpl omOutput,
+ boolean cache) throws XMLStreamException {
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder
+ .registerExternalContentHandler(new StreamWriterToContentHandlerConverter(
+ omOutput));
+ }
+
+ // this is a special case. This fault element may contain its children
+ // in any order. But spec mandates a specific order
+ // the overriding of the method will facilitate that. Not sure this is
+ // the best method to do this :(
+ build();
+
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ SOAPFaultCode faultCode = getCode();
+ if (faultCode != null) {
+ ((OMNodeEx)faultCode).serialize(omOutput);
+ }
+ SOAPFaultReason faultReason = getReason();
+ if (faultReason != null) {
+ ((OMNodeEx)faultReason).serialize(omOutput);
+ }
+
+ serializeFaultNode(omOutput);
+
+ SOAPFaultRole faultRole = getRole();
+ if (faultRole != null) {
+ ((OMNodeEx)faultRole).serialize(omOutput);
+ }
+
+ SOAPFaultDetail faultDetail = getDetail();
+ if (faultDetail != null) {
+ ((OMNodeEx)faultDetail).serialize(omOutput);
+ }
+
+ OMSerializerUtil.serializeEndpart(omOutput);
+ }
+
+ protected abstract void serializeFaultNode(
+ org.apache.axiom.om.impl.OMOutputImpl omOutput)
+ throws XMLStreamException;
+
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultNodeImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.llom.OMSerializerUtil;
+import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPFaultNode;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+
+public abstract class SOAPFaultNodeImpl extends SOAPElement implements SOAPFaultNode {
+
+ public SOAPFaultNodeImpl(SOAPFault parent, SOAPFactory factory)
+ throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, true, factory);
+ }
+
+ public SOAPFaultNodeImpl(SOAPFault parent, OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(parent, SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, builder,
+ factory);
+ }
+
+ public void setNodeValue(String uri) {
+ this.setText(uri);
+ }
+
+ public String getNodeValue() {
+ return this.getText();
+ }
+
+ protected void serialize(
+ org.apache.axiom.om.impl.OMOutputImpl omOutput, boolean cache)
+ throws XMLStreamException {
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(
+ omOutput));
+ }
+
+
+ if (!cache) {
+ //No caching
+ if (this.firstChild != null) {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ firstChild.serializeAndConsume(omOutput);
+ OMSerializerUtil.serializeEndpart(omOutput);
+ } else if (!this.done) {
+ if (builderType == PULL_TYPE_BUILDER) {
+ OMSerializerUtil.serializeByPullStream(this, omOutput);
+ } else {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ builder.setCache(cache);
+ builder.next();
+ OMSerializerUtil.serializeEndpart(omOutput);
+ }
+ } else {
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+ }
+ // do not serialise the siblings
+
+
+ } else {
+ //Cached
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+
+ // do not serialise the siblings
+ }
+
+
+ }
+
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultReasonImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.llom.OMSerializerUtil;
+import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axiom.om.util.ElementHelper;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPFaultReason;
+import org.apache.axiom.soap.SOAPFaultText;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+
+public abstract class SOAPFaultReasonImpl extends SOAPElement implements
+ SOAPFaultReason {
+ protected SOAPFaultText text;
+
+ /**
+ * Constructor OMElementImpl
+ *
+ * @param parent
+ * @param builder
+ */
+ public SOAPFaultReasonImpl(SOAPFault parent, OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(parent, SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, builder,
+ factory);
+ }
+
+ /**
+ * @param parent
+ */
+ public SOAPFaultReasonImpl(OMElement parent,
+ boolean extractNamespaceFromParent, SOAPFactory factory)
+ throws SOAPProcessingException {
+ super(parent,SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME,
+ extractNamespaceFromParent,factory);
+ }
+
+ /**
+ * Eran Chinthaka (chinthaka@apache.org)
+ */
+ public void setSOAPText(SOAPFaultText soapFaultText) throws SOAPProcessingException {
+ ElementHelper.setNewElement(this, text, soapFaultText);
+ }
+
+ public SOAPFaultText getSOAPText() {
+ return (SOAPFaultText) ElementHelper.getChildWithName(this,
+ SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME);
+ }
+
+ protected void serialize(org.apache.axiom.om.impl.OMOutputImpl omOutput, boolean cache) throws XMLStreamException {
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(new StreamWriterToContentHandlerConverter(omOutput));
+ }
+
+
+ if (!cache) {
+ //No caching
+ if (this.firstChild != null) {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ firstChild.serializeAndConsume(omOutput);
+ OMSerializerUtil.serializeEndpart(omOutput);
+ } else if (!this.done) {
+ if (builderType == PULL_TYPE_BUILDER) {
+ OMSerializerUtil.serializeByPullStream(this, omOutput);
+ } else {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ builder.setCache(cache);
+ builder.next();
+ OMSerializerUtil.serializeEndpart(omOutput);
+ }
+ } else {
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+ }
+ // do not serialise the siblings
+
+
+ } else {
+ //Cached
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+
+ // do not serialise the siblings
+ }
+
+
+ }
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultRoleImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.OMOutputImpl;
+import org.apache.axiom.om.impl.llom.OMSerializerUtil;
+import org.apache.axiom.om.impl.serialize.StreamWriterToContentHandlerConverter;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFault;
+import org.apache.axiom.soap.SOAPFaultRole;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+import javax.xml.stream.XMLStreamException;
+
+
+public abstract class SOAPFaultRoleImpl extends SOAPElement implements
+ SOAPFaultRole {
+
+ public SOAPFaultRoleImpl(SOAPFault parent,
+ String localName,
+ boolean extractNamespaceFromParent,
+ SOAPFactory factory) throws SOAPProcessingException {
+ super(parent, localName, extractNamespaceFromParent, factory);
+ }
+
+ public SOAPFaultRoleImpl(SOAPFault parent, OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(parent, SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, builder,
+ factory);
+ }
+
+ public void setRoleValue(String uri) {
+ if (firstChild != null) {
+ firstChild.detach();
+ }
+ this.setText(uri);
+ }
+
+ public String getRoleValue() {
+ return this.getText();
+ }
+
+ protected void serialize(OMOutputImpl omOutput, boolean cache)
+ throws XMLStreamException {
+ // select the builder
+ short builderType = PULL_TYPE_BUILDER; // default is pull type
+ if (builder != null) {
+ builderType = this.builder.getBuilderType();
+ }
+ if ((builderType == PUSH_TYPE_BUILDER)
+ && (builder.getRegisteredContentHandler() == null)) {
+ builder.registerExternalContentHandler(
+ new StreamWriterToContentHandlerConverter(omOutput));
+ }
+
+ if (!cache) {
+ //No caching
+ if (this.firstChild != null) {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ firstChild.serializeAndConsume(omOutput);
+ OMSerializerUtil.serializeEndpart(omOutput);
+ } else if (!this.done) {
+ if (builderType == PULL_TYPE_BUILDER) {
+ OMSerializerUtil.serializeByPullStream(this, omOutput);
+ } else {
+ OMSerializerUtil.serializeStartpart(this, omOutput);
+ builder.setCache(cache);
+ builder.next();
+ OMSerializerUtil.serializeEndpart(omOutput);
+ }
+ } else {
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+ }
+ // do not serialise the siblings
+
+
+ } else {
+ //Cached
+ OMSerializerUtil.serializeNormal(this, omOutput, cache);
+
+ // do not serialise the siblings
+ }
+ }
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultSubCodeImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.util.ElementHelper;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFaultSubCode;
+import org.apache.axiom.soap.SOAPFaultValue;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+public abstract class SOAPFaultSubCodeImpl extends SOAPElement implements SOAPFaultSubCode {
+
+ protected SOAPFaultValue value;
+ protected SOAPFaultSubCode subCode;
+
+
+ protected SOAPFaultSubCodeImpl(OMElement parent, String localName, SOAPFactory factory) throws SOAPProcessingException {
+ super(parent, localName, true, factory);
+ }
+
+ protected SOAPFaultSubCodeImpl(OMElement parent,
+ String localName,
+ OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(parent, localName, builder, factory);
+ }
+
+ public void setValue(SOAPFaultValue soapFaultSubCodeValue) throws SOAPProcessingException {
+ ElementHelper.setNewElement(this, value, soapFaultSubCodeValue);
+ }
+
+ public SOAPFaultValue getValue() {
+ if (value == null) {
+ value =
+ (SOAPFaultValue) ElementHelper.getChildWithName(this,
+ SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME);
+ }
+ return value;
+ }
+
+ public void setSubCode(SOAPFaultSubCode subCode) throws SOAPProcessingException {
+ ElementHelper.setNewElement(this, this.subCode, subCode);
+
+ }
+
+ public SOAPFaultSubCode getSubCode() {
+ if (subCode == null) {
+ subCode =
+ (SOAPFaultSubCode) ElementHelper.getChildWithName(this,
+ SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME);
+ }
+ return subCode;
+ }
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultTextImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultTextImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultTextImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultTextImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMAttribute;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.om.impl.dom.AttrImpl;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFaultReason;
+import org.apache.axiom.soap.SOAPFaultText;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+import javax.xml.namespace.QName;
+
+public abstract class SOAPFaultTextImpl extends SOAPElement implements SOAPFaultText {
+
+ protected OMAttribute langAttr;
+
+ protected OMNamespace langNamespace = null;
+
+ protected SOAPFaultTextImpl(SOAPFaultReason parent, SOAPFactory factory)
+ throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, true, factory);
+ this.langNamespace = factory.createOMNamespace(
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_URI,
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX);
+ }
+
+ protected SOAPFaultTextImpl(SOAPFaultReason parent,
+ OMXMLParserWrapper builder, SOAPFactory factory) {
+ super(parent, SOAP12Constants.SOAP_FAULT_TEXT_LOCAL_NAME, builder,
+ factory);
+ }
+
+
+ public void setLang(String lang) {
+ langAttr =
+ new AttrImpl(this.ownerNode,
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
+ langNamespace,
+ lang, this.factory);
+ this.addAttribute(langAttr);
+ }
+
+ public String getLang() {
+ if (langAttr == null) {
+ langAttr =
+ this.getAttribute(
+ new QName(langNamespace.getName(),
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_LOCAL_NAME,
+ SOAP12Constants.SOAP_FAULT_TEXT_LANG_ATTR_NS_PREFIX));
+ }
+
+ return langAttr == null ? null : langAttr.getAttributeValue();
+ }
+}
Added: webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultValueImpl.java
URL: http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultValueImpl.java?rev=389047&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultValueImpl.java (added)
+++ webservices/commons/trunk/modules/axiom/src/org/apache/axiom/soap/impl/dom/SOAPFaultValueImpl.java Mon Mar 27 00:02:06 2006
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004,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.axiom.soap.impl.dom;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMXMLParserWrapper;
+import org.apache.axiom.soap.SOAP12Constants;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPFaultValue;
+import org.apache.axiom.soap.SOAPProcessingException;
+
+public abstract class SOAPFaultValueImpl extends SOAPElement implements SOAPFaultValue {
+
+ protected SOAPFaultValueImpl(OMElement parent, SOAPFactory factory)
+ throws SOAPProcessingException {
+ super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, true,
+ factory);
+ }
+
+ protected SOAPFaultValueImpl(OMElement parent, OMXMLParserWrapper builder,
+ SOAPFactory factory) {
+ super(parent, SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME, builder,
+ factory);
+ }
+}