JBossWS SVN: r2619 - in trunk/build: eclipse and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-15 06:51:59 -0400 (Thu, 15 Mar 2007)
New Revision: 2619
Added:
trunk/build/eclipse/
trunk/build/eclipse/JBossWSCodeStyle.xml
trunk/build/eclipse/jbossws.userlibraries
Log:
Add user libraries
Copied: trunk/build/eclipse/JBossWSCodeStyle.xml (from rev 2616, trunk/build/JBossWSCodeStyle.xml)
===================================================================
--- trunk/build/eclipse/JBossWSCodeStyle.xml (rev 0)
+++ trunk/build/eclipse/JBossWSCodeStyle.xml 2007-03-15 10:51:59 UTC (rev 2619)
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<profiles version="8">
+<profile name="JBossWSCodeStyle" version="8">
+<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_comments" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/>
+<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/>
+<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="3"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
+<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="168"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
+<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/>
+<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="3"/>
+<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
+</profile>
+</profiles>
Added: trunk/build/eclipse/jbossws.userlibraries
===================================================================
--- trunk/build/eclipse/jbossws.userlibraries (rev 0)
+++ trunk/build/eclipse/jbossws.userlibraries 2007-03-15 10:51:59 UTC (rev 2619)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<eclipse-userlibraries version="2">
+<library name="jboss-4.0.x" systemlibrary="false">
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-jmx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/lib/jboss-system.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/lib/jboss.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_0/build/output/jboss-4.0.5.SP1-ejb3/server/default/deploy/ejb3.deployer/jboss-ejb3x.jar"/>
+</library>
+<library name="jboss-4.2.x" systemlibrary="false">
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/lib/jboss-jmx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/lib/jboss-system.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/server/default/lib/jboss.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/server/default/lib/jboss-ejb3x.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/server/default/deploy/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/server/default/deploy/ejb3.deployer/jboss-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.0.GA/server/default/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar"/>
+</library>
+<library name="jboss-5.0.x" systemlibrary="false">
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-aop-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-deployers.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-j2se.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-system.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-system-jmx.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/lib/jboss-vfs.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/lib/jboss.jar" source="/home/tdiesler/svn/jbossas/trunk/server/src/main"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/lib/jnpserver.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/deployers/jboss-aop-jboss5.deployer/jboss-aspect-library-jdk50.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-annotations-ejb3.jar"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-ejb3.jar" source="/home/tdiesler/svn/jbossas/branches/Branch_4_2/ejb3/src/main"/>
+<archive path="/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.Beta2/server/default/deployers/ejb3.deployer/jboss-ejb3x.jar"/>
+</library>
+</eclipse-userlibraries>
17 years, 9 months
JBossWS SVN: r2618 - in trunk/jbossws-core/src/java/org/jboss/ws/core: jaxrpc and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-03-15 06:13:42 -0400 (Thu, 15 Mar 2007)
New Revision: 2618
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonBinding.java
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAP11Binding.java
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAP12Binding.java
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/ServerHandlerChain.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/SOAP11BindingJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/HandlerDelegate.java
Log:
Fix mustUnderstand processing
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonBinding.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonBinding.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonBinding.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -28,6 +28,7 @@
import javax.xml.namespace.QName;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.server.HandlerDelegate;
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -53,4 +54,6 @@
/** bind an exception to a fault message */
Object bindFaultMessage(Exception ex);
+
+ void setHandlerDelegate(HandlerDelegate delegate);
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAP11Binding.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAP11Binding.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAP11Binding.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -23,13 +23,21 @@
// $Id$
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFactory;
+import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPMessage;
import org.jboss.ws.Constants;
import org.jboss.ws.core.jaxrpc.Use;
+import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.metadata.umdm.OperationMetaData;
/**
@@ -60,4 +68,25 @@
return soapMessage;
}
+
+ public abstract Set<String> getRoles();
+
+ @Override
+ protected void verifyUnderstoodHeader(SOAPHeaderElement element) throws Exception
+ {
+ QName name = new QName(element.getNamespaceURI(), element.getLocalName());
+ String actor = element.getActor();
+ Set<String> roles = getRoles();
+
+ boolean isActor = actor == null || actor.length() == 0 || Constants.URI_SOAP11_NEXT_ACTOR.equals(actor) || roles.contains(actor);
+ if (isActor && !handlerDelegate.getHeaders().contains(name))
+ {
+ QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
+ String faultString = "Unprocessed 'mustUnderstand' header element: " + element.getElementName();
+ SOAPFaultImpl fault = new SOAPFaultImpl();
+ fault.setFaultCode(faultCode);
+ fault.setFaultString(faultString);
+ throwFaultException(fault);
+ }
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAP12Binding.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAP12Binding.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAP12Binding.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -23,11 +23,19 @@
// $Id$
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPFault;
+import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPMessage;
import org.jboss.ws.Constants;
import org.jboss.ws.core.soap.MessageFactoryImpl;
+import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.metadata.umdm.OperationMetaData;
/**
@@ -50,4 +58,25 @@
factory.setEnvNamespace(Constants.NS_SOAP12_ENV);
return factory.createMessage();
}
+
+ protected abstract Set<String> getRoles();
+
+ @Override
+ protected void verifyUnderstoodHeader(SOAPHeaderElement element) throws Exception
+ {
+ QName name = new QName(element.getNamespaceURI(), element.getLocalName());
+ String actor = element.getActor();
+ Set<String> roles = getRoles();
+
+ boolean isActor = actor == null || actor.length() == 0 || Constants.URI_SOAP11_NEXT_ACTOR.equals(actor) || roles.contains(actor);
+ if (isActor && !handlerDelegate.getHeaders().contains(name))
+ {
+ // How do we pass NotUnderstood blocks? They are not in the fault element
+ QName faultCode = SOAPConstants.SOAP_MUSTUNDERSTAND_FAULT;
+ SOAPFaultImpl fault = new SOAPFaultImpl();
+ fault.setFaultCode(faultCode);
+ fault.setFaultString("SOAP header blocks not understood");
+ throwFaultException(fault);
+ }
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -23,14 +23,18 @@
// $Id$
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.activation.DataHandler;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
+import javax.xml.rpc.soap.SOAPFaultException;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.Name;
@@ -41,6 +45,7 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPMessage;
import org.apache.xerces.xs.XSElementDeclaration;
@@ -51,6 +56,7 @@
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.server.HandlerDelegate;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.NameImpl;
@@ -69,6 +75,7 @@
import org.jboss.ws.core.utils.JavaUtils;
import org.jboss.ws.core.utils.MimeUtils;
import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.ws.metadata.umdm.TypesMetaData;
@@ -88,6 +95,8 @@
private boolean mtomEnabled;
+ protected HandlerDelegate handlerDelegate;
+
/** A constant representing the identity of the SOAP 1.1 over HTTP binding. */
public static final String SOAP11HTTP_BINDING = "http://schemas.xmlsoap.org/wsdl/soap/http";
/** A constant representing the identity of the SOAP 1.2 over HTTP binding. */
@@ -800,6 +809,39 @@
abstract protected void throwFaultException(SOAPFaultImpl fault) throws Exception;
+ abstract protected void verifyUnderstoodHeader(SOAPHeaderElement element) throws Exception;
+
+ public void checkMustUnderstand(OperationMetaData opMetaData) throws Exception
+ {
+ CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
+ if (msgContext == null)
+ throw new WSException("MessageContext not available");
+
+ SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
+ SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+ if (soapEnvelope == null || soapEnvelope.getHeader() == null)
+ return;
+
+ Iterator it = soapEnvelope.getHeader().examineAllHeaderElements();
+ while (it.hasNext())
+ {
+ SOAPHeaderElement soapHeaderElement = (SOAPHeaderElement)it.next();
+ Name name = soapHeaderElement.getElementName();
+ QName xmlName = new QName(name.getURI(), name.getLocalName());
+
+ ParameterMetaData paramMetaData = (opMetaData != null ? opMetaData.getParameter(xmlName) : null);
+ boolean isBoundHeader = (paramMetaData != null && paramMetaData.isInHeader());
+
+ if (!isBoundHeader && soapHeaderElement.getMustUnderstand())
+ verifyUnderstoodHeader(soapHeaderElement);
+ }
+ }
+
+ public void setHandlerDelegate(HandlerDelegate delegate)
+ {
+ handlerDelegate = delegate;
+ }
+
private void handleException(Exception ex) throws BindingException
{
if (ex instanceof RuntimeException)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAP11BindingJAXRPC.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -23,9 +23,17 @@
//$Id:SOAP11BindingJAXRPC.java 1054 2006-09-26 10:33:43Z thomas.diesler(a)jboss.com $
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPMessage;
+import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonSOAP11Binding;
+import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -59,4 +67,13 @@
{
throw SOAPFaultHelperJAXRPC.getSOAPFaultException(fault);
}
-}
+
+ @Override
+ public Set<String> getRoles()
+ {
+ if (!(handlerDelegate instanceof HandlerDelegateJAXRPC))
+ throw new IllegalStateException("HandlerDelegateJAXRPC was not available");
+
+ return ((HandlerDelegateJAXRPC)handlerDelegate).getRoles();
+ }
+}
\ No newline at end of file
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/SOAP12BindingJAXRPC.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -23,9 +23,12 @@
//$Id:SOAP12BindingJAXRPC.java 1054 2006-09-26 10:33:43Z thomas.diesler(a)jboss.com $
+import java.util.Set;
+
import javax.xml.soap.SOAPMessage;
import org.jboss.ws.core.CommonSOAP12Binding;
+import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -55,6 +58,15 @@
return SOAPFaultHelperJAXRPC.exceptionToFaultMessage(ex);
}
+ @Override
+ public Set<String> getRoles()
+ {
+ if (!(handlerDelegate instanceof HandlerDelegateJAXRPC))
+ throw new IllegalStateException("HandlerDelegateJAXRPC was not available");
+
+ return ((HandlerDelegateJAXRPC)handlerDelegate).getRoles();
+ }
+
protected void throwFaultException(SOAPFaultImpl fault) throws Exception
{
throw SOAPFaultHelperJAXRPC.getSOAPFaultException(fault);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -26,6 +26,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -106,6 +107,16 @@
}
return list;
}
+
+ public void pullHeaders(Set<QName> headers)
+ {
+ for (HandlerEntry entry : handlers)
+ {
+ QName[] handlerHeaders = entry.handler.getHeaders();
+ if (handlerHeaders != null)
+ Collections.addAll(headers, handlerHeaders);
+ }
+ }
/**
* Initialize the a handler chain with the given handlers infos
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -24,6 +24,7 @@
// $Id$
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -60,6 +61,10 @@
private ServerHandlerChain jaxrpcHandlerChain;
// This endpoints handler chain
private ServerHandlerChain postHandlerChain;
+ // Set of understood headers
+ Set<QName> headers = new HashSet<QName>();
+ // Set of roles
+ Set<String> roles = new HashSet<String>();
public HandlerDelegateJAXRPC(ServerEndpointMetaData sepMetaData)
{
@@ -81,7 +86,6 @@
}
boolean status = true;
- String[] roles = null;
HandlerChain handlerChain = null;
if (type == HandlerType.PRE)
@@ -92,15 +96,8 @@
handlerChain = postHandlerChain;
if (handlerChain != null)
- {
- roles = handlerChain.getRoles();
status = handlerChain.handleRequest(msgContext);
- }
- // BP-1.0 R1027
- if (type == HandlerType.POST)
- HandlerChainBaseImpl.checkMustUnderstand(msgContext, roles);
-
return status;
}
@@ -200,8 +197,20 @@
// what is the config for a handler chain?
handlerChain.init(null);
}
+ handlerChain.pullHeaders(headers);
+ Collections.addAll(roles, handlerChain.getRoles());
}
+ public Set<String> getRoles()
+ {
+ return roles;
+ }
+
+ public Set<QName> getHeaders()
+ {
+ return headers;
+ }
+
public void update(Observable observable, Object object)
{
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/ServerHandlerChain.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/ServerHandlerChain.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/ServerHandlerChain.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -26,6 +26,7 @@
import java.util.List;
import java.util.Set;
+import javax.xml.namespace.QName;
import javax.xml.rpc.handler.MessageContext;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/HTTPBindingJAXWS.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -34,6 +34,7 @@
import org.jboss.ws.core.CommonBinding;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.jaxrpc.binding.BindingException;
+import org.jboss.ws.core.server.HandlerDelegate;
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
@@ -97,4 +98,9 @@
{
throw new NotImplementedException();
}
+
+ public void setHandlerDelegate(HandlerDelegate delegate)
+ {
+ // Not needed
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -39,6 +39,7 @@
import org.jboss.ws.core.jaxrpc.binding.BindingException;
import org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.server.HandlerDelegate;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.UnboundHeader;
import org.jboss.ws.metadata.umdm.OperationMetaData;
@@ -172,4 +173,9 @@
{
throw new NotImplementedException();
}
+
+ public void setHandlerDelegate(HandlerDelegate delegate)
+ {
+ // Not needed
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -41,6 +41,7 @@
import org.jboss.ws.core.jaxrpc.binding.BindingException;
import org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.server.HandlerDelegate;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.MessageFactoryImpl;
import org.jboss.ws.core.soap.SOAPBodyImpl;
@@ -187,4 +188,9 @@
{
throw new NotImplementedException();
}
+
+ public void setHandlerDelegate(HandlerDelegate delegate)
+ {
+ // Not neeeded
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/SOAP11BindingJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/SOAP11BindingJAXWS.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/SOAP11BindingJAXWS.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -27,6 +27,10 @@
import java.util.List;
import java.util.Set;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.soap.SOAPFaultException;
+import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeaderElement;
import javax.xml.soap.SOAPMessage;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.soap.SOAPBinding;
@@ -34,6 +38,7 @@
import org.jboss.util.NotImplementedException;
import org.jboss.ws.Constants;
import org.jboss.ws.core.CommonSOAP11Binding;
+import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
import org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS;
import org.jboss.ws.core.soap.SOAPFaultImpl;
import org.jboss.ws.metadata.umdm.OperationMetaData;
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -25,6 +25,7 @@
import java.util.List;
import java.util.Observable;
+import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.Handler;
@@ -121,6 +122,11 @@
return info;
}
+ public Set<QName> getHeaders()
+ {
+ return resolver.getHeaders();
+ }
+
private HandlerChainExecutor createExecutor(ServerEndpointMetaData sepMetaData, HandlerType type)
{
if (type == HandlerType.ALL)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -24,11 +24,11 @@
// $Id$
import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -40,6 +40,7 @@
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.handler.LogicalHandler;
import javax.xml.ws.handler.PortInfo;
+import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPBinding;
@@ -72,6 +73,9 @@
private Map<PortInfo, List<Handler>> preHandlers = new HashMap<PortInfo, List<Handler>>();
private Map<PortInfo, List<Handler>> jaxwsHandlers = new HashMap<PortInfo, List<Handler>>();
private Map<PortInfo, List<Handler>> postHandlers = new HashMap<PortInfo, List<Handler>>();
+
+ // understood headers
+ Set<QName> headers = new HashSet<QName>();
public List<Handler> getHandlerChain(PortInfo info)
{
@@ -157,7 +161,7 @@
if (handler instanceof GenericSOAPHandler)
((GenericSOAPHandler)handler).setHeaders(soapHeaders);
-
+
// Inject resources
injectResources(handler);
@@ -320,6 +324,14 @@
handlerMap.put(info, handlerList = new ArrayList<Handler>());
}
handlerList.add(handler);
+
+ // Ask all initialized handlers for what headers they understand
+ if (handler instanceof SOAPHandler)
+ {
+ Set handlerHeaders = ((SOAPHandler)handler).getHeaders();
+ if (handlerHeaders != null)
+ headers.addAll(handlerHeaders);
+ }
return true;
}
@@ -338,4 +350,9 @@
return handlerMap;
}
+
+ public Set<QName> getHeaders()
+ {
+ return headers;
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -144,9 +144,10 @@
try
{
boolean oneway = false;
- CommonBinding binding = null;
EndpointInvocation epInv = null;
OperationMetaData opMetaData = null;
+ CommonBinding binding = bindingProvider.getCommonBinding();
+ binding.setHandlerDelegate(delegate);
// call the handler chain
boolean handlersPass = callRequestHandlerChain(sepMetaData, HandlerType.PRE);
@@ -154,14 +155,25 @@
// Unbind the request message
if (handlersPass)
{
- // Get the binding from the provideer
- binding = bindingProvider.getCommonBinding();
-
// Get the operation meta data from the SOAP message
opMetaData = getDispatchDestination(sepMetaData, reqMessage);
msgContext.setOperationMetaData(opMetaData);
oneway = opMetaData.isOneWay();
+ /*
+ * From JAX-WS 10.2.1 - "7. If the node does not understand how to process
+ * the message, then neither handlers nor the endpoint
+ * are invoked and instead the binding generates a SOAP must
+ * understand exception"
+ *
+ * Therefore, this must precede the ENDPOINT chain; however, The PRE
+ * chain still must happen first since the message may be encrypted, in which
+ * case the operation is still not known. Without knowing the operation, it
+ * is not possible to determine what headers are understood by the endpoint.
+ */
+ if (binding instanceof CommonSOAPBinding)
+ ((CommonSOAPBinding)binding).checkMustUnderstand(opMetaData);
+
// Unbind the request message
epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/HandlerDelegate.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/HandlerDelegate.java 2007-03-15 00:28:50 UTC (rev 2617)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/HandlerDelegate.java 2007-03-15 10:13:42 UTC (rev 2618)
@@ -23,6 +23,10 @@
// $Id$
+import java.util.Set;
+
+import javax.xml.namespace.QName;
+
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
@@ -57,4 +61,6 @@
{
sepMetaData.setHandlersInitialized(flag);
}
+
+ public abstract Set<QName> getHeaders();
}
17 years, 9 months
JBossWS SVN: r2617 - in trunk: integration-jboss50/src/java/org/jboss/ws/integration/jboss50 and 10 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-14 20:28:50 -0400 (Wed, 14 Mar 2007)
New Revision: 2617
Added:
trunk/jbossws-core/src/java/org/jboss/ws/core/DirectionHolder.java
Modified:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerMDB.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java
trunk/jbossws-core/src/java/org/jboss/ws/core/CommonMessageContext.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/BindingImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/HandlerDelegate.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/ConfigurationProvider.java
trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java
Log:
Fix jaxws handler issues and message context handling
Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -76,9 +76,9 @@
/** Initialize the service endpoint */
@Override
- public void initServiceEndpoint(ServiceEndpointInfo seInfo)
+ public void init(ServiceEndpointInfo seInfo)
{
- super.initServiceEndpoint(seInfo);
+ super.init(seInfo);
ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
String ejbName = epMetaData.getLinkName();
@@ -139,7 +139,7 @@
/** Load the SEI implementation bean if necessary
*/
- public Class loadServiceEndpoint(ServiceEndpointInfo seInfo)
+ public Class loadServiceEndpoint()
{
if (server.isRegistered(objectName) == false)
throw new WSException("Cannot find service endpoint target: " + objectName);
@@ -148,13 +148,13 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public Object createServiceEndpointInstance(ServiceEndpointInfo seInfo, Object endpointContext, Class seiImplClass)
+ public Object createServiceEndpointInstance(Object endpointContext, Class seiImplClass)
{
return null;
}
/** Invoke an instance of the SEI implementation bean */
- public void invokeServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl, EndpointInvocation epInv) throws Exception
+ public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
{
log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
@@ -181,7 +181,8 @@
inv.setType(InvocationType.SERVICE_ENDPOINT);
// Set the handler callback and endpoint invocation
- inv.setValue(HandlerCallback.class.getName(), new HandlerCallback(seInfo), PayloadKey.TRANSIENT);
+ ServerEndpointMetaData sepMetaData = seInfo.getServerEndpointMetaData();
+ inv.setValue(HandlerCallback.class.getName(), new HandlerCallback(sepMetaData), PayloadKey.TRANSIENT);
inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
String[] sig = { Invocation.class.getName() };
@@ -195,40 +196,35 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public void destroyServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl)
+ public void destroyServiceEndpointInstance(Object seiImpl)
{
// do nothing
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
- public boolean callRequestHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ @Override
+ public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
if (type == HandlerType.PRE)
- return handlerDelegate.callRequestHandlerChain(seInfo, type);
+ return delegate.callRequestHandlerChain(sepMetaData, type);
else
return true;
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
- public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
if (type == HandlerType.PRE)
- return handlerDelegate.callResponseHandlerChain(seInfo, type);
+ return delegate.callResponseHandlerChain(sepMetaData, type);
else
return true;
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
- public void closeHandlerChain(ServiceEndpointInfo seInfo)
+ public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
{
- handlerDelegate.closeHandlerChain(seInfo);
- }
-
- /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
- public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
- {
if (type == HandlerType.PRE)
- return handlerDelegate.callFaultHandlerChain(seInfo, type, ex);
+ return delegate.callFaultHandlerChain(sepMetaData, type, ex);
else
return true;
}
@@ -236,11 +232,11 @@
// The ServiceEndpointInterceptor calls the methods in this callback
public class HandlerCallback
{
- private ServiceEndpointInfo seInfo;
+ private ServerEndpointMetaData sepMetaData;
- public HandlerCallback(ServiceEndpointInfo seInfo)
+ public HandlerCallback(ServerEndpointMetaData sepMetaData)
{
- this.seInfo = seInfo;
+ this.sepMetaData = sepMetaData;
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
@@ -249,7 +245,7 @@
if (type == HandlerType.PRE)
return true;
else
- return handlerDelegate.callRequestHandlerChain(seInfo, type);
+ return delegate.callRequestHandlerChain(sepMetaData, type);
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
@@ -258,23 +254,16 @@
if (type == HandlerType.PRE)
return true;
else
- return handlerDelegate.callResponseHandlerChain(seInfo, type);
+ return delegate.callResponseHandlerChain(sepMetaData, type);
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
- public void closeHandlerChain(HandlerType type)
- {
- if (type != HandlerType.PRE)
- handlerDelegate.closeHandlerChain(seInfo);
- }
-
- /** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
public boolean callFaultHandlerChain(HandlerType type, Exception ex)
{
if (type == HandlerType.PRE)
return true;
else
- return handlerDelegate.callFaultHandlerChain(seInfo, type, ex);
+ return delegate.callFaultHandlerChain(sepMetaData, type, ex);
}
}
}
Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB3.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -61,9 +61,9 @@
/** Initialize the service endpoint */
@Override
- public void initServiceEndpoint(ServiceEndpointInfo seInfo)
+ public void init(ServiceEndpointInfo seInfo)
{
- super.initServiceEndpoint(seInfo);
+ super.init(seInfo);
String ejbName = seInfo.getServerEndpointMetaData().getLinkName();
UnifiedDeploymentInfo udi = seInfo.getUnifiedDeploymentInfo();
@@ -78,7 +78,7 @@
/** Load the SEI implementation bean if necessary
*/
- public Class loadServiceEndpoint(ServiceEndpointInfo seInfo)
+ public Class loadServiceEndpoint()
{
if (server.isRegistered(objectName) == false)
throw new WSException("Cannot find service endpoint target: " + objectName);
@@ -87,13 +87,13 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public Object createServiceEndpointInstance(ServiceEndpointInfo seInfo, Object endpointContext, Class seiImplClass)
+ public Object createServiceEndpointInstance(Object endpointContext, Class seiImplClass)
{
return null;
}
/** Invoke an instance of the SEI implementation bean */
- public void invokeServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl, EndpointInvocation epInv) throws Exception
+ public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
{
log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
try
@@ -122,7 +122,7 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public void destroyServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl)
+ public void destroyServiceEndpointInstance(Object seiImpl)
{
// do nothing
}
Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerMDB.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerMDB.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerMDB.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -28,7 +28,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.EndpointInvocation;
import org.jboss.ws.core.server.AbstractServiceEndpointInvoker;
-import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.utils.ThreadLocalAssociation;
@@ -45,7 +44,7 @@
/** Load the SEI implementation bean if necessary
*/
- public Class loadServiceEndpoint(ServiceEndpointInfo seInfo) throws ClassNotFoundException
+ public Class loadServiceEndpoint() throws ClassNotFoundException
{
return null;
}
@@ -58,13 +57,13 @@
/** Create an instance of the SEI implementation bean if necessary
*/
- public Object createServiceEndpointInstance(ServiceEndpointInfo seInfo, Object endpointContext, Class seiImplClass) throws InstantiationException, IllegalAccessException
+ public Object createServiceEndpointInstance(Object endpointContext, Class seiImplClass) throws InstantiationException, IllegalAccessException
{
return ThreadLocalAssociation.localInvokerMDBAssoc().get();
}
/** Invoke an instance of the SEI implementation bean */
- public void invokeServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl, EndpointInvocation epInv) throws Exception
+ public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
{
log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
try
@@ -89,7 +88,7 @@
}
/** Destroy an instance of the SEI implementation bean if necessary */
- public void destroyServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl)
+ public void destroyServiceEndpointInstance(Object seiImpl)
{
}
}
Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB21.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -76,9 +76,9 @@
/** Initialize the service endpoint */
@Override
- public void initServiceEndpoint(ServiceEndpointInfo seInfo)
+ public void init(ServiceEndpointInfo seInfo)
{
- super.initServiceEndpoint(seInfo);
+ super.init(seInfo);
ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
String ejbName = epMetaData.getLinkName();
@@ -139,7 +139,7 @@
/** Load the SEI implementation bean if necessary
*/
- public Class loadServiceEndpoint(ServiceEndpointInfo seInfo)
+ public Class loadServiceEndpoint()
{
if (server.isRegistered(objectName) == false)
throw new WSException("Cannot find service endpoint target: " + objectName);
@@ -148,13 +148,13 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public Object createServiceEndpointInstance(ServiceEndpointInfo seInfo, Object endpointContext, Class seiImplClass)
+ public Object createServiceEndpointInstance(Object endpointContext, Class seiImplClass)
{
return null;
}
/** Invoke an instance of the SEI implementation bean */
- public void invokeServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl, EndpointInvocation epInv) throws Exception
+ public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception
{
log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
@@ -181,7 +181,8 @@
inv.setType(InvocationType.SERVICE_ENDPOINT);
// Set the handler callback and endpoint invocation
- inv.setValue(HandlerCallback.class.getName(), new HandlerCallback(seInfo), PayloadKey.TRANSIENT);
+ ServerEndpointMetaData sepMetaData = seInfo.getServerEndpointMetaData();
+ inv.setValue(HandlerCallback.class.getName(), new HandlerCallback(sepMetaData), PayloadKey.TRANSIENT);
inv.setValue(EndpointInvocation.class.getName(), epInv, PayloadKey.TRANSIENT);
String[] sig = { Invocation.class.getName() };
@@ -195,34 +196,35 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public void destroyServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl)
+ public void destroyServiceEndpointInstance(Object seiImpl)
{
// do nothing
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
- public boolean callRequestHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ @Override
+ public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
if (type == HandlerType.PRE)
- return handlerDelegate.callRequestHandlerChain(seInfo, type);
+ return delegate.callRequestHandlerChain(sepMetaData, type);
else
return true;
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
- public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
if (type == HandlerType.PRE)
- return handlerDelegate.callResponseHandlerChain(seInfo, type);
+ return delegate.callResponseHandlerChain(sepMetaData, type);
else
return true;
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
- public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
+ public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
{
if (type == HandlerType.PRE)
- return handlerDelegate.callFaultHandlerChain(seInfo, type, ex);
+ return delegate.callFaultHandlerChain(sepMetaData, type, ex);
else
return true;
}
@@ -230,11 +232,11 @@
// The ServiceEndpointInterceptor calls the methods in this callback
public class HandlerCallback
{
- private ServiceEndpointInfo seInfo;
+ private ServerEndpointMetaData sepMetaData;
- public HandlerCallback(ServiceEndpointInfo seInfo)
+ public HandlerCallback(ServerEndpointMetaData sepMetaData)
{
- this.seInfo = seInfo;
+ this.sepMetaData = sepMetaData;
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
@@ -243,7 +245,7 @@
if (type == HandlerType.PRE)
return true;
else
- return handlerDelegate.callRequestHandlerChain(seInfo, type);
+ return delegate.callRequestHandlerChain(sepMetaData, type);
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
@@ -252,7 +254,7 @@
if (type == HandlerType.PRE)
return true;
else
- return handlerDelegate.callResponseHandlerChain(seInfo, type);
+ return delegate.callResponseHandlerChain(sepMetaData, type);
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
@@ -261,8 +263,7 @@
if (type == HandlerType.PRE)
return true;
else
- return handlerDelegate.callFaultHandlerChain(seInfo, type, ex);
+ return delegate.callFaultHandlerChain(sepMetaData, type, ex);
}
-
}
}
Modified: trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java
===================================================================
--- trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/ServiceEndpointInvokerEJB3.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -70,9 +70,9 @@
/** Initialize the service endpoint */
@Override
- public void initServiceEndpoint(ServiceEndpointInfo seInfo)
+ public void init(ServiceEndpointInfo seInfo)
{
- super.initServiceEndpoint(seInfo);
+ super.init(seInfo);
String ejbName = seInfo.getServerEndpointMetaData().getLinkName();
UnifiedDeploymentInfo udi = seInfo.getUnifiedDeploymentInfo();
@@ -87,7 +87,7 @@
/** Load the SEI implementation bean if necessary
*/
- public Class loadServiceEndpoint(ServiceEndpointInfo seInfo)
+ public Class loadServiceEndpoint()
{
Dispatcher dispatcher = Dispatcher.singleton;
if (dispatcher.getRegistered(objectName.getCanonicalName()) == null)
@@ -97,13 +97,13 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public Object createServiceEndpointInstance(ServiceEndpointInfo seInfo, Object endpointContext, Class seiImplClass)
+ public Object createServiceEndpointInstance(Object endpointContext, Class seiImplClass)
{
return null;
}
/** Invoke an instance of the SEI implementation bean */
- public void invokeServiceEndpointInstance(ServiceEndpointInfo seInfo, Object beanInstance, EndpointInvocation epInv) throws SOAPFaultException, Exception
+ public void invokeServiceEndpointInstance(Object beanInstance, EndpointInvocation epInv) throws SOAPFaultException, Exception
{
log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
@@ -137,7 +137,7 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public void destroyServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl)
+ public void destroyServiceEndpointInstance(Object seiImpl)
{
// do nothing
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonClient.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -44,6 +44,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
import org.jboss.ws.WSException;
+import org.jboss.ws.core.DirectionHolder.Direction;
import org.jboss.ws.core.jaxrpc.ParameterWrapping;
import org.jboss.ws.core.jaxrpc.Style;
import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
@@ -212,6 +213,8 @@
protected abstract boolean callResponseHandlerChain(QName portName, HandlerType type);
+ protected abstract boolean callFaultHandlerChain(QName portName, HandlerType type, Exception ex);
+
protected abstract void closeHandlerChain(QName portName, HandlerType type);
protected abstract void setInboundContextProperties();
@@ -247,6 +250,10 @@
msgContext.setProperty(key, value);
}
+ // The direction of the message
+ DirectionHolder direction = new DirectionHolder(Direction.OutBound);
+
+ QName portName = epMetaData.getPortName();
try
{
// Get the binding from the provider
@@ -265,7 +272,6 @@
setOutboundContextProperties();
// Call the request handlers
- QName portName = epMetaData.getPortName();
boolean handlerPass = callRequestHandlerChain(portName, HandlerType.PRE);
handlerPass = handlerPass && callRequestHandlerChain(portName, HandlerType.ENDPOINT);
handlerPass = handlerPass && callRequestHandlerChain(portName, HandlerType.POST);
@@ -312,7 +318,7 @@
}
// at pivot the message context might be replaced
- msgContext = processPivot(msgContext);
+ msgContext = processPivotInternal(msgContext, direction);
// Associate response message with message context
msgContext.setSOAPMessage(resMessage);
@@ -337,7 +343,6 @@
handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.ENDPOINT);
handlerPass = handlerPass && callResponseHandlerChain(portName, HandlerType.PRE);
- closeHandlerChain(portName, HandlerType.ALL);
// BP-1.0 R1027
if (handlerPass)
@@ -356,12 +361,36 @@
return retObj;
}
+ catch (Exception ex)
+ {
+ // Reverse the message direction
+ processPivotInternal(msgContext, direction);
+
+ callFaultHandlerChain(portName, HandlerType.POST, ex);
+ callFaultHandlerChain(portName, HandlerType.ENDPOINT, ex);
+ callFaultHandlerChain(portName, HandlerType.PRE, ex);
+ throw ex;
+ }
finally
{
resContext.putAll(msgContext.getProperties());
+
+ closeHandlerChain(portName, HandlerType.POST);
+ closeHandlerChain(portName, HandlerType.ENDPOINT);
+ closeHandlerChain(portName, HandlerType.PRE);
}
}
+ private CommonMessageContext processPivotInternal(CommonMessageContext msgContext, DirectionHolder direction)
+ {
+ if (direction.getDirection() == Direction.OutBound)
+ {
+ msgContext = processPivot(msgContext);
+ direction.setDirection(Direction.InBound);
+ }
+ return msgContext;
+ }
+
protected void addAttachmentParts(SOAPMessage reqMessage)
{
for (AttachmentPart part : attachmentParts)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/CommonMessageContext.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/CommonMessageContext.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/CommonMessageContext.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -47,6 +47,8 @@
// This property should be set the message context when it is ok to do so.
public static String ALLOW_EXPAND_TO_DOM = "org.jboss.ws.allow.expand.dom";
+ // The serialization context for this message ctx
+ private SerializationContext serContext;
// The operation for this message ctx
private EndpointMetaData epMetaData;
// The operation for this message ctx
@@ -66,6 +68,7 @@
this.epMetaData = msgContext.epMetaData;
this.opMetaData = msgContext.opMetaData;
this.soapMessage = msgContext.soapMessage;
+ this.serContext = msgContext.serContext;
this.props = msgContext.props;
}
@@ -102,8 +105,22 @@
this.soapMessage = soapMessage;
}
- public abstract SerializationContext getSerializationContext();
+ public SerializationContext getSerializationContext()
+ {
+ if (serContext == null)
+ {
+ serContext = createSerializationContext();
+ }
+ return serContext;
+ }
+ public abstract SerializationContext createSerializationContext();
+
+ public void setSerializationContext(SerializationContext serContext)
+ {
+ this.serContext = serContext;
+ }
+
/** Gets the namespace registry for this message context */
public NamespaceRegistry getNamespaceRegistry()
{
Added: trunk/jbossws-core/src/java/org/jboss/ws/core/DirectionHolder.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/DirectionHolder.java (rev 0)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/DirectionHolder.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.core;
+
+// $Id:CommonClient.java 660 2006-08-01 16:29:43Z thomas.diesler(a)jboss.com $
+
+
+/**
+ * A holder for the message direction
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Mar-2007
+ */
+public class DirectionHolder
+{
+ public enum Direction
+ {
+ InBound, OutBound
+ }
+
+ private Direction direction;
+
+ public DirectionHolder(Direction direction)
+ {
+ this.direction = direction;
+ }
+
+ public Direction getDirection()
+ {
+ return direction;
+ }
+
+ public void setDirection(Direction direction)
+ {
+ this.direction = direction;
+ }
+}
Property changes on: trunk/jbossws-core/src/java/org/jboss/ws/core/DirectionHolder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -55,6 +55,7 @@
import org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializerFactory;
import org.jboss.ws.core.jaxrpc.binding.JBossXBSerializerFactory;
import org.jboss.ws.core.jaxrpc.handler.HandlerChainBaseImpl;
+import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.jaxrpc.handler.SOAPMessageContextJAXRPC;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.utils.JavaUtils;
@@ -280,9 +281,9 @@
return invokeInternal(operationName, inputParams, false);
}
- protected CommonMessageContext processPivot(CommonMessageContext requestContext) {
- if(log.isDebugEnabled()) log.debug("Begin response processing");
- return requestContext;
+ protected CommonMessageContext processPivot(CommonMessageContext requestContext)
+ {
+ return MessageContextJAXRPC.processPivot(requestContext);
}
/** Returns a List values for the output parameters of the last invoked operation.
@@ -452,7 +453,8 @@
if (name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
throw new JAXRPCException("Unsupported property: " + name);
- if(log.isDebugEnabled()) log.debug("setProperty: [name=" + name + ",value=" + value + "]");
+ if (log.isDebugEnabled())
+ log.debug("setProperty: [name=" + name + ",value=" + value + "]");
properties.put(name, value);
}
@@ -493,7 +495,7 @@
// Check or generate the the schema if this call is unconfigured
generateOrUpdateSchemas(opMetaData);
-
+
// Associate a message context with the current thread
SOAPMessageContextJAXRPC msgContext = new SOAPMessageContextJAXRPC();
MessageContextAssociation.pushMessageContext(msgContext);
@@ -537,7 +539,7 @@
if (type == HandlerType.ENDPOINT)
XOPContext.visitAndRestoreXOPData();
-
+
return status;
}
@@ -556,6 +558,20 @@
}
@Override
+ protected boolean callFaultHandlerChain(QName portName, HandlerType type, Exception ex)
+ {
+ SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
+ HandlerChainBaseImpl handlerChain = (HandlerChainBaseImpl)jaxrpcService.getHandlerChain(portName);
+
+ boolean status = true;
+ if (handlerChain != null)
+ {
+ status = handlerChain.handleFault(msgContext, type);
+ }
+ return status;
+ }
+
+ @Override
protected void closeHandlerChain(QName portName, HandlerType type)
{
// nothing to do for JAXRPC
@@ -630,7 +646,7 @@
{
EndpointMetaData epMetaData = getEndpointMetaData();
epMetaData.setConfigName(configName, configFile);
-
+
// Reinitialize the client handler chain
jaxrpcService.setupHandlerChain(epMetaData);
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -394,6 +394,16 @@
*/
public boolean handleFault(MessageContext msgContext)
{
+ return handleFaultInternal(msgContext, HandlerType.ALL);
+ }
+
+ public boolean handleFault(MessageContext msgContext, HandlerType type)
+ {
+ return handleFaultInternal(msgContext, type);
+ }
+
+ private boolean handleFaultInternal(MessageContext msgContext, HandlerType type)
+ {
boolean doNext = true;
if (handlers.size() > 0)
@@ -412,9 +422,14 @@
Handler currHandler = null;
for (; doNext && handlerIndex >= 0; handlerIndex--)
{
- currHandler = ((HandlerEntry)handlers.get(handlerIndex)).getHandler();
- log.debug("Handle fault: " + currHandler);
- doNext = currHandler.handleFault(msgContext);
+ HandlerEntry handlerEntry = (HandlerEntry)handlers.get(handlerIndex);
+ if (type == HandlerType.ALL || type == handlerEntry.getType())
+ {
+ currHandler = handlerEntry.getHandler();
+
+ log.debug("Handle fault: " + currHandler);
+ doNext = currHandler.handleFault(msgContext);
+ }
}
}
finally
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -27,6 +27,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
+import java.util.Observable;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -35,7 +36,6 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.server.HandlerDelegate;
-import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedInitParamMetaData;
@@ -49,7 +49,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 19-Jan-2005
*/
-public class HandlerDelegateJAXRPC implements HandlerDelegate
+public class HandlerDelegateJAXRPC extends HandlerDelegate
{
// provide logging
private static Logger log = Logger.getLogger(HandlerDelegateJAXRPC.class);
@@ -61,27 +61,23 @@
// This endpoints handler chain
private ServerHandlerChain postHandlerChain;
- public HandlerDelegateJAXRPC()
+ public HandlerDelegateJAXRPC(ServerEndpointMetaData sepMetaData)
{
+ super(sepMetaData);
+ sepMetaData.registerConfigObserver(this);
}
- public void closeHandlerChain(ServiceEndpointInfo seInfo)
+ public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
- // nothing to do for JAXRPC
- }
-
- public boolean callRequestHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
- {
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
- ServerEndpointMetaData sepMetaData = seInfo.getServerEndpointMetaData();
// Initialize the handler chain
- if (sepMetaData.isHandlersInitialized() == false)
+ if (isInitialized() == false)
{
- initHandlerChain(seInfo, HandlerType.PRE);
- initHandlerChain(seInfo, HandlerType.ENDPOINT);
- initHandlerChain(seInfo, HandlerType.POST);
- sepMetaData.setHandlersInitialized(true);
+ initHandlerChain(sepMetaData, HandlerType.PRE);
+ initHandlerChain(sepMetaData, HandlerType.ENDPOINT);
+ initHandlerChain(sepMetaData, HandlerType.POST);
+ setInitialized(true);
}
boolean status = true;
@@ -108,7 +104,7 @@
return status;
}
- public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
@@ -128,7 +124,7 @@
return status;
}
- public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
+ public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
{
SOAPMessageContextJAXRPC msgContext = (SOAPMessageContextJAXRPC)MessageContextAssociation.peekMessageContext();
@@ -148,15 +144,19 @@
return status;
}
+ public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
+ {
+ // nothing to do for JAXRPC
+ }
+
/**
* Init the handler chain
*/
- private void initHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ private void initHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
Set<String> handlerRoles = new HashSet<String>();
List<HandlerInfo> hInfos = new ArrayList<HandlerInfo>();
- ServerEndpointMetaData sepMetaData = seInfo.getServerEndpointMetaData();
for (HandlerMetaData handlerMetaData : sepMetaData.getHandlerMetaData(type))
{
HandlerMetaDataJAXRPC jaxrpcMetaData = (HandlerMetaDataJAXRPC)handlerMetaData;
@@ -180,10 +180,10 @@
hInfos.add(info);
}
- initHandlerChain(seInfo, hInfos, handlerRoles, type);
+ initHandlerChain(sepMetaData, hInfos, handlerRoles, type);
}
- private void initHandlerChain(ServiceEndpointInfo seInfo, List<HandlerInfo> hInfos, Set<String> handlerRoles, HandlerType type)
+ private void initHandlerChain(ServerEndpointMetaData sepMetaData, List<HandlerInfo> hInfos, Set<String> handlerRoles, HandlerType type)
{
if(log.isDebugEnabled()) log.debug("Init handler chain with [" + hInfos.size() + "] handlers");
@@ -201,4 +201,8 @@
handlerChain.init(null);
}
}
+
+ public void update(Observable observable, Object object)
+ {
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxrpc/handler/MessageContextJAXRPC.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -26,6 +26,7 @@
import javax.xml.rpc.handler.MessageContext;
import javax.xml.soap.SOAPMessage;
+import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.SerializationContextJAXRPC;
import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
@@ -46,14 +47,13 @@
*/
public class MessageContextJAXRPC extends CommonMessageContext implements MessageContext
{
+ private static Logger log = Logger.getLogger(MessageContextJAXRPC.class);
+
public static final String SERVLET_CONTEXT = "javax.xml.ws.servlet.context";
public static final String SERVLET_REQUEST = "javax.xml.ws.servlet.request";
public static final String SERVLET_RESPONSE = "javax.xml.ws.servlet.response";
public static final String SERVLET_SESSION = "javax.xml.ws.servlet.session";
- // The serialization context for this message ctx
- private SerializationContext serContext;
-
public MessageContextJAXRPC()
{
}
@@ -72,22 +72,18 @@
{
setSOAPMessage(message);
}
-
- /** Get or create the serialization context
+
+ /** Create the serialization context
*/
- public SerializationContext getSerializationContext()
+ public SerializationContext createSerializationContext()
{
- if (serContext == null)
- {
- EndpointMetaData epMetaData = getEndpointMetaData();
- ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
- SerializationContextJAXRPC jaxrpcContext = new SerializationContextJAXRPC();
- jaxrpcContext.setTypeMapping(serviceMetaData.getTypeMapping());
- jaxrpcContext.setJavaWsdlMapping(serviceMetaData.getJavaWsdlMapping());
- serContext = jaxrpcContext;
- }
- return serContext;
+ SerializationContextJAXRPC jaxrpcContext = new SerializationContextJAXRPC();
+ jaxrpcContext.setTypeMapping(serviceMetaData.getTypeMapping());
+ jaxrpcContext.setJavaWsdlMapping(serviceMetaData.getJavaWsdlMapping());
+ return jaxrpcContext;
}
/** Gets the namespace registry for this message context */
@@ -95,4 +91,11 @@
{
return getSerializationContext().getNamespaceRegistry();
}
+
+ public static CommonMessageContext processPivot(CommonMessageContext requestContext)
+ {
+ log.debug("Begin response processing");
+ return requestContext;
+ }
+
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/BindingImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/BindingImpl.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/binding/BindingImpl.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -90,9 +90,9 @@
public List<Handler> getHandlerChain()
{
log.warn("[JBCTS-544] - Binding.getHandlerChain() expected to return a modifyable list");
- // return Collections.unmodifiableList(handlerChain);
+ // return Collections.unmodifiableList(jaxwsHandlerChain);
- return jaxwsHandlerChain;
+ return new ArrayList<Handler>(jaxwsHandlerChain);
}
public void setHandlerChain(List<Handler> handlerChain)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -24,6 +24,7 @@
// $Id$
import java.rmi.RemoteException;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Observable;
@@ -75,6 +76,7 @@
private final EndpointMetaData epMetaData;
private final HandlerResolver handlerResolver;
+ private Map<HandlerType, HandlerChainExecutor> executorMap = new HashMap<HandlerType, HandlerChainExecutor>();
public ClientImpl(EndpointMetaData epMetaData, HandlerResolver handlerResolver)
{
@@ -122,8 +124,6 @@
/**
* Callback when the config-name or config-file changes.
- * @param observable
- * @param object
*/
public void update(Observable observable, Object object)
{
@@ -137,7 +137,9 @@
protected boolean callRequestHandlerChain(QName portName, HandlerType type)
{
BindingExt binding = (BindingExt)getBindingProvider().getBinding();
- HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, binding.getHandlerChain(type));
+ HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, binding.getHandlerChain(type));
+ executorMap.put(type, executor);
+
MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
return executor.handleRequest(msgContext);
}
@@ -145,18 +147,25 @@
@Override
protected boolean callResponseHandlerChain(QName portName, HandlerType type)
{
- BindingExt binding = (BindingExt)getBindingProvider().getBinding();
- HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, binding.getHandlerChain(type));
MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
- return executor.handleResponse(msgContext);
+ HandlerChainExecutor executor = executorMap.get(type);
+ return (executor != null ? executor.handleResponse(msgContext) : true);
}
@Override
+ protected boolean callFaultHandlerChain(QName portName, HandlerType type, Exception ex)
+ {
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ HandlerChainExecutor executor = executorMap.get(type);
+ return (executor != null ? executor.handleFault(msgContext, ex) : true);
+ }
+
+ @Override
protected void closeHandlerChain(QName portName, HandlerType type)
{
- BindingExt binding = (BindingExt)getBindingProvider().getBinding();
- HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, binding.getHandlerChain(type));
- executor.close();
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ HandlerChainExecutor executor = executorMap.get(type);
+ if (executor != null) executor.close(msgContext);
}
@Override
@@ -215,23 +224,7 @@
protected CommonMessageContext processPivot(CommonMessageContext requestContext)
{
- if(log.isDebugEnabled()) log.debug("Begin response processing");
-
- // MTOM setting need to pass past pivot
- boolean mtomEnabled = XOPContext.isMTOMEnabled();
-
- // remove existing context
- MessageContextAssociation.popMessageContext();
-
- SOAPMessageContextJAXWS responseContext = new SOAPMessageContextJAXWS(requestContext);
- responseContext.setSOAPMessage(null);
- responseContext.clear(); // clear message context properties
- responseContext.setProperty(StubExt.PROPERTY_MTOM_ENABLED, mtomEnabled);
-
- // associate new context
- MessageContextAssociation.pushMessageContext(responseContext);
-
- return responseContext;
+ return MessageContextJAXWS.processPivot(requestContext);
}
/**
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -27,6 +27,7 @@
import java.util.List;
import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.handler.Handler;
@@ -36,6 +37,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.jaxrpc.Style;
+import org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS;
import org.jboss.ws.core.soap.SOAPEnvelopeImpl;
import org.jboss.ws.core.utils.DOMWriter;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -52,21 +54,33 @@
// The endpoint meta data
private EndpointMetaData epMetaData;
- // The List<Entry> objects
+ // The list of handlers
protected List<Handler> handlers = new ArrayList<Handler>();
+ // The list of handlers tp close
+ protected List<Handler> closeHandlers = new ArrayList<Handler>();
// The index of the first handler that returned false during processing
protected int falseIndex = -1;
- /**
- * Constructs a handler chain with the given handlers
- */
- public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler> handlerList)
+ public HandlerChainExecutor(EndpointMetaData epMetaData, List<Handler> unsortedChain)
{
this.epMetaData = epMetaData;
- log.debug("Create a handler executor: " + handlerList);
- for (Handler handler : handlerList)
+ // Sort handler logical handlers first
+ List<Handler> sortedChain = new ArrayList<Handler>();
+ for (Handler handler : unsortedChain)
{
+ if (handler instanceof LogicalHandler)
+ sortedChain.add(handler);
+ }
+ for (Handler handler : unsortedChain)
+ {
+ if ((handler instanceof LogicalHandler) == false)
+ sortedChain.add(handler);
+ }
+
+ log.debug("Create a handler executor: " + sortedChain);
+ for (Handler handler : sortedChain)
+ {
handlers.add(handler);
}
}
@@ -74,14 +88,14 @@
/**
* Indicates the end of lifecycle for a HandlerChain.
*/
- public void close()
+ public void close(MessageContext msgContext)
{
log.debug("close");
- int handlerIndex = handlers.size() - 1;
+ int handlerIndex = closeHandlers.size() - 1;
for (; handlerIndex >= 0; handlerIndex--)
{
- Handler currHandler = handlers.get(handlerIndex);
- currHandler.close(null);
+ Handler currHandler = closeHandlers.get(handlerIndex);
+ currHandler.close(msgContext);
}
}
@@ -120,7 +134,7 @@
}
}
}
- catch (Exception ex)
+ catch (RuntimeException ex)
{
doNext = false;
processHandlerFailure(ex);
@@ -129,7 +143,7 @@
{
// we start at this index in the response chain
if (doNext == false)
- falseIndex = (handlerIndex - 1);
+ falseIndex = handlerIndex;
soapContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
log.debug("Exit: handleRequest with status: " + doNext);
@@ -152,7 +166,7 @@
int handlerIndex = handlers.size() - 1;
if (falseIndex != -1)
- handlerIndex = falseIndex;
+ handlerIndex = falseIndex - 1;
Handler currHandler = null;
try
@@ -177,7 +191,7 @@
}
}
}
- catch (Exception ex)
+ catch (RuntimeException ex)
{
doNext = false;
processHandlerFailure(ex);
@@ -186,7 +200,7 @@
{
// we start at this index in the fault chain
if (doNext == false)
- falseIndex = (handlerIndex - 1);
+ falseIndex = handlerIndex;
soapContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
log.debug("Exit: handleResponse with status: " + doNext);
@@ -196,7 +210,7 @@
return doNext;
}
- public boolean handleFault(MessageContext msgContext)
+ public boolean handleFault(MessageContext msgContext, Exception ex)
{
boolean doNext = true;
@@ -206,19 +220,37 @@
SOAPMessageContextJAXWS soapContext = (SOAPMessageContextJAXWS)msgContext;
soapContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
+ SOAPMessage soapMessage = soapContext.getMessage();
- int handlerIndex = 0;
+ // If the message is not already a fault message then it is replaced with a fault message
+ try
+ {
+ if (soapMessage == null || soapMessage.getSOAPBody().getFault() == null)
+ {
+ soapMessage = SOAPFaultHelperJAXWS.exceptionToFaultMessage(ex);
+ soapContext.setMessage(soapMessage);
+ }
+ }
+ catch (SOAPException se)
+ {
+ throw new WebServiceException("Cannot convert exception to fault message", ex);
+ }
+
+ int handlerIndex = handlers.size() - 1;
+ if (falseIndex != -1)
+ handlerIndex = falseIndex - 1;
+
Handler currHandler = null;
try
{
String lastMessageTrace = null;
- for (; doNext && handlerIndex < handlers.size(); handlerIndex++)
+ for (; doNext && handlerIndex >= 0; handlerIndex--)
{
currHandler = handlers.get(handlerIndex);
if (log.isTraceEnabled())
{
- SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
+ SOAPPart soapPart = soapMessage.getSOAPPart();
lastMessageTrace = traceSOAPPart("BEFORE handleFault - " + currHandler, soapPart, lastMessageTrace);
}
@@ -226,21 +258,21 @@
if (log.isTraceEnabled())
{
- SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
+ SOAPPart soapPart = soapMessage.getSOAPPart();
lastMessageTrace = traceSOAPPart("AFTER handleFault - " + currHandler, soapPart, lastMessageTrace);
}
}
}
- catch (Exception ex)
+ catch (RuntimeException rte)
{
doNext = false;
- processHandlerFailure(ex);
+ processHandlerFailure(rte);
}
finally
{
// we start at this index in the response chain
if (doNext == false)
- falseIndex = (handlerIndex - 1);
+ falseIndex = handlerIndex;
soapContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
log.debug("Exit: handleFault with status: " + doNext);
@@ -275,6 +307,9 @@
handlerContext = new LogicalMessageContextImpl(soapContext);
}
+ if (closeHandlers.contains(currHandler) == false)
+ closeHandlers.add(currHandler);
+
boolean doNext = currHandler.handleMessage(handlerContext);
return doNext;
@@ -285,9 +320,15 @@
MessageContext handlerContext = soapContext;
if (currHandler instanceof LogicalHandler)
{
+ if (epMetaData.getStyle() == Style.RPC)
+ throw new WebServiceException("Cannot use logical handler with RPC");
+
handlerContext = new LogicalMessageContextImpl(soapContext);
}
+ if (closeHandlers.contains(currHandler) == false)
+ closeHandlers.add(currHandler);
+
boolean doNext = currHandler.handleFault(handlerContext);
return doNext;
@@ -295,7 +336,6 @@
/**
* Trace the SOAPPart, do nothing if the String representation is equal to the last one.
- * @param logMsg TODO
*/
protected String traceSOAPPart(String logMsg, SOAPPart soapPart, String lastMessageTrace)
{
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -24,14 +24,15 @@
// $Id:HandlerDelegateJAXWS.java 710 2006-08-08 20:19:52Z thomas.diesler(a)jboss.com $
import java.util.List;
+import java.util.Observable;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.PortInfo;
import org.jboss.logging.Logger;
import org.jboss.ws.core.server.HandlerDelegate;
-import org.jboss.ws.core.server.ServiceEndpointInfo;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
@@ -43,61 +44,66 @@
* @author Thomas.Diesler(a)jboss.org
* @since 19-Jan-2005
*/
-public class HandlerDelegateJAXWS implements HandlerDelegate
+public class HandlerDelegateJAXWS extends HandlerDelegate
{
// provide logging
private static Logger log = Logger.getLogger(HandlerDelegateJAXWS.class);
private HandlerResolverImpl resolver = new HandlerResolverImpl();
+
+ private ThreadLocal<HandlerChainExecutor> preExecutor = new ThreadLocal<HandlerChainExecutor>();
+ private ThreadLocal<HandlerChainExecutor> jaxwsExecutor = new ThreadLocal<HandlerChainExecutor>();
+ private ThreadLocal<HandlerChainExecutor> postExecutor = new ThreadLocal<HandlerChainExecutor>();
+
+ public HandlerDelegateJAXWS(ServerEndpointMetaData sepMetaData)
+ {
+ super(sepMetaData);
+ sepMetaData.registerConfigObserver(this);
+ }
- public boolean callRequestHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
log.debug("callRequestHandlerChain: " + type);
- SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
// Initialize the handler chain
- if (epMetaData.isHandlersInitialized() == false)
+ if (isInitialized() == false)
{
- initResolverChain(epMetaData);
- epMetaData.setHandlersInitialized(true);
+ resolver.initHandlerChain(sepMetaData, HandlerType.PRE);
+ resolver.initHandlerChain(sepMetaData, HandlerType.ENDPOINT);
+ resolver.initHandlerChain(sepMetaData, HandlerType.POST);
+ setInitialized(true);
}
- List<Handler> handlerChain = getHandlerChain(epMetaData, type);
- boolean status = new HandlerChainExecutor(epMetaData, handlerChain).handleRequest(msgContext);
- return status;
+ HandlerChainExecutor executor = createExecutor(sepMetaData, type);
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ return executor.handleRequest(msgContext);
}
- public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
log.debug("callResponseHandlerChain: " + type);
- SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
- ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
- List<Handler> handlerChain = getHandlerChain(epMetaData, type);
- boolean status = new HandlerChainExecutor(epMetaData, handlerChain).handleResponse(msgContext);
- return status;
+ HandlerChainExecutor executor = getExecutor(type);
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ return (executor != null ? executor.handleResponse(msgContext) : true);
}
- public void closeHandlerChain(ServiceEndpointInfo seInfo)
+ public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
log.debug("closeHandlerChain");
- EndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
-
- List<Handler> handlerChain = getHandlerChain(epMetaData, HandlerType.POST);
- new HandlerChainExecutor(epMetaData, handlerChain).close();
- handlerChain = getHandlerChain(epMetaData, HandlerType.ENDPOINT);
- new HandlerChainExecutor(epMetaData, handlerChain).close();
- handlerChain = getHandlerChain(epMetaData, HandlerType.PRE);
- new HandlerChainExecutor(epMetaData, handlerChain).close();
+ HandlerChainExecutor executor = getExecutor(type);
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ if (executor != null)
+ {
+ executor.close(msgContext);
+ removeExecutor(type);
+ }
}
- public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
+ public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
{
log.debug("callFaultHandlerChain: " + type);
- SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
- ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
- List<Handler> handlerChain = getHandlerChain(epMetaData, type);
- boolean status = new HandlerChainExecutor(epMetaData, handlerChain).handleFault(msgContext);
- return status;
+ HandlerChainExecutor executor = getExecutor(type);
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ return (executor != null ? executor.handleFault(msgContext, ex) : true);
}
private List<Handler> getHandlerChain(EndpointMetaData epMetaData, HandlerType type)
@@ -106,13 +112,6 @@
return resolver.getHandlerChain(info, type);
}
- private void initResolverChain(EndpointMetaData epMetaData)
- {
- resolver.initHandlerChain(epMetaData, HandlerType.PRE);
- resolver.initHandlerChain(epMetaData, HandlerType.ENDPOINT);
- resolver.initHandlerChain(epMetaData, HandlerType.POST);
- }
-
private PortInfo getPortInfo(EndpointMetaData epMetaData)
{
QName serviceName = epMetaData.getServiceMetaData().getServiceName();
@@ -121,4 +120,53 @@
PortInfo info = new PortInfoImpl(serviceName, portName, bindingId);
return info;
}
+
+ private HandlerChainExecutor createExecutor(ServerEndpointMetaData sepMetaData, HandlerType type)
+ {
+ if (type == HandlerType.ALL)
+ throw new IllegalArgumentException("Invalid handler type: " + type);
+
+ HandlerChainExecutor executor = new HandlerChainExecutor(sepMetaData, getHandlerChain(sepMetaData, type));
+ if (type == HandlerType.PRE)
+ preExecutor.set(executor);
+ else if (type == HandlerType.ENDPOINT)
+ jaxwsExecutor.set(executor);
+ else if (type == HandlerType.POST)
+ postExecutor.set(executor);
+
+ return executor;
+ }
+
+ private HandlerChainExecutor getExecutor(HandlerType type)
+ {
+ if (type == HandlerType.ALL)
+ throw new IllegalArgumentException("Invalid handler type: " + type);
+
+ HandlerChainExecutor executor = null;
+ if (type == HandlerType.PRE)
+ executor = preExecutor.get();
+ else if (type == HandlerType.ENDPOINT)
+ executor = jaxwsExecutor.get();
+ else if (type == HandlerType.POST)
+ executor = postExecutor.get();
+
+ return executor;
+ }
+
+ private void removeExecutor(HandlerType type)
+ {
+ if (type == HandlerType.ALL)
+ throw new IllegalArgumentException("Invalid handler type: " + type);
+
+ if (type == HandlerType.PRE)
+ preExecutor.remove();
+ else if (type == HandlerType.ENDPOINT)
+ jaxwsExecutor.remove();
+ else if (type == HandlerType.POST)
+ postExecutor.remove();
+ }
+
+ public void update(Observable observable, Object object)
+ {
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -82,7 +82,7 @@
{
log.debug("getHandlerChain: [type=" + type + ",info=" + info + "]");
- List<Handler> unsortedChain = new ArrayList<Handler>();
+ List<Handler> handlerChain = new ArrayList<Handler>();
String bindingID = info.getBindingID();
QName serviceName = info.getServiceName();
@@ -96,7 +96,7 @@
if (list != null)
{
log.debug("add protocol handlers: " + list);
- unsortedChain.addAll(list);
+ handlerChain.addAll(list);
}
}
@@ -106,7 +106,7 @@
if (list != null)
{
log.debug("add service handlers: " + list);
- unsortedChain.addAll(list);
+ handlerChain.addAll(list);
}
}
@@ -116,7 +116,7 @@
if (list != null)
{
log.debug("add port handlers: " + list);
- unsortedChain.addAll(list);
+ handlerChain.addAll(list);
}
}
@@ -124,23 +124,10 @@
if (list != null)
{
log.debug("add general handlers: " + list);
- unsortedChain.addAll(list);
+ handlerChain.addAll(list);
}
- // Sort handler logical handlers first
- List<Handler> sortedChain = new ArrayList<Handler>();
- for (Handler handler : unsortedChain)
- {
- if (handler instanceof LogicalHandler)
- sortedChain.add(handler);
- }
- for (Handler handler : unsortedChain)
- {
- if ((handler instanceof LogicalHandler) == false)
- sortedChain.add(handler);
- }
-
- return Collections.unmodifiableList(sortedChain);
+ return Collections.unmodifiableList(handlerChain);
}
public void initHandlerChain(EndpointMetaData epMetaData, HandlerType type)
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/handler/MessageContextJAXWS.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -28,16 +28,21 @@
import java.util.Map;
import java.util.Set;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.addressing.soap.SOAPAddressingProperties;
import javax.xml.ws.handler.MessageContext;
+import org.jboss.logging.Logger;
import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.StubExt;
import org.jboss.ws.core.jaxrpc.binding.SerializationContext;
import org.jboss.ws.core.jaxws.SerializationContextJAXWS;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.ServiceMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
-
/**
* The interface MessageContext abstracts the message context that is processed by a handler in the handle method.
*
@@ -49,8 +54,8 @@
*/
public class MessageContextJAXWS extends CommonMessageContext implements MessageContext
{
- // The serialization context for this message ctx
- private SerializationContext serContext;
+ private static Logger log = Logger.getLogger(MessageContextJAXWS.class);
+
// The map of property scopes
private HashMap<String, Scope> scopes = new HashMap<String, Scope>();
@@ -63,20 +68,16 @@
super(msgContext);
}
- /** Get or create the serialization context
+ /** Create the serialization context
*/
- public SerializationContext getSerializationContext()
+ public SerializationContext createSerializationContext()
{
- if (serContext == null)
- {
- EndpointMetaData epMetaData = getEndpointMetaData();
- ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
+ EndpointMetaData epMetaData = getEndpointMetaData();
+ ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
- SerializationContextJAXWS jaxwsContext = new SerializationContextJAXWS();
- jaxwsContext.setTypeMapping(serviceMetaData.getTypeMapping());
- serContext = jaxwsContext;
- }
- return serContext;
+ SerializationContextJAXWS jaxwsContext = new SerializationContextJAXWS();
+ jaxwsContext.setTypeMapping(serviceMetaData.getTypeMapping());
+ return jaxwsContext;
}
/** Gets the namespace registry for this message context */
@@ -84,7 +85,7 @@
{
return getSerializationContext().getNamespaceRegistry();
}
-
+
/** Sets the scope of a property. */
public void setScope(String key, Scope scope)
{
@@ -97,6 +98,35 @@
return scopes.get(key);
}
+ public static CommonMessageContext processPivot(CommonMessageContext reqContext)
+ {
+ log.debug("Begin response processing");
+
+ // MTOM setting need to pass past pivot
+ boolean mtomEnabled = XOPContext.isMTOMEnabled();
+
+ // Reverse the direction
+ Boolean outbound = (Boolean)reqContext.getProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ outbound = new Boolean(!outbound.booleanValue());
+
+ // Preserve addressing properties
+ SOAPAddressingProperties addrProps = (SOAPAddressingProperties)reqContext.getProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+ MessageContextAssociation.popMessageContext();
+ SOAPMessageContextJAXWS resContext = new SOAPMessageContextJAXWS(reqContext);
+ resContext.setSOAPMessage(null);
+ resContext.clear();
+
+ resContext.setProperty(StubExt.PROPERTY_MTOM_ENABLED, mtomEnabled);
+ resContext.setProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY, outbound);
+ resContext.setProperty(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND, addrProps);
+ MessageContextAssociation.pushMessageContext(resContext);
+
+ return resContext;
+ }
+
+ // Map interface
+
public int size()
{
return props.size();
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -36,7 +36,6 @@
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPHeader;
import javax.xml.soap.SOAPMessage;
-import javax.xml.ws.handler.MessageContext;
import org.jboss.logging.Logger;
import org.jboss.ws.Constants;
@@ -44,10 +43,14 @@
import org.jboss.ws.core.CommonBindingProvider;
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.CommonSOAPBinding;
+import org.jboss.ws.core.DirectionHolder;
import org.jboss.ws.core.EndpointInvocation;
+import org.jboss.ws.core.DirectionHolder.Direction;
import org.jboss.ws.core.jaxrpc.handler.HandlerDelegateJAXRPC;
+import org.jboss.ws.core.jaxrpc.handler.MessageContextJAXRPC;
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
import org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS;
+import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
@@ -63,76 +66,81 @@
* @author Thomas.Diesler(a)jboss.org
* @since 19-Jan-2005
*/
-public abstract class AbstractServiceEndpointInvoker implements ServiceEndpointInvoker, HandlerDelegate
+public abstract class AbstractServiceEndpointInvoker implements ServiceEndpointInvoker
{
// provide logging
private static Logger log = Logger.getLogger(AbstractServiceEndpointInvoker.class);
+ protected ServiceEndpointInfo seInfo;
protected CommonBindingProvider bindingProvider;
- protected HandlerDelegate handlerDelegate;
+ protected HandlerDelegate delegate;
/** Initialize the service endpoint */
- public void initServiceEndpoint(ServiceEndpointInfo seInfo)
+ public void init(ServiceEndpointInfo seInfo)
{
+ this.seInfo = seInfo;
ServerEndpointMetaData sepMetaData = seInfo.getServerEndpointMetaData();
if (sepMetaData.getType() == EndpointMetaData.Type.JAXRPC)
{
bindingProvider = new CommonBindingProvider(sepMetaData);
- handlerDelegate = new HandlerDelegateJAXRPC();
+ delegate = new HandlerDelegateJAXRPC(sepMetaData);
}
else
{
bindingProvider = new BindingProviderImpl(sepMetaData);
- handlerDelegate = new HandlerDelegateJAXWS();
+ delegate = new HandlerDelegateJAXWS(sepMetaData);
}
}
/** Load the SEI implementation bean if necessary */
- protected abstract Class loadServiceEndpoint(ServiceEndpointInfo seInfo) throws ClassNotFoundException;
+ protected abstract Class loadServiceEndpoint() throws ClassNotFoundException;
/** Create the instance of the SEI implementation bean if necessary */
- protected abstract Object createServiceEndpointInstance(ServiceEndpointInfo seInfo, Object context, Class seiImplClass) throws Exception;
+ protected abstract Object createServiceEndpointInstance(Object context, Class seiImplClass) throws Exception;
/** Invoke the instance of the SEI implementation bean */
- protected abstract void invokeServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl, EndpointInvocation epInv) throws Exception;
+ protected abstract void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws Exception;
/** Destroy the instance of the SEI implementation bean if necessary */
- protected abstract void destroyServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl);
+ protected abstract void destroyServiceEndpointInstance(Object seiImpl);
- public boolean callRequestHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ public boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
- return handlerDelegate.callRequestHandlerChain(seInfo, type);
+ return delegate.callRequestHandlerChain(sepMetaData, type);
}
- public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
+ public boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
- return handlerDelegate.callResponseHandlerChain(seInfo, type);
+ return delegate.callResponseHandlerChain(sepMetaData, type);
}
- public void closeHandlerChain(ServiceEndpointInfo seInfo)
+ public void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type)
{
- handlerDelegate.closeHandlerChain(seInfo);
+ delegate.closeHandlerChain(sepMetaData, type);
}
- public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
+ public boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex)
{
- return handlerDelegate.callFaultHandlerChain(seInfo, type, ex);
+ return delegate.callFaultHandlerChain(sepMetaData, type, ex);
}
/** Invoke the the service endpoint */
- public SOAPMessage invoke(ServiceEndpointInfo seInfo, Object context) throws Exception
+ public SOAPMessage invoke(Object context) throws Exception
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
- EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
+ ServerEndpointMetaData sepMetaData = (ServerEndpointMetaData)msgContext.getEndpointMetaData();
SOAPMessageImpl reqMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
// Load the endpoint implementation bean
- Class seImpl = loadServiceEndpoint(seInfo);
+ Class seImpl = loadServiceEndpoint();
// Create an instance of the endpoint implementation bean
- Object seInstance = createServiceEndpointInstance(seInfo, context, seImpl);
+ Object seInstance = createServiceEndpointInstance(context, seImpl);
+ // The direction of the message
+ DirectionHolder direction = new DirectionHolder(Direction.InBound);
+
try
{
boolean oneway = false;
@@ -141,7 +149,7 @@
OperationMetaData opMetaData = null;
// call the handler chain
- boolean handlersPass = callRequestHandlerChain(seInfo, HandlerType.PRE);
+ boolean handlersPass = callRequestHandlerChain(sepMetaData, HandlerType.PRE);
// Unbind the request message
if (handlersPass)
@@ -150,7 +158,7 @@
binding = bindingProvider.getCommonBinding();
// Get the operation meta data from the SOAP message
- opMetaData = getDispatchDestination(epMetaData, reqMessage);
+ opMetaData = getDispatchDestination(sepMetaData, reqMessage);
msgContext.setOperationMetaData(opMetaData);
oneway = opMetaData.isOneWay();
@@ -158,36 +166,32 @@
epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
- handlersPass = handlersPass && callRequestHandlerChain(seInfo, HandlerType.ENDPOINT);
- handlersPass = handlersPass && callRequestHandlerChain(seInfo, HandlerType.POST);
+ handlersPass = handlersPass && callRequestHandlerChain(sepMetaData, HandlerType.ENDPOINT);
+ handlersPass = handlersPass && callRequestHandlerChain(sepMetaData, HandlerType.POST);
- // Check if protocol handlers modified the payload
- if (((SOAPBodyImpl)reqMessage.getSOAPBody()).isModifiedFromSource())
+ if (handlersPass)
{
- if (log.isDebugEnabled())
+ // Check if protocol handlers modified the payload
+ if (((SOAPBodyImpl)reqMessage.getSOAPBody()).isModifiedFromSource())
+ {
log.debug("Handler modified body payload, unbind message again");
- epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
- }
+ epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
+ }
- if (handlersPass)
- {
// Invoke the service endpoint
msgContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
try
{
- invokeServiceEndpointInstance(seInfo, seInstance, epInv);
+ invokeServiceEndpointInstance(seInstance, epInv);
}
finally
{
msgContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
}
- msgContext = processPivot(msgContext);
+ // Reverse the message direction
+ msgContext = processPivotInternal(msgContext, direction);
- // Set the outbound property
- if (epMetaData.getType() == EndpointMetaData.Type.JAXWS)
- msgContext.setProperty(MessageContext.MESSAGE_OUTBOUND_PROPERTY, Boolean.TRUE);
-
if (binding instanceof CommonSOAPBinding)
XOPContext.setMTOMEnabled(((CommonSOAPBinding)binding).isMTOMEnabled());
@@ -195,50 +199,73 @@
SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
msgContext.setSOAPMessage(resMessage);
}
+ else
+ {
+ // Reverse the message direction without calling the endpoint
+ SOAPMessage resMessage = msgContext.getSOAPMessage();
+ msgContext = processPivotInternal(msgContext, direction);
+ msgContext.setSOAPMessage(resMessage);
+ }
// call the handler chain
if (oneway == false)
{
- handlersPass = callResponseHandlerChain(seInfo, HandlerType.POST);
- handlersPass = handlersPass && callResponseHandlerChain(seInfo, HandlerType.ENDPOINT);
- handlersPass = handlersPass && callResponseHandlerChain(seInfo, HandlerType.PRE);
- closeHandlerChain(seInfo);
+ handlersPass = callResponseHandlerChain(sepMetaData, HandlerType.POST);
+ handlersPass = handlersPass && callResponseHandlerChain(sepMetaData, HandlerType.ENDPOINT);
+ handlersPass = handlersPass && callResponseHandlerChain(sepMetaData, HandlerType.PRE);
}
SOAPMessage resMessage = msgContext.getSOAPMessage();
return resMessage;
}
- catch (Exception ex)
+ catch (RuntimeException ex)
{
+ // Reverse the message direction
+ processPivotInternal(msgContext, direction);
+
try
{
CommonBinding binding = bindingProvider.getCommonBinding();
binding.bindFaultMessage(ex);
// call the handler chain
- boolean handlersPass = callFaultHandlerChain(seInfo, HandlerType.POST, ex);
- handlersPass = handlersPass && callFaultHandlerChain(seInfo, HandlerType.ENDPOINT, ex);
- handlersPass = handlersPass && callFaultHandlerChain(seInfo, HandlerType.PRE, ex);
- closeHandlerChain(seInfo);
+ boolean handlersPass = callFaultHandlerChain(sepMetaData, HandlerType.POST, ex);
+ handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, HandlerType.ENDPOINT, ex);
+ handlersPass = handlersPass && callFaultHandlerChain(sepMetaData, HandlerType.PRE, ex);
}
- catch (Exception subEx)
+ catch (RuntimeException subEx)
{
- log.warn("Cannot process handlerChain.handleFault, ignoring: ", subEx);
+ log.warn("Exception while processing handleFault: ", ex);
+ ex = subEx;
}
throw ex;
}
finally
{
- destroyServiceEndpointInstance(seInfo, seInstance);
+ closeHandlerChain(sepMetaData, HandlerType.POST);
+ closeHandlerChain(sepMetaData, HandlerType.ENDPOINT);
+ closeHandlerChain(sepMetaData, HandlerType.PRE);
+
+ destroyServiceEndpointInstance(seInstance);
}
}
- protected CommonMessageContext processPivot(CommonMessageContext requestContext)
+ private CommonMessageContext processPivotInternal(CommonMessageContext msgContext, DirectionHolder direction)
{
- if (log.isDebugEnabled())
- log.debug("Begin response processing");
- // TODO: implement
- return requestContext;
+ if (direction.getDirection() == Direction.InBound)
+ {
+ EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
+ if (epMetaData.getType() == EndpointMetaData.Type.JAXRPC)
+ {
+ msgContext = MessageContextJAXRPC.processPivot(msgContext);
+ }
+ else
+ {
+ msgContext = MessageContextJAXWS.processPivot(msgContext);
+ }
+ direction.setDirection(Direction.OutBound);
+ }
+ return msgContext;
}
private OperationMetaData getDispatchDestination(EndpointMetaData epMetaData, SOAPMessageImpl reqMessage) throws SOAPException
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/HandlerDelegate.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/HandlerDelegate.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/HandlerDelegate.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -23,19 +23,38 @@
// $Id$
+import org.jboss.ws.metadata.config.Configurable;
+import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.HandlerMetaData.HandlerType;
/**
* @author Thomas.Diesler(a)jboss.org
* @since 19-Jan-2005
*/
-public interface HandlerDelegate
+public abstract class HandlerDelegate implements Configurable
{
- public boolean callRequestHandlerChain(ServiceEndpointInfo seInfo, HandlerType type);
+ private ServerEndpointMetaData sepMetaData;
+
+ public HandlerDelegate(ServerEndpointMetaData sepMetaData)
+ {
+ this.sepMetaData = sepMetaData;
+ }
- public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type);
+ public abstract boolean callRequestHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type);
+
+ public abstract boolean callResponseHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type);
- public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex);
+ public abstract boolean callFaultHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type, Exception ex);
- public void closeHandlerChain(ServiceEndpointInfo seInfo);
+ public abstract void closeHandlerChain(ServerEndpointMetaData sepMetaData, HandlerType type);
+
+ protected boolean isInitialized()
+ {
+ return sepMetaData.isHandlersInitialized();
+ }
+
+ protected void setInitialized(boolean flag)
+ {
+ sepMetaData.setHandlersInitialized(flag);
+ }
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -201,7 +201,7 @@
// Invoke the service endpoint
ServiceEndpointInvoker seInvoker = seInfo.getInvoker();
- SOAPMessage resMessage = seInvoker.invoke(seInfo, context);
+ SOAPMessage resMessage = seInvoker.invoke(context);
if (resMessage != null)
postProcessResponse(headerSource, resMessage);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -32,9 +32,9 @@
*/
public interface ServiceEndpointInvoker
{
- /** Initialize the service endpoint */
- void initServiceEndpoint(ServiceEndpointInfo seInfo);
+ /** Initialize the invoker */
+ void init(ServiceEndpointInfo seInfo);
/** Invoke the the service endpoint */
- SOAPMessage invoke(ServiceEndpointInfo seInfo, Object endpointContext) throws Exception;
+ SOAPMessage invoke(Object endpointContext) throws Exception;
}
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -54,7 +54,7 @@
private Logger log = Logger.getLogger(ServiceEndpointInvokerJSE.class);
/** Load the SEI implementation bean if necessary */
- public Class loadServiceEndpoint(ServiceEndpointInfo seInfo) throws ClassNotFoundException
+ public Class loadServiceEndpoint() throws ClassNotFoundException
{
ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
ClassLoader cl = epMetaData.getClassLoader();
@@ -64,7 +64,7 @@
}
/** Create an instance of the SEI implementation bean if necessary */
- public Object createServiceEndpointInstance(ServiceEndpointInfo seInfo, Object context, Class seiImplClass) throws IllegalAccessException, InstantiationException
+ public Object createServiceEndpointInstance(Object context, Class seiImplClass) throws IllegalAccessException, InstantiationException
{
Object seiImpl = seiImplClass.newInstance();
if (seiImpl instanceof ServiceLifecycle && context != null)
@@ -84,7 +84,7 @@
}
/** Invoke an instance of the SEI implementation bean */
- public void invokeServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl, EndpointInvocation epInv) throws SOAPFaultException, Exception
+ public void invokeServiceEndpointInstance(Object seiImpl, EndpointInvocation epInv) throws SOAPFaultException, Exception
{
if(log.isDebugEnabled()) log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
try
@@ -111,7 +111,7 @@
}
/** Destroy an instance of the SEI implementation bean if necessary */
- public void destroyServiceEndpointInstance(ServiceEndpointInfo seInfo, Object seiImpl)
+ public void destroyServiceEndpointInstance(Object seiImpl)
{
if (seiImpl instanceof ServiceLifecycle)
{
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -438,6 +438,9 @@
try
{
SOAPMessage resMessage = wsEndpoint.handleRequest(headerSource, context, inStream);
+
+ // REplace the message context with the response context
+ msgContext = MessageContextAssociation.peekMessageContext();
Map<String, List<String>> headers = (Map<String, List<String>>)msgContext.getProperty(MessageContextJAXWS.HTTP_RESPONSE_HEADERS);
if (headers != null)
@@ -480,7 +483,7 @@
private void sendResponse(OutputStream outputStream, CommonMessageContext msgContext, boolean isFault) throws SOAPException, IOException
{
- SOAPMessage soapMessage = msgContext.getSOAPMessage();
+ SOAPMessage resMessage = msgContext.getSOAPMessage();
String wsaTo = null;
// Get the destination from the AddressingProperties
@@ -495,11 +498,11 @@
if (wsaTo != null)
{
if(log.isDebugEnabled()) log.debug("Sending response to addressing destination: " + wsaTo);
- new SOAPConnectionImpl().callOneWay(soapMessage, wsaTo);
+ new SOAPConnectionImpl().callOneWay(resMessage, wsaTo);
}
else
{
- soapMessage.writeTo(outputStream);
+ resMessage.writeTo(outputStream);
}
}
@@ -602,7 +605,7 @@
throw new WSException("Service already registerd: " + sepID);
ServiceEndpointInvoker seInvoker = getServiceEndpointInvoker(seInfo);
- seInvoker.initServiceEndpoint(seInfo);
+ seInvoker.init(seInfo);
seInfo.setInvoker(seInvoker);
// Load/Create the service endpoint impl
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/ConfigurationProvider.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/ConfigurationProvider.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/config/ConfigurationProvider.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -43,9 +43,7 @@
static final String DEFAULT_CLIENT_CONFIG_NAME = "Standard Client";
/**
- * Callback for components that require configuration through jbossws-dd
- *
- * @param configurable
+ * Callback for components that require configuration
*/
void configure(Configurable configurable);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -240,8 +240,7 @@
if (use == null)
{
use = Use.getDefaultUse();
- if (log.isDebugEnabled())
- log.debug("Using default encoding style: " + use);
+ log.debug("Using default encoding style: " + use);
}
return use;
}
@@ -260,8 +259,7 @@
if (style == null)
{
style = Style.getDefaultStyle();
- if (log.isDebugEnabled())
- log.debug("Using default style: " + style);
+ log.debug("Using default style: " + style);
}
return style;
}
@@ -280,8 +278,7 @@
if (parameterStyle == null)
{
parameterStyle = ParameterStyle.WRAPPED;
- if (log.isDebugEnabled())
- log.debug("Using default parameter style: " + parameterStyle);
+ log.debug("Using default parameter style: " + parameterStyle);
}
return parameterStyle;
}
@@ -291,8 +288,7 @@
if (value != null && parameterStyle != null && !parameterStyle.equals(value))
throw new WSException("Mixed SOAP parameter styles not supported");
- if (log.isDebugEnabled())
- log.debug("setParameterStyle: " + value);
+ log.debug("setParameterStyle: " + value);
this.parameterStyle = value;
}
@@ -607,15 +603,13 @@
// SOAPBinding configuration
if (configurable instanceof CommonBindingProvider)
{
- if (log.isDebugEnabled())
- log.debug("Configure SOAPBinding");
+ log.debug("Configure SOAPBinding");
if (config.hasFeature(EndpointFeature.MTOM))
{
CommonBindingProvider provider = (CommonBindingProvider)configurable;
((CommonSOAPBinding)provider.getCommonBinding()).setMTOMEnabled(true);
- if (log.isDebugEnabled())
- log.debug("Enable MTOM on endpoint " + this.getPortName());
+ log.debug("Enable MTOM on endpoint " + getPortName());
}
}
}
@@ -627,7 +621,7 @@
public void registerConfigObserver(Configurable observer)
{
- this.configObservable.addObserver(observer);
+ configObservable.addObserver(observer);
}
public String getConfigFile()
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java 2007-03-14 10:35:45 UTC (rev 2616)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java 2007-03-15 00:28:50 UTC (rev 2617)
@@ -26,16 +26,12 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
import org.jboss.logging.Logger;
@@ -43,36 +39,12 @@
{
private static Logger log = Logger.getLogger(ServletClient.class);
- private SOAPEndpoint port;
+ @WebServiceRef(wsdlLocation = "http://localhost:8080/jaxws-handlerlifecycle/soap?wsdl")
+ public static SOAPEndpoint port;
+
+ @WebServiceRef(wsdlLocation = "http://localhost:8080/jaxws-handlerlifecycle/tracker?wsdl")
private TrackerEndpoint trackerPort;
- public void init(ServletConfig config) throws ServletException
- {
- super.init(config);
-
- try
- {
- if (port == null)
- {
- URL wsdlURL = new URL("http://localhost:8080/jaxws-handlerlifecycle/soap?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerlifecycle", "SOAPEndpointService");
- Service service = Service.create(wsdlURL, serviceName);
- port = (SOAPEndpoint)service.getPort(SOAPEndpoint.class);
- }
- if (trackerPort == null)
- {
- URL wsdlURL = new URL("http://localhost:8080/jaxws-handlerlifecycle/tracker?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerlifecycle", "TrackerEndpointService");
- Service service = Service.create(wsdlURL, serviceName);
- trackerPort = (TrackerEndpoint)service.getPort(TrackerEndpoint.class);
- }
- }
- catch (MalformedURLException ex)
- {
- throw new ServletException(ex);
- }
- }
-
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
String message;
@@ -83,6 +55,11 @@
method.invoke(this, new Object[]{});
message = "pass";
}
+ catch (InvocationTargetException ex)
+ {
+ log.error(ex.getTargetException());
+ message = ex.getTargetException().toString();
+ }
catch (Exception ex)
{
log.error(ex);
17 years, 9 months
JBossWS SVN: r2616 - tags.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-14 06:35:45 -0400 (Wed, 14 Mar 2007)
New Revision: 2616
Added:
tags/jbossws-1.2.0.SP1/
Log:
Release jbossws-1.2.0.SP1
Copied: tags/jbossws-1.2.0.SP1 (from rev 2615, branches/jbossws-1.2.0)
17 years, 9 months
JBossWS SVN: r2615 - in trunk/jbossws-tests: src/java/org/jboss/test/ws/jaxws/handlerlifecycle and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-14 05:24:03 -0400 (Wed, 14 Mar 2007)
New Revision: 2615
Added:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleClientTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleServletTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerTracker.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpoint.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpointBean.java
trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/ServletClient/
trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/ServletClient/WEB-INF/
trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/ServletClient/WEB-INF/web.xml
Removed:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java
Modified:
trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpointBean.java
trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/WEB-INF/web.xml
Log:
Rebuild handler lifecycle test using a static tracker
Modified: trunk/jbossws-tests/ant-import/build-jars-jaxws.xml
===================================================================
--- trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-03-13 21:36:47 UTC (rev 2614)
+++ trunk/jbossws-tests/ant-import/build-jars-jaxws.xml 2007-03-14 09:24:03 UTC (rev 2615)
@@ -126,11 +126,22 @@
<war warfile="${tests.output.dir}/libs/jaxws-handlerlifecycle.war" webxml="${tests.output.dir}/resources/jaxws/handlerlifecycle/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
<include name="org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpointBean.class"/>
- <include name="org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpointBean.class"/>
<include name="org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerlifecycle/HandlerTracker.class"/>
<include name="org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-server-handlers.xml"/>
</classes>
</war>
+ <war warfile="${tests.output.dir}/libs/jaxws-handlerlifecycle-client.war" webxml="${tests.output.dir}/resources/jaxws/handlerlifecycle/ServletClient/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpoint.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerlifecycle/HandlerTracker.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.class"/>
+ <include name="org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml"/>
+ </classes>
+ </war>
<!-- jaxws-handlerscope -->
<war warfile="${tests.output.dir}/libs/jaxws-handlerscope.war" webxml="${tests.output.dir}/resources/jaxws/handlerscope/WEB-INF/web.xml">
Added: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleClientTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleClientTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleClientTestCase.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.handlerlifecycle;
+
+// $Id$
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test JAXWS handler lifecycle
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 13-MAr-2007
+ */
+public class HandlerLifecycleClientTestCase extends JBossWSTest
+{
+ private static SOAPEndpoint port;
+ private static TrackerEndpoint trackerPort;
+
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(HandlerLifecycleClientTestCase.class, "jaxws-handlerlifecycle.war");
+ }
+
+ public void setUp() throws Exception
+ {
+ if (port == null)
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-handlerlifecycle/soap?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerlifecycle", "SOAPEndpointService");
+ Service service = Service.create(wsdlURL, serviceName);
+ port = (SOAPEndpoint)service.getPort(SOAPEndpoint.class);
+ }
+ if (trackerPort == null)
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-handlerlifecycle/tracker?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerlifecycle", "TrackerEndpointService");
+ Service service = Service.create(wsdlURL, serviceName);
+ trackerPort = (TrackerEndpoint)service.getPort(TrackerEndpoint.class);
+ }
+ }
+
+ public void testClientAccess() throws Exception
+ {
+ String retStr = port.echo("hello");
+ assertEquals("hello", retStr);
+ }
+
+ public void testTrackerMessages() throws Exception
+ {
+ String retStr = HandlerTracker.getListMessages();
+ assertEquals("[ClientHandler:PostConstruct, ClientHandler:OutBound, ClientHandler:InBound, ClientHandler:Close]", retStr);
+
+ retStr = trackerPort.getListMessages();
+ assertEquals("[ServerHandler:PostConstruct, ServerHandler:InBound, ServerHandler:OutBound, ServerHandler:Close]", retStr);
+
+ }
+
+ public void testClearTrackerData() throws Exception
+ {
+ HandlerTracker.clearListMessages();
+ trackerPort.clearListMessages();
+
+ assertEquals("[]", HandlerTracker.getListMessages());
+ assertEquals("[]", trackerPort.getListMessages());
+ }
+}
Property changes on: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleClientTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleServletTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleServletTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleServletTestCase.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.handlerlifecycle;
+
+// $Id$
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+
+/**
+ * Test JAXWS handler lifecycle
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 13-MAr-2007
+ */
+public class HandlerLifecycleServletTestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return JBossWSTestSetup.newTestSetup(HandlerLifecycleServletTestCase.class, "jaxws-handlerlifecycle.war, jaxws-handlerlifecycle-client.war");
+ }
+
+ public void testClientAccess() throws Exception
+ {
+ invokeServletClient(getName());
+ }
+
+ public void testTrackerMessages() throws Exception
+ {
+ invokeServletClient(getName());
+ }
+
+ public void testClearTrackerData() throws Exception
+ {
+ invokeServletClient(getName());
+ }
+
+ private void invokeServletClient(String testMethod) throws MalformedURLException, IOException
+ {
+ URL servletURL = new URL("http://" + getServerHost() + ":8080/jaxws-handlerlifecycle-client?method=" + testMethod);
+ InputStream is = servletURL.openStream();
+ InputStreamReader isr = new InputStreamReader(is);
+ BufferedReader br = new BufferedReader(isr);
+ String line = br.readLine();
+ assertEquals("pass", line);
+ }
+}
Property changes on: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleServletTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java 2007-03-13 21:36:47 UTC (rev 2614)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -1,99 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.handlerlifecycle;
-
-// $Id$
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Binding;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.Service;
-import javax.xml.ws.handler.Handler;
-
-import junit.framework.Test;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.JBossWSTestSetup;
-
-/**
- * Test JAXWS handler lifecycle
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 13-MAr-2007
- */
-public class HandlerLifecycleTestCase extends JBossWSTest
-{
- private static SOAPEndpoint port;
-
- public static Test suite()
- {
- return JBossWSTestSetup.newTestSetup(HandlerLifecycleTestCase.class, "jaxws-handlerlifecycle.war");
- }
-
- public void setUp() throws Exception
- {
- if (port == null)
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-handlerlifecycle?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerlifecycle", "SOAPEndpointService");
- Service service = Service.create(wsdlURL, serviceName);
- port = (SOAPEndpoint)service.getPort(SOAPEndpoint.class);
- }
- }
-
- public void testClientAccess() throws Exception
- {
- String retStr = port.echo("hello");
- StringBuffer expStr = new StringBuffer("hello:OutBound:ClientHandler:InBound:ServerHandler:endpoint:OutBound:ServerHandler:InBound:ClientHandler");
- assertEquals(expStr.toString(), retStr);
- }
-
- public void testPostConstruct() throws Exception
- {
- String retStr = LifecycleHandler.postConstructMsg;
- assertEquals("PostConstruct:ClientHandler", retStr);
-
- retStr = port.getPostConstruct();
- assertEquals("PostConstruct:ServerHandler", retStr);
- }
-
- /* Not Implemented
- public void testPreDestroy() throws Exception
- {
- String retStr = port.getPreDestroy();
- assertEquals("PreDestroy:ServerHandler", retStr);
- }
- */
-
- public void testClose() throws Exception
- {
- String retStr = LifecycleHandler.closeMsg;
- assertEquals("Close:ClientHandler", retStr);
-
- retStr = port.getClose();
- assertEquals("Close:ServerHandler", retStr);
- }
-}
Added: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerTracker.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerTracker.java (rev 0)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerTracker.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2. of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 5 Franklin St, Fifth Floor, Boston, MA
+ * 020-30 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.handlerlifecycle;
+
+//$Id$
+
+import java.util.Vector;
+
+import javax.xml.ws.handler.Handler;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Tracks handler method invocations
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Mar-2007
+ */
+public final class HandlerTracker
+{
+ private static Logger log = Logger.getLogger(HandlerTracker.class);
+
+ private static Vector<String> messages = new Vector<String>();
+
+ public static void reportHandlePostConstruct(Handler handler)
+ {
+ String msg = handler + ":PostConstruct";
+ log.info(msg + " to vector: " + System.identityHashCode(messages));
+ messages.add(msg);
+ }
+
+ public static void reportHandlePreDestroy(Handler handler)
+ {
+ String msg = handler + ":PreDestroy";
+ log.info(msg + " to vector " + System.identityHashCode(messages));
+ messages.add(msg);
+ }
+
+ public static void reportHandleMessage(Handler handler, String direction)
+ {
+ String msg = handler + ":" + direction;
+ log.info(msg + " to vector: " + System.identityHashCode(messages));
+ messages.add(msg);
+ }
+
+ public static void reportHandleClose(Handler handler)
+ {
+ String msg = handler + ":Close";
+ log.info(msg + " to vector: " + System.identityHashCode(messages));
+ messages.add(msg);
+ }
+
+ public static String getListMessages()
+ {
+ log.info("getListMessages from vector: " + System.identityHashCode(messages));
+ log.info(messages.toString());
+ return messages.toString();
+ }
+
+ public static void clearListMessages()
+ {
+ log.info("clearListMessages from vector: " + System.identityHashCode(messages));
+ messages.clear();
+ }
+}
Property changes on: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerTracker.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java 2007-03-13 21:36:47 UTC (rev 2614)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/LifecycleHandler.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -37,10 +37,6 @@
{
private static Logger log = Logger.getLogger(LifecycleHandler.class);
- static String postConstructMsg;
- static String preDestroyMsg;
- static String closeMsg;
-
public LifecycleHandler()
{
log.info("new LifecycleHandler");
@@ -49,54 +45,31 @@
@Override
public boolean handleOutbound(MessageContext msgContext)
{
- log.info("handleOutbound: " + this);
- return appendHandlerName(msgContext, "OutBound:" + getHandlerName());
+ HandlerTracker.reportHandleMessage(this, "OutBound");
+ return true;
}
@Override
public boolean handleInbound(MessageContext msgContext)
{
- log.info("handleInbound: " + this);
- return appendHandlerName(msgContext, "InBound:" + getHandlerName());
+ HandlerTracker.reportHandleMessage(this, "InBound");
+ return true;
}
@PostConstruct
public void postConstruct()
{
- log.info("postConstruct: " + this);
- postConstructMsg = "PostConstruct:" + getHandlerName();
+ HandlerTracker.reportHandlePostConstruct(this);
}
@PreDestroy
public void preDestroy()
{
- log.info("preDestroy: " + this);
- preDestroyMsg = "PreDestroy:" + getHandlerName();
+ HandlerTracker.reportHandlePreDestroy(this);
}
public void close(MessageContext messageContext)
{
- log.info("close: " + this);
- closeMsg = "Close:" + getHandlerName();
+ HandlerTracker.reportHandleClose(this);
}
-
- private boolean appendHandlerName(MessageContext msgContext, String handlerMsg)
- {
- try
- {
- SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
- SOAPElement soapElement = (SOAPElement)soapMessage.getSOAPBody().getChildElements().next();
- if (soapElement.getElementQName().getLocalPart().startsWith("echo"))
- {
- soapElement = (SOAPElement)soapElement.getChildElements().next();
- String value = soapElement.getValue();
- soapElement.setValue(value + ":" + handlerMsg);
- }
- return true;
- }
- catch (SOAPException ex)
- {
- throw new WebServiceException(ex);
- }
- }
}
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java 2007-03-13 21:36:47 UTC (rev 2614)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -33,13 +33,4 @@
{
@WebMethod
public String echo(String msg);
-
- @WebMethod
- public String getPostConstruct();
-
- @WebMethod
- public String getPreDestroy();
-
- @WebMethod
- public String getClose();
}
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpointBean.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpointBean.java 2007-03-13 21:36:47 UTC (rev 2614)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpointBean.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -42,27 +42,6 @@
public String echo(String msg)
{
log.info("echo: " + msg);
- return msg + ":endpoint";
+ return msg;
}
-
- @WebMethod
- public String getPostConstruct()
- {
- log.info("getPostConstruct: " + LifecycleHandler.postConstructMsg);
- return LifecycleHandler.postConstructMsg;
- }
-
- @WebMethod
- public String getPreDestroy()
- {
- log.info("getPreDestroy: " + LifecycleHandler.preDestroyMsg);
- return LifecycleHandler.postConstructMsg;
- }
-
- @WebMethod
- public String getClose()
- {
- log.info("getClose: " + LifecycleHandler.closeMsg);
- return LifecycleHandler.closeMsg;
- }
}
Added: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java (rev 0)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -0,0 +1,125 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.handlerlifecycle;
+
+// $Id$
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.logging.Logger;
+
+public class ServletClient extends HttpServlet
+{
+ private static Logger log = Logger.getLogger(ServletClient.class);
+
+ private SOAPEndpoint port;
+ private TrackerEndpoint trackerPort;
+
+ public void init(ServletConfig config) throws ServletException
+ {
+ super.init(config);
+
+ try
+ {
+ if (port == null)
+ {
+ URL wsdlURL = new URL("http://localhost:8080/jaxws-handlerlifecycle/soap?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerlifecycle", "SOAPEndpointService");
+ Service service = Service.create(wsdlURL, serviceName);
+ port = (SOAPEndpoint)service.getPort(SOAPEndpoint.class);
+ }
+ if (trackerPort == null)
+ {
+ URL wsdlURL = new URL("http://localhost:8080/jaxws-handlerlifecycle/tracker?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/handlerlifecycle", "TrackerEndpointService");
+ Service service = Service.create(wsdlURL, serviceName);
+ trackerPort = (TrackerEndpoint)service.getPort(TrackerEndpoint.class);
+ }
+ }
+ catch (MalformedURLException ex)
+ {
+ throw new ServletException(ex);
+ }
+ }
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ String message;
+ try
+ {
+ String methodName = req.getParameter("method");
+ Method method = getClass().getMethod(methodName, new Class[]{});
+ method.invoke(this, new Object[]{});
+ message = "pass";
+ }
+ catch (Exception ex)
+ {
+ log.error(ex);
+ message = ex.toString();
+ }
+
+ res.getWriter().println(message);
+ }
+
+ public void testClientAccess() throws Exception
+ {
+ String retStr = port.echo("hello");
+ assertEquals("hello", retStr);
+ }
+
+ public void testTrackerMessages() throws Exception
+ {
+ String retStr = HandlerTracker.getListMessages();
+ assertEquals("[ClientHandler:PostConstruct, ClientHandler:OutBound, ClientHandler:InBound, ClientHandler:Close]", retStr);
+
+ retStr = trackerPort.getListMessages();
+ assertEquals("[ServerHandler:PostConstruct, ServerHandler:InBound, ServerHandler:OutBound, ServerHandler:Close]", retStr);
+
+ }
+
+ public void testClearTrackerData() throws Exception
+ {
+ HandlerTracker.clearListMessages();
+ trackerPort.clearListMessages();
+
+ assertEquals("[]", HandlerTracker.getListMessages());
+ assertEquals("[]", trackerPort.getListMessages());
+ }
+
+ private void assertEquals(String exp, String was)
+ {
+ if (exp.equals(was) == false)
+ throw new RuntimeException("Expected <" + exp + "> but was <" + was + ">");
+ }
+}
Property changes on: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/ServletClient.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpoint.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpoint.java (rev 0)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpoint.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.handlerlifecycle;
+
+// $Id$
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+@WebService
+@SOAPBinding(style = Style.RPC)
+public interface TrackerEndpoint
+{
+ @WebMethod
+ public String getListMessages();
+
+ @WebMethod
+ public void clearListMessages();
+}
Property changes on: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpointBean.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpointBean.java (rev 0)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpointBean.java 2007-03-14 09:24:03 UTC (rev 2615)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.handlerlifecycle;
+
+// $Id$
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+
+@WebService(name = "TrackerEndpoint", targetNamespace = "http://org.jboss.ws/jaxws/handlerlifecycle")
+@SOAPBinding(style = Style.RPC)
+public class TrackerEndpointBean
+{
+ @WebMethod
+ public String getListMessages()
+ {
+ return HandlerTracker.getListMessages();
+ }
+
+ @WebMethod
+ public void clearListMessages()
+ {
+ HandlerTracker.clearListMessages();
+ }
+}
Property changes on: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/TrackerEndpointBean.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/ServletClient/WEB-INF/web.xml
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/ServletClient/WEB-INF/web.xml (rev 0)
+++ trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/ServletClient/WEB-INF/web.xml 2007-03-14 09:24:03 UTC (rev 2615)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <servlet>
+ <servlet-name>ServletClient</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.handlerlifecycle.ServletClient</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>ServletClient</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
Property changes on: trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/ServletClient/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/WEB-INF/web.xml
===================================================================
--- trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/WEB-INF/web.xml 2007-03-13 21:36:47 UTC (rev 2614)
+++ trunk/jbossws-tests/src/resources/jaxws/handlerlifecycle/WEB-INF/web.xml 2007-03-14 09:24:03 UTC (rev 2615)
@@ -6,14 +6,22 @@
version="2.4">
<servlet>
- <servlet-name>TestService</servlet-name>
+ <servlet-name>SOAPEndpoint</servlet-name>
<servlet-class>org.jboss.test.ws.jaxws.handlerlifecycle.SOAPEndpointBean</servlet-class>
</servlet>
+ <servlet>
+ <servlet-name>TrackerEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.handlerlifecycle.TrackerEndpointBean</servlet-class>
+ </servlet>
<servlet-mapping>
- <servlet-name>TestService</servlet-name>
- <url-pattern>/*</url-pattern>
+ <servlet-name>SOAPEndpoint</servlet-name>
+ <url-pattern>/soap</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>TrackerEndpoint</servlet-name>
+ <url-pattern>/tracker</url-pattern>
+ </servlet-mapping>
</web-app>
17 years, 9 months
JBossWS SVN: r2614 - trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-03-13 17:36:47 -0400 (Tue, 13 Mar 2007)
New Revision: 2614
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
Log:
Fix regression
Modified: trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-03-13 21:17:25 UTC (rev 2613)
+++ trunk/jbossws-core/src/java/org/jboss/ws/tools/wsdl/WSDL11Reader.java 2007-03-13 21:36:47 UTC (rev 2614)
@@ -729,7 +729,7 @@
// Add the fault refererence to the operation
WSDLInterfaceOperationOutfault opOutFault = new WSDLInterfaceOperationOutfault(destOperation);
- opOutFault.setRef(new QName(destWsdl.getTargetNamespace(), faultName));
+ opOutFault.setRef(destFault.getName());
destOperation.addOutfault(opOutFault);
}
17 years, 9 months
JBossWS SVN: r2613 - trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-13 17:17:25 -0400 (Tue, 13 Mar 2007)
New Revision: 2613
Added:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml
Modified:
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java
trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java
Log:
test handler lifecycle on the client side
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java 2007-03-13 20:43:54 UTC (rev 2612)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/HandlerLifecycleTestCase.java 2007-03-13 21:17:25 UTC (rev 2613)
@@ -24,9 +24,14 @@
// $Id$
import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.namespace.QName;
+import javax.xml.ws.Binding;
+import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
+import javax.xml.ws.handler.Handler;
import junit.framework.Test;
@@ -62,13 +67,16 @@
public void testClientAccess() throws Exception
{
String retStr = port.echo("hello");
- StringBuffer expStr = new StringBuffer("hello:InBound:ServerHandler:endpoint:OutBound:ServerHandler");
+ StringBuffer expStr = new StringBuffer("hello:OutBound:ClientHandler:InBound:ServerHandler:endpoint:OutBound:ServerHandler:InBound:ClientHandler");
assertEquals(expStr.toString(), retStr);
}
public void testPostConstruct() throws Exception
{
- String retStr = port.getPostConstruct();
+ String retStr = LifecycleHandler.postConstructMsg;
+ assertEquals("PostConstruct:ClientHandler", retStr);
+
+ retStr = port.getPostConstruct();
assertEquals("PostConstruct:ServerHandler", retStr);
}
@@ -82,7 +90,10 @@
public void testClose() throws Exception
{
- String retStr = port.getClose();
+ String retStr = LifecycleHandler.closeMsg;
+ assertEquals("Close:ClientHandler", retStr);
+
+ retStr = port.getClose();
assertEquals("Close:ServerHandler", retStr);
}
}
Modified: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java 2007-03-13 20:43:54 UTC (rev 2612)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/SOAPEndpoint.java 2007-03-13 21:17:25 UTC (rev 2613)
@@ -23,10 +23,12 @@
//$Id$
+import javax.jws.HandlerChain;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
+@HandlerChain(file = "jaxws-client-handlers.xml")
public interface SOAPEndpoint
{
@WebMethod
Added: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml
===================================================================
--- trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml (rev 0)
+++ trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml 2007-03-13 21:17:25 UTC (rev 2613)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ns1="http://org.jboss.ws/jaxws/handlerscope"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
+
+ <handler-chain>
+ <handler>
+ <handler-name> ClientHandler </handler-name>
+ <handler-class> org.jboss.test.ws.jaxws.handlerlifecycle.LifecycleHandler </handler-class>
+ </handler>
+ </handler-chain>
+
+</handler-chains>
\ No newline at end of file
Property changes on: trunk/jbossws-tests/src/java/org/jboss/test/ws/jaxws/handlerlifecycle/jaxws-client-handlers.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 9 months
JBossWS SVN: r2612 - in branches/dlofthouse/JBWS-1464/jbossws-tests/src: java/org/jboss/test/ws/tools/jbws1464 and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2007-03-13 16:43:54 -0400 (Tue, 13 Mar 2007)
New Revision: 2612
Added:
branches/dlofthouse/JBWS-1464/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1464/
branches/dlofthouse/JBWS-1464/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1464/JBWS1464TestCase.java
branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/
branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/
branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/PhotoAlbum.wsdl
branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/wstools-config.xml
branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/wrapped/
Log:
Initial test case.
Added: branches/dlofthouse/JBWS-1464/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1464/JBWS1464TestCase.java
===================================================================
--- branches/dlofthouse/JBWS-1464/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1464/JBWS1464TestCase.java (rev 0)
+++ branches/dlofthouse/JBWS-1464/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1464/JBWS1464TestCase.java 2007-03-13 20:43:54 UTC (rev 2612)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.tools.jbws1464;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.tools.fixture.JBossSourceComparator;
+import org.jboss.test.ws.tools.validation.JaxrpcMappingValidator;
+import org.jboss.ws.tools.WSTools;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 6 Mar 2007
+ */
+public class JBWS1464TestCase extends JBossWSTest
+{
+
+ /**
+ * Test generation with parameter-style set to 'bare'.
+ *
+ * @throws Exception
+ */
+ public void testGenerateBare() throws Exception
+ {
+ generateScenario("bare");
+ }
+
+ protected void generateScenario(final String scenario) throws Exception
+ {
+ String resourceDir = "resources/tools/jbws1464/" + scenario;
+ String toolsDir = "tools/jbws1464/" + scenario;
+ String[] args = new String[] { "-dest", toolsDir, "-config", resourceDir + "/wstools-config.xml" };
+ new WSTools().generate(args);
+
+ if (true)
+ return;
+
+ File resourceDirFile = new File(resourceDir);
+ String[] expectedFiles = resourceDirFile.list(new FilenameFilter() {
+ public boolean accept(File dir, String name)
+ {
+ return name.endsWith(".java");
+ }
+ });
+
+ for (int i = 0; i < expectedFiles.length; i++)
+ {
+ String currentFile = expectedFiles[i];
+
+ try
+ {
+ compareSource(resourceDir + "/" + currentFile, toolsDir + "/org/jboss/test/ws/jbws1464/" + currentFile);
+ }
+ catch (Exception e)
+ {
+ throw new Exception("Validation of '" + currentFile + "' failed.", e);
+ }
+ }
+
+ File packageDir = new File(toolsDir + "/org/jboss/test/ws/jbws1464");
+ String[] generatedFiles = packageDir.list();
+ for (int i = 0; i < generatedFiles.length; i++)
+ {
+ String currentFile = generatedFiles[i];
+
+ boolean matched = "PhoneBookService.java".equals(currentFile);
+
+ for (int j = 0; j < expectedFiles.length && (matched == false); j++)
+ matched = currentFile.equals(expectedFiles[j]);
+
+ assertTrue("File '" + currentFile + "' was not expected to be generated", matched);
+ }
+
+ JaxrpcMappingValidator mappingValidator = new JaxrpcMappingValidator();
+ mappingValidator.validate(resourceDir + "/jaxrpc-mapping.xml", toolsDir + "/jaxrpc-mapping.xml");
+ }
+
+ private static void compareSource(final String expectedName, final String generatedName) throws Exception
+ {
+ File expected = new File(expectedName);
+ File generated = new File(generatedName);
+
+ JBossSourceComparator sc = new JBossSourceComparator(expected, generated);
+ sc.validate();
+ sc.validateImports();
+ }
+
+}
Property changes on: branches/dlofthouse/JBWS-1464/jbossws-tests/src/java/org/jboss/test/ws/tools/jbws1464/JBWS1464TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/PhotoAlbum.wsdl
===================================================================
--- branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/PhotoAlbum.wsdl (rev 0)
+++ branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/PhotoAlbum.wsdl 2007-03-13 20:43:54 UTC (rev 2612)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name='PhotoAlbum'
+ targetNamespace='http://test.jboss.org/ws/jbws1464'
+ xmlns='http://schemas.xmlsoap.org/wsdl/'
+ xmlns:ns1='http://test.jboss.org/ws/jbws1464/types'
+ xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
+ xmlns:tns='http://test.jboss.org/ws/jbws1464'
+ xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <schema targetNamespace='http://test.jboss.org/ws/jbws1464/types'
+ xmlns='http://www.w3.org/2001/XMLSchema'
+ xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
+ xmlns:tns='http://test.jboss.org/ws/jbws1464/types'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xmlns:xmime='http://www.w3.org/2005/05/xmlmime'>
+
+ <import schemaLocation="http://www.w3.org/2005/05/xmlmime" namespace="http://www.w3.org/2005/05/xmlmime"/>
+
+ <complexType name='Photo'>
+ <sequence>
+ <element name='caption' nillable='true' type='string'/>
+ <element name='image' xmime:contentType='text/xml' type='xmime:base64Binary'/>
+ </sequence>
+ </complexType>
+ <element name='publishPhoto' type='tns:Photo'/>
+ <element name='publishPhotoResponse' type='int'/>
+ </schema>
+ </types>
+ <message name='AlbumEndpoint_publishPhoto'>
+ <part element='ns1:publishPhoto' name='publishPhoto'/>
+ </message>
+ <message name='AlbumEndpoint_publishPhotoResponse'>
+ <part element='ns1:publishPhotoResponse' name='publishPhotoResponse'/>
+ </message>
+ <portType name='AlbumEndpoint'>
+ <operation name='publishPhoto' parameterOrder='publishPhoto'>
+ <input message='tns:AlbumEndpoint_publishPhoto'/>
+ <output message='tns:AlbumEndpoint_publishPhotoResponse'/>
+ </operation>
+ </portType>
+ <binding name='AlbumEndpointBinding' type='tns:AlbumEndpoint'>
+ <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='publishPhoto'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='PhotoAlbum'>
+ <port binding='tns:AlbumEndpointBinding' name='AlbumEndpointPort'>
+ <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Property changes on: branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/PhotoAlbum.wsdl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/wstools-config.xml
===================================================================
--- branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/wstools-config.xml (rev 0)
+++ branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/wstools-config.xml 2007-03-13 20:43:54 UTC (rev 2612)
@@ -0,0 +1,5 @@
+<configuration>
+ <wsdl-java location="resources/tools/jbws1464/bare/PhotoAlbum.wsdl" parameter-style="bare">
+ <mapping file="jaxrpc-mapping.xml"/>
+ </wsdl-java>
+</configuration>
Property changes on: branches/dlofthouse/JBWS-1464/jbossws-tests/src/resources/tools/jbws1464/bare/wstools-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 9 months
JBossWS SVN: r2611 - trunk/build.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-13 15:47:20 -0400 (Tue, 13 Mar 2007)
New Revision: 2611
Modified:
trunk/build/version.properties
Log:
Use 2.0.0.DEV
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-03-13 18:23:25 UTC (rev 2610)
+++ trunk/build/version.properties 2007-03-13 19:47:20 UTC (rev 2611)
@@ -5,7 +5,7 @@
specification.vendor=JBoss (http://www.jboss.org)
specification.version=jbossws-1.2
-version.id=2.0.0.CR5
+version.id=2.0.0.DEV
repository.id=2.0.0.CR5
implementation.title=JBoss Web Services (JBossWS)
17 years, 9 months
JBossWS SVN: r2610 - trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-03-13 14:23:25 -0400 (Tue, 13 Mar 2007)
New Revision: 2610
Modified:
trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java
Log:
Implement jaxws handler lifecycle close(), @PostConstruct
Modified: trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java
===================================================================
--- trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java 2007-03-13 18:20:48 UTC (rev 2609)
+++ trunk/integration-jboss42/src/java/org/jboss/ws/integration/jboss42/ServiceEndpointInvokerEJB21.java 2007-03-13 18:23:25 UTC (rev 2610)
@@ -221,8 +221,7 @@
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
public void closeHandlerChain(ServiceEndpointInfo seInfo)
{
- if (type == HandlerType.PRE)
- handlerDelegate.closeHandlerChain(seInfo);
+ handlerDelegate.closeHandlerChain(seInfo);
}
/** Handlers are beeing called through the HandlerCallback from the EJB interceptor */
17 years, 9 months