[jbossws-commits] JBossWS SVN: r11646 - in container/jboss60/branches: jbossws-jboss600M2 and 26 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Feb 19 12:02:43 EST 2010


Author: alessio.soldano at jboss.com
Date: 2010-02-19 12:02:40 -0500 (Fri, 19 Feb 2010)
New Revision: 11646

Added:
   container/jboss60/branches/jbossws-jboss600M2/
   container/jboss60/branches/jbossws-jboss600M2/.classpath
   container/jboss60/branches/jbossws-jboss600M2/.project
   container/jboss60/branches/jbossws-jboss600M2/eclipse/
   container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-format.xml
   container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-style.xml
   container/jboss60/branches/jbossws-jboss600M2/pom.xml
   container/jboss60/branches/jbossws-jboss600M2/src/
   container/jboss60/branches/jbossws-jboss600M2/src/main/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.deployer/
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.deployer/META-INF/
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentModelFactory
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.ioc.IoCContainerProxyFactory
   container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory
   container/jboss60/branches/jbossws-jboss600M2/src/main/scripts/
   container/jboss60/branches/jbossws-jboss600M2/src/main/scripts/assembly-resources.xml
Log:
[JBWS-2895] Adding container integration for AS 6.0.0.M2


Added: container/jboss60/branches/jbossws-jboss600M2/.classpath
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/.classpath	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/.classpath	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources/jbossws-jboss.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: container/jboss60/branches/jbossws-jboss600M2/.project
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/.project	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/.project	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jbossws-jboss600M2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-format.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-format.xml	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-format.xml	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Downloaded JBoss Eclipse Format from http://docs.jboss.org/process-guide/en/html/coding.html -->
+<profiles version="6">
+<profile name="JBoss" version="6">
+<setting id="comment_clear_blank_lines" value="false"/>
+<setting id="comment_format_comments" value="false"/>
+<setting id="comment_format_header" value="false"/>
+<setting id="comment_format_html" value="true"/>
+<setting id="comment_format_source_code" value="true"/>
+<setting id="comment_indent_parameter_description" value="true"/>
+<setting id="comment_indent_root_tags" value="true"/>
+<setting id="comment_line_length" value="80"/>
+<setting id="comment_new_line_for_parameter" value="true"/>
+<setting id="comment_separate_root_tags" value="true"/>
+<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_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="52"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="48"/>
+<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="64"/>
+<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="64"/>
+<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="1"/>
+<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_anonymous_type_declaration" value="next_line"/>
+<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="next_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="end_of_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_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.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_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.insert_new_line_after_opening_brace_in_array_initializer" 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_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_assignment_operator" value="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_brace_in_block" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="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_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_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_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_superinterfaces" value="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not 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_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_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_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_assignment_operator" 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_brace_in_array_initializer" value="do not 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_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_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="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="insert"/>
+<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="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_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_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_superinterfaces" value="do not 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="do not 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_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_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_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_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_constructor_declaration" 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="false"/>
+<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="120"/>
+<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="false"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
+<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="3"/>
+</profile>
+</profiles>


Property changes on: container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-format.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-style.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-style.xml	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-style.xml	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    This configuration file was written by the eclipse-cs plugin configuration editor
+-->
+<!--
+    Checkstyle-Configuration: jboss-checkstyle
+    Description: none
+-->
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<module name="Checker">
+    <property name="severity" value="warning"/>
+    <module name="TreeWalker">
+        <module name="ModifierOrder"/>
+        <module name="RedundantModifier"/>
+        <module name="AnonInnerLength"/>
+        <module name="ExecutableStatementCount">
+            <property name="max" value="60"/>
+            <property name="tokens" value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/>
+        </module>
+        <module name="LineLength">
+            <property name="max" value="168"/>
+            <property name="tabWidth" value="3"/>
+        </module>
+        <module name="MethodLength"/>
+        <module name="ParameterNumber"/>
+        <module name="AvoidStarImport"/>
+        <module name="IllegalImport"/>
+        <module name="ImportOrder"/>
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
+        <module name="AbstractClassName"/>
+        <module name="ConstantName"/>
+        <module name="LocalFinalVariableName"/>
+        <module name="LocalVariableName"/>
+        <module name="MemberName"/>
+        <module name="MethodName"/>
+        <module name="PackageName"/>
+        <module name="ParameterName"/>
+        <module name="StaticVariableName"/>
+        <module name="TypeName"/>
+        <module name="CovariantEquals"/>
+        <module name="DefaultComesLast"/>
+        <module name="DeclarationOrder"/>
+        <module name="DoubleCheckedLocking"/>
+        <module name="EqualsHashCode"/>
+        <module name="ExplicitInitialization"/>
+        <module name="FallThrough"/>
+        <module name="FinalLocalVariable"/>
+        <module name="IllegalInstantiation"/>
+        <module name="IllegalType">
+            <property name="tokens" value="METHOD_DEF,PARAMETER_DEF"/>
+        </module>
+        <module name="InnerAssignment"/>
+        <module name="MagicNumber">
+            <property name="ignoreNumbers" value="-1, 0, 1"/>
+        </module>
+        <module name="MissingCtor"/>
+        <module name="MissingSwitchDefault"/>
+        <module name="ModifiedControlVariable"/>
+        <module name="MultipleStringLiterals"/>
+        <module name="MultipleVariableDeclarations"/>
+        <module name="NestedIfDepth"/>
+        <module name="NestedTryDepth"/>
+        <module name="PackageDeclaration"/>
+        <module name="ParameterAssignment"/>
+        <module name="RedundantThrows">
+            <property name="logLoadErrors" value="true"/>
+            <property name="suppressLoadErrors" value="true"/>
+        </module>
+        <module name="RequireThis"/>
+        <module name="ReturnCount">
+            <property name="max" value="5"/>
+        </module>
+        <module name="SimplifyBooleanExpression"/>
+        <module name="SimplifyBooleanReturn"/>
+        <module name="StringLiteralEquality"/>
+        <module name="SuperClone"/>
+        <module name="SuperFinalize"/>
+        <module name="ArrayTrailingComma"/>
+        <module name="UnnecessaryParentheses"/>
+        <module name="DesignForExtension"/>
+        <module name="FinalClass"/>
+        <module name="HideUtilityClassConstructor"/>
+        <module name="InterfaceIsType"/>
+        <module name="ThrowsCount"/>
+        <module name="VisibilityModifier"/>
+        <module name="MutableException"/>
+        <module name="EmptyBlock"/>
+        <module name="LeftCurly">
+            <property name="option" value="nl"/>
+            <property name="maxLineLength" value="120"/>
+        </module>
+        <module name="RightCurly">
+            <property name="option" value="alone"/>
+        </module>
+        <module name="EmptyForInitializerPad">
+            <property name="option" value="space"/>
+        </module>
+        <module name="EmptyForIteratorPad">
+            <property name="option" value="space"/>
+        </module>
+        <module name="NoWhitespaceAfter"/>
+        <module name="NoWhitespaceBefore"/>
+        <module name="OperatorWrap">
+            <property name="option" value="eol"/>
+            <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,SL,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN"/>
+        </module>
+        <module name="MethodParamPad">
+            <property name="allowLineBreaks" value="true"/>
+        </module>
+        <module name="TabCharacter"/>
+        <module name="TypecastParenPad">
+            <property name="tokens" value="RPAREN,TYPECAST"/>
+        </module>
+        <module name="WhitespaceAround">
+            <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
+        </module>
+        <module name="NeedBraces"/>
+        <module name="WhitespaceAfter">
+            <property name="tokens" value="COMMA,SEMI"/>
+        </module>
+        <module name="BooleanExpressionComplexity"/>
+        <module name="ClassDataAbstractionCoupling"/>
+        <module name="ClassFanOutComplexity"/>
+        <module name="CyclomaticComplexity"/>
+        <module name="JavaNCSS"/>
+        <module name="NPathComplexity"/>
+        <module name="UncommentedMain"/>
+        <module name="TodoComment"/>
+        <module name="TrailingComment"/>
+        <module name="Indentation">
+            <property name="basicOffset" value="3"/>
+            <property name="caseIndent" value="3"/>
+        </module>
+        <module name="FinalParameters"/>
+        <module name="ArrayTypeStyle"/>
+        <module name="JavadocMethod">
+            <property name="allowUndeclaredRTE" value="true"/>
+            <property name="logLoadErrors" value="true"/>
+        </module>
+        <module name="JavadocStyle"/>
+        <module name="JavadocType"/>
+        <module name="JavadocVariable"/>
+        <module name="WriteTag"/>
+        <module name="SuperFinalize"/>
+    </module>
+    <module name="NewlineAtEndOfFile"/>
+</module>


Property changes on: container/jboss60/branches/jbossws-jboss600M2/eclipse/jboss-style.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/pom.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/pom.xml	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/pom.xml	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,228 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <name>JBoss Web Services - Container JBoss-6.0.0.M2</name>
+  <groupId>org.jboss.ws</groupId>
+  <artifactId>jbossws-jboss600M2</artifactId>
+
+  <version>3.3.0-SNAPSHOT</version>
+
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jboss.ws</groupId>
+    <artifactId>jbossws-parent</artifactId>
+    <version>1.0.4.GA</version>
+  </parent>
+
+  <!-- Source Control Management -->
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossws/container/jboss60/branches/jbossws-jboss600M2</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossws/container/jboss60/branches/jbossws-jboss600M2</developerConnection>
+    <url>http://fisheye.jboss.com/viewrep/JBossWS/container/jboss50/branches/jbossws-jboss510</url>
+  </scm>
+
+  <!-- Properties -->
+  <properties>
+    <jbossws.common.version>1.3.0-SNAPSHOT</jbossws.common.version>
+    <jbossws.spi.version>1.3.0-SNAPSHOT</jbossws.spi.version>
+
+    <!--
+      JBoss component versions taken from
+      http://repository.jboss.org/maven2/org/jboss/jbossas/jboss-as-component-matrix/6.0.0.20100216-M2/jboss-as-component-matrix-6.0.0.20100216-M2.pom
+    -->
+    <jboss.version>6.0.0.20100216-M2</jboss.version>
+    <jboss.ejb3.version>1.2.2</jboss.ejb3.version>
+    <jboss.deployers.version>2.2.0.Alpha1</jboss.deployers.version>
+    <jboss.jbossxb.version>2.0.2.Beta3</jboss.jbossxb.version>
+    <jboss.metadata.version>2.0.0-alpha-10</jboss.metadata.version>
+    <jboss.reflect.version>2.0.2.GA</jboss.reflect.version>
+    <jboss.security.version>2.0.3.SP1</jboss.security.version>
+    <jboss.vfs.version>2.2.0.Alpha2</jboss.vfs.version>
+    <jboss.cl.version>2.2.0.Alpha2</jboss.cl.version>
+  </properties>
+
+  <!-- DependencyManagement -->
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.jboss.ws</groupId>
+        <artifactId>jbossws-common</artifactId>
+        <version>${jbossws.common.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.ws</groupId>
+        <artifactId>jbossws-spi</artifactId>
+        <version>${jbossws.spi.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.cl</groupId>
+        <artifactId>jboss-classloading</artifactId>
+        <version>${jboss.cl.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-reflect</artifactId>
+        <version>${jboss.reflect.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-vfs</artifactId>
+        <version>${jboss.vfs.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jbossxb</artifactId>
+        <version>${jboss.jbossxb.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.deployers</groupId>
+        <artifactId>jboss-deployers-structure-spi</artifactId>
+        <version>${jboss.deployers.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.ejb3</groupId>
+        <artifactId>jboss-ejb3-core</artifactId>
+        <version>${jboss.ejb3.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-server</artifactId>
+        <version>${jboss.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.jbossas</groupId>
+        <artifactId>jboss-as-system-jmx</artifactId>
+        <version>${jboss.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.metadata</groupId>
+        <artifactId>jboss-metadata-common</artifactId>
+        <version>${jboss.metadata.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-jaxws</artifactId>
+          </exclusion>
+            <exclusion>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-jaxrpc</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.security</groupId>
+        <artifactId>jboss-security-spi</artifactId>
+        <version>${jboss.security.version}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <!-- Dependencies -->
+  <dependencies>
+
+    <!-- jbossws dependencies -->
+    <dependency>
+      <groupId>org.jboss.ws</groupId>
+      <artifactId>jbossws-common</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.ws</groupId>
+      <artifactId>jbossws-spi</artifactId>
+    </dependency>
+
+    <!-- jboss provided dependencies -->
+    <dependency>
+      <groupId>javax.xml.ws</groupId>
+      <artifactId>jaxws-api</artifactId>
+      <version>2.1</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>javax.jws</groupId>
+      <artifactId>jsr181-api</artifactId>
+      <version>1.0-MR1</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-server</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-system-jmx</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-structure-spi</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.ejb3</groupId>
+      <artifactId>jboss-ejb3-core</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.security</groupId>
+      <artifactId>jboss-security-spi</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- transitive dependencies -->
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.cl</groupId>
+      <artifactId>jboss-classloading</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-reflect</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jbossxb</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.metadata</groupId>
+      <artifactId>jboss-metadata-common</artifactId>
+    </dependency>
+  </dependencies>
+
+  <!-- Plugins -->
+  <build>
+    <resources>
+      <resource>
+        <targetPath>../etc</targetPath>
+        <directory>src/main/etc</directory>
+        <filtering>true</filtering>
+      </resource>
+      <resource>
+        <directory>src/main/resources/jbossws-jboss.jar</directory>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <descriptors>
+                <descriptor>src/main/scripts/assembly-resources.xml</descriptor>
+              </descriptors>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>


Property changes on: container/jboss60/branches/jbossws-jboss600M2/pom.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.config;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+
+/**
+ * Retrieves webservices stack specific config from MC kernel.
+ *
+ * @author <a href="mailto:hbraun at redhat.com">Heiko Braun</a>
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class ServerConfigFactoryImpl extends ServerConfigFactory
+{
+   
+   /** The bean name in the kernel registry. */
+   private static final String BEAN_NAME = "WSServerConfig";
+
+   /**
+    * Constructor.
+    */
+   public ServerConfigFactoryImpl()
+   {
+      super();
+   }
+
+   /**
+    * Returns config registered in MC kernel.
+    * 
+    * @return config
+    */
+   public ServerConfig getServerConfig()
+   {
+      final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+      final IoCContainerProxyFactory iocContainerFactory = spiProvider.getSPI(IoCContainerProxyFactory.class);
+      final IoCContainerProxy iocContainer = iocContainerFactory.getContainer();
+      
+      return iocContainer.getBean(ServerConfigFactoryImpl.BEAN_NAME, ServerConfig.class);
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,118 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.config;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import javax.management.JMException;
+import javax.management.ObjectName;
+
+import org.jboss.wsf.common.management.AbstractServerConfig;
+import org.jboss.wsf.common.management.AbstractServerConfigMBean;
+
+/**
+ * AS specific ServerConfig.
+ *
+ * @author <a href="mailto:asoldano at redhat.com">Alessio Soldano</a>
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+public final class ServerConfigImpl extends AbstractServerConfig implements AbstractServerConfigMBean
+{
+
+   /**
+    * Constructor.
+    */
+   public ServerConfigImpl()
+   {
+      super();
+   }
+
+   /**
+    * Gets server temp directory.
+    * 
+    * @return temp directory
+    */
+   public File getServerTempDir()
+   {
+      return this.getDirFromServerConfig("ServerTempLocation");
+   }
+   
+   /**
+    * Gets server home directory.
+    * 
+    * @return home directory
+    */
+   public File getHomeDir()
+   {
+      return this.getDirFromServerConfig("JBossHome");
+   }
+
+   /**
+    * Gets server data directory.
+    * 
+    * @return data directory
+    */
+   public File getServerDataDir()
+   {
+      return this.getDirFromServerConfig("ServerDataLocation");
+   }
+   
+   /**
+    * Obtains the requested directory from the server configuration.
+    *
+    * @param attributeName directory attribute name
+    * @return requested directory
+    */
+   private File getDirFromServerConfig(final String attributeName)
+   {
+      // Define the ON to invoke upon
+      final ObjectName on = OBJECT_NAME_SERVER_CONFIG;
+
+      // Get the URL location
+      URL location = null;
+      try
+      {
+         location = (URL) this.getMbeanServer().getAttribute(on, attributeName);
+      }
+      catch (final JMException e)
+      {
+         throw new RuntimeException("Could not obtain attribute " + attributeName + " from " + on, e);
+      }
+
+      // Represent as a File
+      File dir = null;
+      try
+      {
+         dir = new File(location.toURI());
+      }
+      catch (final URISyntaxException urise)
+      {
+         throw new RuntimeException("Could not desired directory from URL: " + location, urise);
+      }
+
+      return dir;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * 
+ * @author alessio.soldano at jboss.com
+ * @since 17-Feb-2010
+ *
+ */
+class SecurityActions
+{
+   /**
+    * Get context classloader.
+    * 
+    * @return the current context classloader
+    */
+   static ClassLoader getContextClassLoader()
+   {
+      SecurityManager sm = System.getSecurityManager();
+      if (sm == null)
+      {
+         return Thread.currentThread().getContextClassLoader();
+      }
+      else
+      {
+         return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+            public ClassLoader run()
+            {
+               return Thread.currentThread().getContextClassLoader();
+            }
+         });
+      }
+   }
+   
+   /**
+    * Set context classloader.
+    *
+    * @param classLoader the classloader
+    */
+   static void setContextClassLoader(final ClassLoader classLoader)
+   {
+      if (System.getSecurityManager() == null)
+      {
+         Thread.currentThread().setContextClassLoader(classLoader);
+      }
+      else
+      {
+         AccessController.doPrivileged(new PrivilegedAction<Object>()
+         {
+            public Object run()
+            {
+               Thread.currentThread().setContextClassLoader(classLoader);
+               return null;
+            }
+         });
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/SecurityActions.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.deployers.plugins.deployers.DeployersImpl;
+import org.jboss.deployers.spi.deployer.Deployer;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+
+/**
+ * WSDeploymentAspectDeployer factory.
+ *
+ * @author <a href="ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class WSAspectizedDeployersFactory
+{
+
+   /** Logger. */
+   private static final Logger LOGGER = Logger.getLogger(WSAspectizedDeployersFactory.class);
+
+   /** Real deployers registry. */
+   private final DeployersImpl delegee;
+
+   /** Our deployers regitry. */
+   private final Map<DeploymentAspect, Deployer> deployersRegistry = new HashMap<DeploymentAspect, Deployer>();
+   
+   /**
+    * Constructor.
+    * 
+    * @param realDeployers real deployers registry
+    */
+   public WSAspectizedDeployersFactory(final DeployersImpl realDeployers)
+   {
+      this.delegee = realDeployers;
+   }
+
+   /**
+    * MC incallback method. It will be called each time DeploymentAspect bean will be installed.
+    * 
+    * @param aspect to create real WS aspectized deployer for
+    */
+   public void addDeployer(final DeploymentAspect aspect)
+   {
+      if (WSAspectizedDeployersFactory.LOGGER.isTraceEnabled())
+      {
+         WSAspectizedDeployersFactory.LOGGER.trace("Adding deployer for: " + aspect);
+      }
+      final Deployer wsAspectizedDeployer = new WSDeploymentAspectDeployer(aspect);
+
+      this.delegee.addDeployer(wsAspectizedDeployer);
+      this.deployersRegistry.put(aspect, wsAspectizedDeployer);
+   }
+
+   /**
+    * MC uncallback method. It will be called each time DeploymentAspect bean will be removed.
+    * 
+    * @param aspect to remove real WS aspectized deployer for
+    */
+   public void removeDeployer(final DeploymentAspect aspect)
+   {
+      if (WSAspectizedDeployersFactory.LOGGER.isTraceEnabled())
+      {
+         WSAspectizedDeployersFactory.LOGGER.trace("Removing deployer for: " + aspect);
+      }
+      final Deployer wsAspectizedDeployer = this.deployersRegistry.get(aspect);
+
+      this.deployersRegistry.remove(aspect);
+      this.delegee.removeDeployer(wsAspectizedDeployer);
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,167 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
+
+import java.util.Set;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+
+/**
+ * A deployer that delegates to JBossWS deployment aspect.
+ * 
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+final class WSDeploymentAspectDeployer extends AbstractRealDeployer
+{
+
+   /** JBossWS specific inputs/outputs prefix. */
+   private static final String JBOSSWS_ATTACHMENT_PREFIX = "jbossws.";
+
+   /** JBossWS specific metadata. */
+   private static final String JBOSSWS_METADATA = WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + "metadata";
+
+   /** Delegee. */
+   private final DeploymentAspect aspect;
+
+   /**
+    * Constructor.
+    * 
+    * @param aspect deployment aspect
+    */
+   WSDeploymentAspectDeployer(final DeploymentAspect aspect)
+   {
+      super();
+
+      // inputs
+      this.addInput(JBossWebMetaData.class);
+      this.addInput(Deployment.class);
+      if (aspect.isLast())
+      {
+         this.addInput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
+      }
+
+      // propagate DA requirements and map them to deployer inputs
+      final Set<String> inputs = aspect.getRequiresAsSet();
+      for (String input : inputs)
+      {
+         this.addInput(WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + input);
+      }
+
+      // outputs
+      this.addOutput(JBossWebMetaData.class);
+      if (!aspect.isLast())
+      {
+         this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
+      }
+
+      // propagate DA provides and map them to deployer outputs
+      final Set<String> outputs = aspect.getProvidesAsSet();
+      for (String output : outputs)
+      {
+         this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + output);
+      }
+
+      this.setRelativeOrder(aspect.getRelativeOrder());
+      this.aspect = aspect;
+   }
+
+   /**
+    * If deployed unit is related to web services this method delegates
+    * to deployment aspect and calls its create() and start() methods.
+    * 
+    * @param unit deployment unit
+    * @throws DeploymentException on deployment failure
+    */
+   @Override
+   protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
+   {
+      if (ASHelper.isWebServiceDeployment(unit))
+      {
+         this.log.debug(this.aspect + " start: " + unit.getName());
+         final Deployment dep = ASHelper.getRequiredAttachment(unit, Deployment.class);
+         if (this.aspect.canHandle(dep))
+         {
+            //set the context classloader using the proper one from the deployment aspect
+            ClassLoader deployerClassLoader = SecurityActions.getContextClassLoader();
+            try
+            {
+               SecurityActions.setContextClassLoader(this.aspect.getLoader());
+               this.aspect.start(dep);
+            }
+            finally
+            {
+               SecurityActions.setContextClassLoader(deployerClassLoader);
+            }
+         }
+      }
+   }
+
+   /**
+    * If undeployed unit is related to web services this method delegates
+    * to deployment aspect and calls its stop() and destroy() methods.
+    * 
+    * @param unit deployment unit
+    */
+   @Override
+   protected void internalUndeploy(final DeploymentUnit unit)
+   {
+      if (ASHelper.isWebServiceDeployment(unit))
+      {
+         this.log.debug(this.aspect + " stop: " + unit.getName());
+         final Deployment dep = ASHelper.getRequiredAttachment(unit, Deployment.class);
+         if (this.aspect.canHandle(dep))
+         {
+            //set the context classloader using the proper one from the deployment aspect
+            ClassLoader deployerClassLoader = SecurityActions.getContextClassLoader();
+            try
+            {
+               SecurityActions.setContextClassLoader(this.aspect.getLoader());
+               this.aspect.stop(dep);
+            }
+            finally
+            {
+               SecurityActions.setContextClassLoader(deployerClassLoader);
+            }
+         }
+      }
+   }
+
+   /**
+    * Displays also WS deployment aspect being wrapped.
+    * 
+    * @return deployer instance id including wrapped deployment aspect id.
+    */
+   @Override
+   public String toString()
+   {
+      final StringBuilder sb = new StringBuilder();
+      sb.append(super.toString()).append('(').append(this.aspect).append(')');
+      return sb.toString();
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.webservices.integration.deployers.deployment.WSDeploymentBuilder;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+
+/**
+ * This deployer initializes JBossWS deployment meta data. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class WSDeploymentDeployer extends AbstractRealDeployer
+{
+
+   /**
+    * Constructor.
+    */
+   public WSDeploymentDeployer()
+   {
+      super();
+
+      // inputs
+      this.addInput(JBossWebMetaData.class);
+      this.addInput(DeploymentType.class);
+
+      // outputs
+      this.addOutput(JBossWebMetaData.class);
+      this.addOutput(Deployment.class);
+   }
+
+   /**
+    * Creates new Web Service deployment and registers it with deployment unit.
+    * 
+    * @param unit deployment unit
+    * @throws DeploymentException if any error occurs
+    */
+   @Override
+   protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
+   {
+      this.log.trace("Building JBoss agnostic webservices meta data model");
+      WSDeploymentBuilder.getInstance().build(unit);
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
+
+import org.jboss.deployers.vfs.spi.deployer.ObjectModelFactoryDeployer;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+import org.jboss.xb.binding.ObjectModelFactory;
+
+/**
+ * webservices.xml deployer.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class WSDescriptorDeployer extends ObjectModelFactoryDeployer<WebservicesMetaData>
+{
+
+   /**
+    * Constructor.
+    */
+   public WSDescriptorDeployer()
+   {
+      super(WebservicesMetaData.class);
+   }
+
+   /**
+    * Model factory generator.
+    * 
+    * @param root object tree root
+    * @return object model factory
+    */
+   @Override
+   protected ObjectModelFactory getObjectModelFactory(final WebservicesMetaData root)
+   {
+      this.log.debug("Returning webservices descriptor factory");
+      return new WebservicesFactory(null);
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,281 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
+
+import java.lang.annotation.Annotation;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.naming.Context;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb.deployers.EjbDeployment;
+import org.jboss.ejb.deployers.MergedJBossMetaDataDeployer;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * WebServiceDeployment deployer processes EJB containers and its metadata and creates WS adapters wrapping it.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class WSEJBAdapterDeployer extends AbstractRealDeployer
+{
+
+   /**
+    * Constructor.
+    */
+   public WSEJBAdapterDeployer()
+   {
+      super();
+
+      // inputs
+      this.addInput(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
+      this.addInput(EjbDeployment.class);
+      this.addInput(Ejb3Deployment.class);
+      this.addInput(WebservicesMetaData.class);
+
+      // outputs
+      this.addOutput(WebServiceDeployment.class);
+   }
+
+   /**
+    * Deploys WebServiceDeployment meta data.
+    * 
+    * @param unit deployment unit
+    * @throws DeploymentException exception
+    */
+   @Override
+   protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
+   {
+      final JBossMetaData mergedMD = (JBossMetaData) unit
+            .getAttachment(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
+      final Ejb3Deployment ejb3Deployment = ASHelper.getOptionalAttachment(unit, Ejb3Deployment.class);
+
+      if (mergedMD != null)
+      {
+         final WebServiceDeploymentAdapter wsDeploymentAdapter = new WebServiceDeploymentAdapter();
+         final List<WebServiceDeclaration> endpoints = wsDeploymentAdapter.getServiceEndpoints();
+
+         for (final JBossEnterpriseBeanMetaData ejbMD : mergedMD.getEnterpriseBeans())
+         {
+            final String ejbName = ejbMD.determineContainerName();
+
+            if (ejbMD.getEjbClass() != null)
+            {
+               this.log.debug("Creating webservice EJB adapter for: " + ejbName);
+               final EJBContainer ejbContainer = this.getContainer(ejb3Deployment, ejbMD);
+               endpoints.add(new WebServiceDeclarationAdapter(ejbMD, ejbContainer, unit.getClassLoader()));
+            }
+            else
+            {
+               this.log.warn("Ingoring EJB deployment with null classname: " + ejbName);
+            }
+         }
+
+         unit.addAttachment(WebServiceDeployment.class, wsDeploymentAdapter);
+      }
+   }
+
+   /**
+    * Returns EJB container if EJB3 deployment is detected and EJB meta data does not represent entity bean.
+    * 
+    * @param ejb3Deployment EJB3 deployment meta data
+    * @param ejbMD EJB meta data
+    * @return EJB container or null if not EJB3 stateless bean
+    * @throws DeploymentException if some error occurs
+    */
+   private EJBContainer getContainer(final Ejb3Deployment ejb3Deployment, final JBossEnterpriseBeanMetaData ejbMD)
+         throws DeploymentException
+   {
+      if ((ejb3Deployment != null) && (!ejbMD.isEntity()))
+      {
+         try
+         {
+            final ObjectName objName = new ObjectName(ejbMD.determineContainerName());
+            return (EJBContainer) ejb3Deployment.getContainer(objName);
+         }
+         catch (MalformedObjectNameException e)
+         {
+            throw new DeploymentException(e);
+         }
+      }
+
+      return null;
+   }
+
+   /**
+    * Adopts EJB3 bean meta data to a
+    * {@link org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration}.
+    */
+   private static final class WebServiceDeclarationAdapter implements WebServiceDeclaration
+   {
+
+      /** EJB meta data. */
+      private final JBossEnterpriseBeanMetaData ejbMetaData;
+
+      /** EJB container. */
+      private final EJBContainer ejbContainer;
+
+      /** Class loader. */
+      private final ClassLoader loader;
+
+      /**
+       * Constructor.
+       * 
+       * @param ejbMetaData EJB metadata
+       * @param ejbContainer EJB container
+       * @param loader class loader
+       */
+      private WebServiceDeclarationAdapter(final JBossEnterpriseBeanMetaData ejbMetaData,
+            final EJBContainer ejbContainer, final ClassLoader loader)
+      {
+         super();
+
+         this.ejbMetaData = ejbMetaData;
+         this.ejbContainer = ejbContainer;
+         this.loader = loader;
+      }
+
+      /**
+       * Returns EJB container name.
+       *
+       * @return container name
+       */
+      public String getContainerName()
+      {
+         return this.ejbMetaData.determineContainerName();
+      }
+
+      /**
+       * Returns JNDI context associated with EJB container.
+       *
+       * @return JNDI context
+       */
+      public Context getContext()
+      {
+         return this.ejbContainer.getEnc();
+      }
+
+      /**
+       * Returns EJB name.
+       *
+       * @return name
+       */
+      public String getComponentName()
+      {
+         return this.ejbMetaData.getName();
+      }
+
+      /**
+       * Returns EJB class name.
+       *
+       * @return class name
+       */
+      public String getComponentClassName()
+      {
+         return this.ejbMetaData.getEjbClass();
+      }
+
+      /**
+       * Returns requested annotation associated with EJB container or EJB bean.
+       *
+       * @param annotationType annotation type
+       * @param <T> annotation class type
+       * @return requested annotation or null if not found
+       */
+      public <T extends Annotation> T getAnnotation(final Class<T> annotationType)
+      {
+         final boolean haveEjbContainer = this.ejbContainer != null;
+
+         if (haveEjbContainer)
+         {
+            return this.ejbContainer.getAnnotation(annotationType);
+         }
+         else
+         {
+            final Class<?> bean = this.getComponentClass();
+            return (T) bean.getAnnotation(annotationType);
+         }
+      }
+
+      /**
+       * Loads ejb class from associated loader.
+       *
+       * @return ejb class instance
+       */
+      private Class<?> getComponentClass()
+      {
+         try
+         {
+            return this.loader.loadClass(this.getComponentClassName());
+         }
+         catch (ClassNotFoundException cnfe)
+         {
+            throw new RuntimeException("Failed to load component class: " + this.getComponentClassName()
+                  + " from loader: " + this.loader);
+         }
+      }
+
+   }
+
+   /**
+    * Adopts an EJB deployment to a 
+    * {@link org.jboss.wsf.spi.deployment.integration.WebServiceDeployment}. 
+    */
+   private static final class WebServiceDeploymentAdapter implements WebServiceDeployment
+   {
+
+      /** List of endpoints. */
+      private final List<WebServiceDeclaration> endpoints = new ArrayList<WebServiceDeclaration>();
+
+      /**
+       * Constructor.
+       */
+      private WebServiceDeploymentAdapter()
+      {
+         super();
+      }
+
+      /**
+       * Returns endpoints list.
+       * 
+       * @return endpoints list
+       */
+      public List<WebServiceDeclaration> getServiceEndpoints()
+      {
+         return this.endpoints;
+      }
+
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,159 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * Detects Web Service deployment type.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class WSTypeDeployer extends AbstractRealDeployer
+{
+
+   /**
+    * Constructor.
+    */
+   public WSTypeDeployer()
+   {
+      super();
+
+      // inputs
+      this.addInput(JBossWebMetaData.class);
+      this.addInput(WebservicesMetaData.class);
+      this.addInput(WebServiceDeployment.class);
+
+      // outputs
+      this.addOutput(DeploymentType.class);
+      this.addOutput(JBossWebMetaData.class);
+   }
+
+   /**
+    * Detects WS deployment type and puts it to the deployment unit attachments.
+    * 
+    * @param unit deployment unit
+    * @throws DeploymentException on failure
+    */
+   @Override
+   protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
+   {
+      if (this.isJaxwsJseDeployment(unit))
+      {
+         this.log.debug("Detected JAXWS JSE deployment");
+         unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_JSE);
+      }
+      else if (this.isJaxwsEjbDeployment(unit))
+      {
+         this.log.debug("Detected JAXWS EJB3 deployment");
+         unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_EJB3);
+      }
+      else if (this.isJaxrpcJseDeployment(unit))
+      {
+         this.log.debug("Detected JAXRPC JSE deployment");
+         unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_JSE);
+      }
+      else if (this.isJaxrpcEjbDeployment(unit))
+      {
+         this.log.debug("Detected JAXRPC EJB21 deployment");
+         unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_EJB21);
+      }
+   }
+
+   /**
+    * Returns true if JAXRPC EJB deployment is detected.
+    * 
+    * @param unit deployment unit
+    * @return true if JAXRPC EJB, false otherwise
+    */
+   private boolean isJaxrpcEjbDeployment(final DeploymentUnit unit)
+   {
+      final boolean hasWebservicesMD = ASHelper.hasAttachment(unit, WebservicesMetaData.class);
+      final boolean hasJBossMD = unit.getAllMetaData(JBossMetaData.class).size() > 0;
+
+      return hasWebservicesMD && hasJBossMD;
+   }
+
+   /**
+    * Returns true if JAXRPC JSE deployment is detected.
+    * 
+    * @param unit deployment unit
+    * @return true if JAXRPC JSE, false otherwise
+    */
+   private boolean isJaxrpcJseDeployment(final DeploymentUnit unit)
+   {
+      final boolean hasWebservicesMD = ASHelper.hasAttachment(unit, WebservicesMetaData.class);
+      final boolean hasJBossWebMD = ASHelper.hasAttachment(unit, JBossWebMetaData.class);
+
+      if (hasWebservicesMD && hasJBossWebMD)
+      {
+         return ASHelper.getJaxrpcServlets(unit).size() > 0;
+      }
+
+      return false;
+   }
+
+   /**
+    * Returns true if JAXWS EJB deployment is detected.
+    * 
+    * @param unit deployment unit
+    * @return true if JAXWS EJB, false otherwise
+    */
+   private boolean isJaxwsEjbDeployment(final DeploymentUnit unit)
+   {
+      final boolean hasWSDeployment = ASHelper.hasAttachment(unit, WebServiceDeployment.class);
+
+      if (hasWSDeployment)
+      {
+         return ASHelper.getJaxwsEjbs(unit).size() > 0;
+      }
+
+      return false;
+   }
+
+   /**
+    * Returns true if JAXWS JSE deployment is detected.
+    * 
+    * @param unit deployment unit
+    * @return true if JAXWS JSE, false otherwise
+    */
+   private boolean isJaxwsJseDeployment(final DeploymentUnit unit)
+   {
+      final boolean hasJBossWebMD = ASHelper.hasAttachment(unit, JBossWebMetaData.class);
+
+      if (hasJBossWebMD)
+      {
+         return ASHelper.getJaxwsServlets(unit).size() > 0;
+      }
+
+      return false;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,198 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.serviceref.VirtualFileAdaptor;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.ResourceLoaderAdapter;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+
+/**
+ * Base class for all deployment model builders.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+abstract class AbstractDeploymentModelBuilder implements DeploymentModelBuilder
+{
+
+   /** WSDL, XSD and XML files filter. */
+   private static final WSVirtualFileFilter WS_FILE_FILTER = new WSVirtualFileFilter();
+
+   /** Logger. */
+   protected final Logger log = Logger.getLogger(this.getClass());
+
+   /** Deployment model factory. */
+   private final DeploymentModelFactory deploymentModelFactory;
+
+   /**
+    * Constructor.
+    */
+   protected AbstractDeploymentModelBuilder()
+   {
+      super();
+
+      // deployment factory
+      final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+      this.deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.deployers.deployment.DeploymentModelBuilder#newDeploymentModel(DeploymentUnit)
+    *
+    * @param unit deployment unit
+    */
+   public final void newDeploymentModel(final DeploymentUnit unit)
+   {
+      final ArchiveDeployment dep = this.newDeployment(unit);
+
+      this.build(dep, unit);
+
+      dep.addAttachment(DeploymentUnit.class, unit);
+      unit.addAttachment(Deployment.class, dep);
+   }
+
+   /**
+    * Template method for subclasses to implement.
+    *
+    * @param dep webservice deployment
+    * @param unit deployment unit
+    */
+   protected abstract void build(Deployment dep, DeploymentUnit unit);
+
+   /**
+    * Creates new Web Service endpoint.
+    *
+    * @param endpointClass endpoint class name
+    * @param endpointName endpoint name
+    * @param dep deployment
+    * @return WS endpoint
+    */
+   protected final Endpoint newEndpoint(final String endpointClass, final String endpointName, final Deployment dep)
+   {
+      if (endpointName == null)
+      {
+         throw new NullPointerException("Null endpoint name");
+      }
+
+      if (endpointClass == null)
+      {
+         throw new NullPointerException("Null endpoint class");
+      }
+
+      final Endpoint endpoint = this.deploymentModelFactory.newEndpoint(endpointClass);
+      endpoint.setShortName(endpointName);
+      dep.getService().addEndpoint(endpoint);
+
+      return endpoint;
+   }
+
+   /**
+    * Creates new Web Service deployment.
+    *
+    * @param unit deployment unit
+    * @return archive deployment
+    */
+   private ArchiveDeployment newDeployment(final DeploymentUnit unit)
+   {
+      this.log.debug("Creating new WS deployment model for: " + unit);
+      final ArchiveDeployment dep = this.newDeployment(unit.getSimpleName(), unit.getClassLoader());
+
+      if (unit instanceof VFSDeploymentUnit)
+      {
+         final VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit) unit;
+         final List<VirtualFile> virtualFiles = vfsUnit.getMetaDataFiles(AbstractDeploymentModelBuilder.WS_FILE_FILTER);
+         final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
+         for (VirtualFile vf : virtualFiles)
+         {
+            // Adding the roots of the virtual files.
+            try
+            {
+               uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));
+            }
+            catch (IOException ioe)
+            {
+               throw new WSFDeploymentException(ioe);
+            }
+         }
+         dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
+      }
+
+      if (unit.getParent() != null)
+      {
+         final String parentDeploymentName = unit.getParent().getSimpleName();
+         final ClassLoader parentClassLoader = unit.getParent().getClassLoader();
+
+         this.log.debug("Creating new WS deployment model for parent: " + unit.getParent());
+         final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
+         dep.setParent(parentDep);
+      }
+
+      if (unit instanceof VFSDeploymentUnit)
+      {
+         dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
+      }
+      else
+      {
+         dep.setRootFile(new ResourceLoaderAdapter(unit.getClassLoader()));
+      }
+      dep.setRuntimeClassLoader(unit.getClassLoader());
+      final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
+      dep.setType(deploymentType);
+
+      return dep;
+   }
+
+   /**
+    * Creates new archive deployment.
+    *
+    * @param name deployment name
+    * @param loader deployment loader
+    * @return new archive deployment
+    */
+   private ArchiveDeployment newDeployment(final String name, final ClassLoader loader)
+   {
+      return (ArchiveDeployment) this.deploymentModelFactory.newDeployment(name, loader);
+   }
+
+   /**
+    * Gets specified attachment from deployment unit. 
+    * Checks it's not null and then propagates it to <b>dep</b>
+    * attachments. Finally it returns attachment value.
+    *
+    * @param <A> class type
+    * @param attachment attachment
+    * @param unit deployment unit
+    * @param dep deployment
+    * @return attachment value if found in unit
+    */
+   protected final <A> A getAndPropagateAttachment(final Class<A> attachment, final DeploymentUnit unit,
+         final Deployment dep)
+   {
+      final A attachmentValue = ASHelper.getOptionalAttachment(unit, attachment);
+
+      if (attachmentValue != null)
+      {
+         dep.addAttachment(attachment, attachmentValue);
+         return attachmentValue;
+      }
+
+      throw new IllegalStateException("Deployment unit does not contain " + attachment);
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,20 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * Deployment builder interface.
+ * 
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+interface DeploymentModelBuilder
+{
+
+   /**
+    * Creates Web Service deployment model and associates it with deployment.
+    * 
+    * @param unit deployment unit
+    */
+   void newDeploymentModel(DeploymentUnit unit);
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilder.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,57 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * Creates new JAXRPC EJB21 deployment.
+ * 
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+final class DeploymentModelBuilderJAXRPC_EJB21 extends AbstractDeploymentModelBuilder
+{
+
+   /**
+    * Constructor.
+    */
+   DeploymentModelBuilderJAXRPC_EJB21()
+   {
+      super();
+   }
+
+   /**
+    * Creates new JAXRPC EJB21 deployment and registers it with deployment unit.
+    * 
+    * @param dep webservice deployment
+    * @param unit deployment unit
+    */
+   @Override
+   protected void build(final Deployment dep, final DeploymentUnit unit)
+   {
+      final JBossMetaData jbmd = this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
+      final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
+      this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
+
+      this.log.debug("Creating JAXRPC EJB21 endpoints meta data model");
+      for (final WebserviceDescriptionMetaData webserviceDescriptionMD : wsMetaData.getWebserviceDescriptions())
+      {
+         for (final PortComponentMetaData portComponentMD : webserviceDescriptionMD.getPortComponents())
+         {
+            final String ejbName = portComponentMD.getEjbLink();
+            this.log.debug("EJB21 name: " + ejbName);
+            final JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(ejbName);
+            final String ejbClass = beanMetaData.getEjbClass();
+            this.log.debug("EJB21 class: " + ejbClass);
+
+            this.newEndpoint(ejbClass, ejbName, dep);
+         }
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,56 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
+
+/**
+ * Creates new JAXRPC JSE deployment.
+ * 
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+final class DeploymentModelBuilderJAXRPC_JSE extends AbstractDeploymentModelBuilder
+{
+
+   /**
+    * Constructor.
+    */
+   DeploymentModelBuilderJAXRPC_JSE()
+   {
+      super();
+   }
+
+   /**
+    * Creates new JAXRPC JSE deployment and registers it with deployment unit.
+    * 
+    * @param dep webservice deployment
+    * @param unit deployment unit
+    */
+   @Override
+   protected void build(final Deployment dep, final DeploymentUnit unit)
+   {
+      final JBossWebMetaData webMetaData = this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
+      final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
+
+      this.log.debug("Creating JAXRPC JSE endpoints meta data model");
+      for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
+      {
+         for (PortComponentMetaData pcmd : wsd.getPortComponents())
+         {
+            final String servletName = pcmd.getServletLink();
+            this.log.debug("JSE name: " + servletName);
+            final ServletMetaData servletMD = ASHelper.getServletForName(webMetaData, servletName);
+            final String servletClass = ASHelper.getEndpointName(servletMD);
+            this.log.debug("JSE class: " + servletClass);
+
+            this.newEndpoint(servletClass, servletName, dep);
+         }
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,52 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+
+/**
+ * Creates new JAXWS EJB3 deployment.
+ * 
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+final class DeploymentModelBuilderJAXWS_EJB3 extends AbstractDeploymentModelBuilder
+{
+
+   /**
+    * Constructor.
+    */
+   DeploymentModelBuilderJAXWS_EJB3()
+   {
+      super();
+   }
+
+   /**
+    * Creates new JAXWS EJB3 deployment and registers it with deployment unit.
+    * 
+    * @param dep webservice deployment
+    * @param unit deployment unit
+    */
+   @Override
+   protected void build(final Deployment dep, final DeploymentUnit unit)
+   {
+      this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
+      this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
+
+      this.log.debug("Creating JAXWS EJB3 endpoints meta data model");
+      for (final WebServiceDeclaration container : ASHelper.getJaxwsEjbs(unit))
+      {
+         final String ejbName = container.getComponentName();
+         this.log.debug("EJB3 name: " + ejbName);
+         final String ejbClass = container.getComponentClassName();
+         this.log.debug("EJB3 class: " + ejbClass);
+
+         final Endpoint ep = this.newEndpoint(ejbClass, ejbName, dep);
+         ep.setProperty(ASHelper.CONTAINER_NAME, container.getContainerName());
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,51 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import java.util.List;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+
+/**
+ * Creates new JAXWS JSE deployment.
+ * 
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+final class DeploymentModelBuilderJAXWS_JSE extends AbstractDeploymentModelBuilder
+{
+
+   /**
+    * Constructor.
+    */
+   DeploymentModelBuilderJAXWS_JSE()
+   {
+      super();
+   }
+
+   /**
+    * Creates new JAXWS JSE deployment and registers it with deployment unit.
+    * 
+    * @param dep webservice deployment
+    * @param unit deployment unit
+    */
+   @Override
+   protected void build(final Deployment dep, final DeploymentUnit unit)
+   {
+      this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
+
+      this.log.debug("Creating JAXWS JSE endpoints meta data model");
+      final List<ServletMetaData> servlets = ASHelper.getJaxwsServlets(unit);
+      for (ServletMetaData servlet : servlets)
+      {
+         final String servletName = servlet.getName();
+         this.log.debug("JSE name: " + servletName);
+         final String servletClass = ASHelper.getEndpointName(servlet);
+         this.log.debug("JSE class: " + servletClass);
+
+         this.newEndpoint(servletClass, servletName, dep);
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers.deployment;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+
+/**
+ * JBossWS deployment model builder.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class WSDeploymentBuilder
+{
+
+   /** Builder instance. */
+   private static final WSDeploymentBuilder SINGLETON = new WSDeploymentBuilder();
+
+   /** Builders registry. */
+   private static final Map<DeploymentType, DeploymentModelBuilder> builders = new HashMap<DeploymentType, DeploymentModelBuilder>();;
+
+   static
+   {
+      WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_JSE, new DeploymentModelBuilderJAXWS_JSE());
+      WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_JSE, new DeploymentModelBuilderJAXRPC_JSE());
+      WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_EJB3, new DeploymentModelBuilderJAXWS_EJB3());
+      WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_EJB21, new DeploymentModelBuilderJAXRPC_EJB21());
+   }
+
+   /**
+    * Constructor.
+    */
+   private WSDeploymentBuilder()
+   {
+      super();
+   }
+
+   /**
+    * Factory method for obtaining builder instance. 
+    * 
+    * @return builder instance
+    */
+   public static WSDeploymentBuilder getInstance()
+   {
+      return WSDeploymentBuilder.SINGLETON;
+   }
+
+   /**
+    * Builds JBossWS deployment model if web service deployment is detected.
+    * 
+    * @param unit deployment unit
+    */
+   public void build(final DeploymentUnit unit)
+   {
+      final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
+
+      if (deploymentType != null)
+      {
+         WSDeploymentBuilder.builders.get(deploymentType).newDeploymentModel(unit);
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,68 @@
+package org.jboss.webservices.integration.deployers.deployment;
+
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileFilterWithAttributes;
+import org.jboss.virtual.VisitorAttributes;
+
+/**
+ * WS file filter for files with the '.wsdl', or '.xsd' or '.xml' suffix. 
+ * 
+ * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+final class WSVirtualFileFilter implements VirtualFileFilterWithAttributes
+{
+
+   /** The tree walking attributes. */
+   private VisitorAttributes attributes;
+
+   /**
+    * Constructor. 
+    */
+   WSVirtualFileFilter()
+   {
+      this(VisitorAttributes.RECURSE_LEAVES_ONLY);
+   }
+
+   /**
+    * Constructor.
+    * 
+    * @param attributes visit attributes
+    */
+   WSVirtualFileFilter(final VisitorAttributes attributes)
+   {
+      this.attributes = attributes;
+   }
+
+   /**
+    * Gets VisitorAttributes for this instance.
+    * 
+    * @return visitor attributes
+    */
+   public VisitorAttributes getAttributes()
+   {
+      return this.attributes;
+   }
+
+   /**
+    * Accepts files that end with '.wsdl' or '.xsd' or '.xml'.
+    *
+    * @param file to analyze
+    * @return true if expected file extension, false otherwise
+    */
+   public boolean accepts(final VirtualFile file)
+   {
+      if (file == null)
+      {
+         return false;
+      }
+
+      final String fileName = file.getName().toLowerCase();
+      final boolean hasWsdlSuffix = fileName.endsWith(".wsdl");
+      final boolean hasXsdSuffix = fileName.endsWith(".xsd");
+      final boolean hasXmlSuffix = fileName.endsWith(".xml");
+
+      return hasWsdlSuffix || hasXsdSuffix || hasXmlSuffix;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSVirtualFileFilter.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,242 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.endpoint;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.ws.Endpoint;
+
+import org.jboss.classloading.spi.dependency.ClassLoading;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.DeploymentFactory;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * JAXWS HTTP server implementation that nestles inside JBoss AS.
+ * This implementation simply delegates deployment of dynamically created
+ * JBoss web deployment to JBoss main deployer.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+public final class EndpointAPIHttpServer extends AbstractExtensible implements HttpServer
+{
+
+   /** JBoss deployment factory. */
+   private final DeploymentFactory factory = new DeploymentFactory();
+   /** JBoss Main deployer. */
+   private final DeployerClient mainDeployer;
+   /** JBossWS SPI provider. */
+   private final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+   /** Registered deployments. */
+   private final Map<String, Deployment> deployments = new HashMap<String, Deployment>();
+
+   /**
+    * Constructor - invoked by MC.
+    *
+    * @param mainDeployer JBoss main deployer
+    */
+   public EndpointAPIHttpServer(final DeployerClient mainDeployer)
+   {
+      super();
+      this.mainDeployer = mainDeployer;
+   }
+
+   /**
+    * Creates an requested HTTP context.
+    *
+    * @param contextRoot context root name
+    * @return context instance
+    */
+   public synchronized HttpContext createContext(final String contextRoot)
+   {
+      return this.spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+   }
+
+   /**
+    * Publishes a JAXWS endpoint to the JBoss server.
+    *
+    * @param context web context
+    * @param endpoint to publish
+    */
+   public synchronized void publish(final HttpContext context, final Endpoint endpoint)
+   {
+      final String contextRoot = context.getContextRoot();
+      if (this.deployments.keySet().contains(contextRoot))
+      {
+         throw new WSFDeploymentException("Context root '" + contextRoot + "' already exists");
+      }
+
+      final Class<?> endpointClass = this.getEndpointClass(endpoint);
+      final ClassLoader endpointClassLoader = endpointClass.getClassLoader();
+      final Deployment deployment = this.createSimpleDeployment("http://jaxws-endpoint-api" + contextRoot);
+      final MutableAttachments mutableAttachments = (MutableAttachments) deployment.getPredeterminedManagedObjects();
+      final JBossWebMetaData jbossWebMD = this.newJBossWebMetaData(contextRoot, endpointClass);
+
+      mutableAttachments.addAttachment("org.jboss.web.explicitDocBase", "/", String.class);
+      mutableAttachments.addAttachment(JBossWebMetaData.class, jbossWebMD);
+      mutableAttachments.addAttachment(ClassLoaderFactory.class, new ContextClassLoaderFactory(endpointClassLoader));
+      mutableAttachments.addAttachment(Module.class, ClassLoading.getModuleForClassLoader(endpointClassLoader));
+
+      try
+      {
+         this.mainDeployer.deploy(deployment);
+         this.deployments.put(contextRoot, deployment);
+      }
+      catch (DeploymentException de)
+      {
+         WSFDeploymentException.rethrow(de);
+      }
+   }
+
+   /**
+    * Destroys dynamically published JAXWS endpoint on the JBoss server.
+    *
+    * @param context to be destroyed
+    * @param endpoint to be unpublished
+    */
+   public synchronized void destroy(final HttpContext context, final Endpoint endpoint)
+   {
+      try
+      {
+         final String contextRoot = context.getContextRoot();
+         final Deployment deployment = this.deployments.remove(contextRoot);
+         if (deployment != null)
+         {
+            this.mainDeployer.undeploy(deployment);
+         }
+      }
+      catch (Exception ex)
+      {
+         WSFDeploymentException.rethrow(ex);
+      }
+   }
+
+   /**
+    * Returns implementor class associated with endpoint.
+    *
+    * @param endpoint to get implementor class from
+    * @return implementor class
+    */
+   private Class<?> getEndpointClass(final Endpoint endpoint)
+   {
+      final Object implementor = endpoint.getImplementor();
+      return implementor instanceof Class<?> ? (Class<?>) implementor : implementor.getClass();
+   }
+
+   /**
+    * Creates new JBoss web meta data.
+    *
+    * @param contextRoot context root
+    * @param endpointClass endpoint class
+    * @return new JBoss web meta data
+    */
+   private JBossWebMetaData newJBossWebMetaData(final String contextRoot, final Class<?> endpointClass)
+   {
+      final JBossWebMetaData jbossWebMD = new JBossWebMetaData();
+      final JBossServletsMetaData servletsMD = WebMetaDataHelper.getServlets(jbossWebMD);
+      final List<ServletMappingMetaData> servletMappingMD = WebMetaDataHelper.getServletMappings(jbossWebMD);
+      final String servletName = "jaxws-dynamic-endpoint";
+
+      WebMetaDataHelper.newServlet(servletName, endpointClass.getName(), servletsMD);
+      WebMetaDataHelper.newServletMapping(servletName, WebMetaDataHelper.getUrlPatterns("/*"), servletMappingMD);
+      jbossWebMD.setContextRoot(contextRoot);
+
+      return jbossWebMD;
+   }
+
+   /**
+    * Creates simple web deployment using deployers client api.
+    *
+    * @param name deployment name
+    * @return new deployment
+    */
+   private Deployment createSimpleDeployment(final String name)
+   {
+      final Deployment unit = new AbstractDeployment(name);
+      this.factory.addContext(unit, "");
+
+      return unit;
+   }
+
+   /**
+    * @see org.jboss.deployers.structure.spi.ClassLoaderFactory
+    */
+   private static class ContextClassLoaderFactory implements ClassLoaderFactory
+   {
+      /** Delegee. */
+      private ClassLoader classLoader;
+
+      /**
+       * Constructor.
+       *
+       * @param classLoader class loader
+       */
+      public ContextClassLoaderFactory(final ClassLoader classLoader)
+      {
+         this.classLoader = classLoader;
+      }
+
+      /**
+       * @see org.jboss.deployers.structure.spi.ClassLoaderFactory#createClassLoader(DeploymentUnit)
+       *
+       * @param unit deployment unit
+       * @return class loader
+       * @throws Exception never thrown in our case
+       */
+      public ClassLoader createClassLoader(final DeploymentUnit unit) throws Exception
+      {
+         return this.classLoader;
+      }
+
+      /**
+       * @see org.jboss.deployers.structure.spi.ClassLoaderFactory#removeClassLoader(DeploymentUnit)
+       *
+       * @param unit deployment unit
+       * @throws Exception never thrown in our case
+       */
+      public void removeClassLoader(final DeploymentUnit unit) throws Exception
+      {
+         this.classLoader = null;
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/EndpointAPIHttpServer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.endpoint;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.http.HttpServer;
+import org.jboss.wsf.spi.http.HttpServerFactory;
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
+
+/**
+ * Lookups http server inside MC container.
+ *
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class HttpServerFactoryImpl extends HttpServerFactory
+{
+   
+   /** The default bean name. */
+   private static final String BEAN_NAME = "WSHTTPServer";
+
+   /**
+    * Constructor.
+    */
+   public HttpServerFactoryImpl()
+   {
+      super();
+   }
+   
+   /**
+    * Returns http server registered in MC kernel.
+    * 
+    * @return http server
+    */
+   @Override
+   public HttpServer getHttpServer()
+   {
+      final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+      final IoCContainerProxyFactory iocContainerFactory = spiProvider.getSPI(IoCContainerProxyFactory.class);
+      final IoCContainerProxy iocContainer = iocContainerFactory.getContainer();
+      
+      return iocContainer.getBean(HttpServerFactoryImpl.BEAN_NAME, HttpServer.class);
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.injection;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import javax.ejb.EJB;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb3.common.resolvers.spi.EjbReference;
+import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver;
+
+/**
+ * EJB reference resolver.
+ *
+ * @author <a href="mailto:richard.opalka at jboss.org">Richard Opalka</a>
+ */
+final class EJBBeanReferenceResolver extends AbstractReferenceResolver<EJB>
+{
+
+   /**
+    * Deployment unit used for resolving process.
+    */
+   private final DeploymentUnit unit;
+
+   /**
+    * Delegate used to resolve JNDI names.
+    */
+   private final EjbReferenceResolver delegate;
+
+   /**
+    * Constructor.
+    * 
+    * @param unit deployment unit
+    * @param delegate EJB reference resolver
+    */
+   EJBBeanReferenceResolver(final DeploymentUnit unit, final EjbReferenceResolver delegate)
+   {
+      super(EJB.class);
+
+      if (unit == null)
+      {
+         throw new IllegalArgumentException("Deployment unit cannot be null");
+      }
+      if (delegate == null)
+      {
+         throw new IllegalArgumentException("Ejb reference resolver cannot be null");
+      }
+
+      this.unit = unit;
+      this.delegate = delegate;
+   }
+
+   /**
+    * @see org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver#resolveField(java.lang.reflect.Field)
+    * 
+    * @param field to be resolved
+    * @return JNDI name of referenced EJB object
+    */
+   @Override
+   protected String resolveField(final Field field)
+   {
+      final EJB ejbAnnotation = field.getAnnotation(EJB.class);
+      final Class<?> type = field.getType();
+      final EjbReference reference = this.getEjbReference(ejbAnnotation, type);
+
+      return this.delegate.resolveEjb(this.unit, reference);
+   }
+
+   /**
+    * @see org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver#resolveMethod(java.lang.reflect.Method)
+    * 
+    * @param method to be resolved
+    * @return JNDI name of referenced EJB object
+    */
+   @Override
+   protected String resolveMethod(final Method method)
+   {
+      final EJB ejbAnnotation = method.getAnnotation(EJB.class);
+      final Class<?> type = method.getParameterTypes()[0];
+      final EjbReference reference = this.getEjbReference(ejbAnnotation, type);
+
+      return this.delegate.resolveEjb(this.unit, reference);
+   }
+
+   /**
+    * Constructs EjbReference.
+    *
+    * @param ejbAnnotation ejb annotation
+    * @param type fall back type
+    * @return ejb reference instance
+    */
+   private EjbReference getEjbReference(final EJB ejbAnnotation, final Class<?> type)
+   {
+      String beanInterface = ejbAnnotation.beanInterface().getName();
+      if (java.lang.Object.class.getName().equals(beanInterface))
+      {
+         beanInterface = type.getName();
+      }
+      return new EjbReference(ejbAnnotation.beanName(), beanInterface, ejbAnnotation.mappedName());
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,282 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.injection;
+
+import java.lang.annotation.Annotation;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.Resource;
+import javax.ejb.EJB;
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.javaee.spec.EnvironmentEntriesMetaData;
+import org.jboss.metadata.javaee.spec.EnvironmentEntryMetaData;
+import org.jboss.metadata.javaee.spec.ResourceInjectionTargetMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.injection.resolvers.ResourceReferenceResolver;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.injection.InjectionMetaData;
+import org.jboss.wsf.spi.metadata.injection.InjectionsMetaData;
+import org.jboss.wsf.spi.metadata.injection.ReferenceResolver;
+import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
+
+/**
+ * Deployment aspect that builds injection meta data.
+ *
+ * @author <a href="mailto:richard.opalka at jboss.org">Richard Opalka</a>
+ */
+public final class InjectionMetaDataDeploymentAspect extends AbstractDeploymentAspect
+{
+
+   /** EJB 3 JNDI prefix. */
+   private static final String EJB3_JNDI_PREFIX = "java:env/";
+
+   /** Resolver handling @Resource injections. */
+   private static final ReferenceResolver RESOURCE_RESOLVER = new ResourceReferenceResolver();
+
+   /** EJB 3 reference resolver. */
+   private EjbReferenceResolver ejbReferenceResolver;
+
+   /**
+    * Constructor.
+    */
+   public InjectionMetaDataDeploymentAspect()
+   {
+      super();
+   }
+
+   /**
+    * Sets ejb reference resolver. This method is invoked by MC.
+    *
+    * @param resolver ejb reference resolver
+    */
+   public void setEjbReferenceResolver(final EjbReferenceResolver resolver)
+   {
+      this.ejbReferenceResolver = resolver;
+   }
+
+   /**
+    * Gets ejb reference resolver.
+    *
+    * @return ejb reference resolver
+    */
+   public EjbReferenceResolver getEjbReferenceResolver()
+   {
+      if (this.ejbReferenceResolver == null)
+      {
+         throw new IllegalStateException("No EjbReferenceResolver set by MC");
+      }
+
+      return this.ejbReferenceResolver;
+   }
+
+   /**
+    * Builds injection meta data for all endpoints in deployment.
+    * 
+    * @param dep webservice deployment
+    */
+   @Override
+   public void start(final Deployment dep)
+   {
+      final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
+      final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
+      final Map<Class<? extends Annotation>, ReferenceResolver> resolvers = this.getResolvers(unit);
+
+      if (WSHelper.isJaxwsJseDeployment(dep))
+      {
+         this.log.debug("Building injection meta data for JAXWS JSE webservice deployment: " + dep.getSimpleName());
+         final EnvironmentEntriesMetaData envEntriesMD = jbossWebMD.getEnvironmentEntries();
+
+         // iterate through all POJO endpoints
+         for (Endpoint endpoint : dep.getService().getEndpoints())
+         {
+            // build POJO injections meta data
+            final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(envEntriesMD, resolvers, null);
+
+            // associate injections meta data with POJO endpoint
+            endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
+         }
+      }
+      else if (WSHelper.isJaxwsEjbDeployment(dep))
+      {
+         this.log.debug("Building injection meta data for JAXWS EJB3 webservice deployment: " + dep.getSimpleName());
+         final WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(unit,
+               WebServiceDeployment.class);
+
+         // iterate through all EJB3 endpoints
+         for (final WebServiceDeclaration container : webServiceDeployment.getServiceEndpoints())
+         {
+            if (ASHelper.isWebServiceBean(container))
+            {
+               final String ejbName = container.getComponentName();
+
+               // build EJB 3 injections meta data
+               final EnvironmentEntriesMetaData ejbEnvEntries = this.getEnvironmentEntries(ejbName, unit);
+               final Context jndiContext = this.getJndiContext(container);
+               final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(ejbEnvEntries, resolvers,
+                     jndiContext);
+
+               // associate injections meta data with EJB 3 endpoint
+               final Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
+               endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
+            }
+         }
+      }
+   }
+
+   /**
+    * Returns environment entries meta data associated with specified EJB 3 bean.
+    * 
+    * @param ejbName EJB 3 bean to lookup environment entries for
+    * @param unit deployment unit
+    * @return environment entries meta data
+    */
+   private EnvironmentEntriesMetaData getEnvironmentEntries(final String ejbName, final DeploymentUnit unit)
+   {
+      final JBossMetaData jbossMD = ASHelper.getRequiredAttachment(unit, JBossMetaData.class);
+      final JBossEnterpriseBeansMetaData enterpriseBeansMDs = jbossMD.getEnterpriseBeans();
+
+      return enterpriseBeansMDs.get(ejbName).getEnvironmentEntries();
+   }
+
+   /**
+    * Returns JNDI context associated with EJB 3 container.
+    * 
+    * @param container EJB 3 container
+    * @return JNDI context
+    */
+   private Context getJndiContext(final WebServiceDeclaration container)
+   {
+      try
+      {
+         return (Context) container.getContext().lookup(InjectionMetaDataDeploymentAspect.EJB3_JNDI_PREFIX);
+      }
+      catch (NamingException ne)
+      {
+         throw new RuntimeException(ne);
+      }
+   }
+
+   /**
+    * Returns reference resolvers container.
+    *
+    * @param unit deployment unit
+    * @return reference resolvers
+    */
+   private Map<Class<? extends Annotation>, ReferenceResolver> getResolvers(final DeploymentUnit unit)
+   {
+      final Map<Class<? extends Annotation>, ReferenceResolver> resolvers = new HashMap<Class<? extends Annotation>, ReferenceResolver>();
+
+      resolvers.put(Resource.class, InjectionMetaDataDeploymentAspect.RESOURCE_RESOLVER);
+      resolvers.put(EJB.class, new EJBBeanReferenceResolver(unit, this.getEjbReferenceResolver()));
+
+      return resolvers;
+   }
+
+   /**
+    * Builds JBossWS specific injections meta data.
+    * 
+    * @param envEntriesMD environment entries meta data
+    * @param resolvers known annotation resolvers
+    * @param jndiContext JNDI context to be propagated
+    * @return injections meta data
+    */
+   private InjectionsMetaData buildInjectionsMetaData(final EnvironmentEntriesMetaData envEntriesMD,
+         final Map<Class<? extends Annotation>, ReferenceResolver> resolvers, final Context jndiContext)
+   {
+      final List<InjectionMetaData> injectionMD = new LinkedList<InjectionMetaData>();
+      injectionMD.addAll(this.buildInjectionMetaData(envEntriesMD));
+
+      return new InjectionsMetaData(injectionMD, resolvers, jndiContext);
+   }
+
+   /**
+    * Builds JBossWS specific injection meta data.
+    *
+    * @param envEntriesMD environment entries meta data
+    * @return injection meta data
+    */
+   private List<InjectionMetaData> buildInjectionMetaData(final EnvironmentEntriesMetaData envEntriesMD)
+   {
+      if ((envEntriesMD == null) || (envEntriesMD.size() == 0))
+      {
+         return Collections.emptyList();
+      }
+
+      final LinkedList<InjectionMetaData> retVal = new LinkedList<InjectionMetaData>();
+
+      Set<ResourceInjectionTargetMetaData> injectionTargets;
+      String envEntryName;
+      String envEntryValue;
+      String targetClass;
+      String targetName;
+      String envEntryValueClass;
+      boolean hasInjectionTargets;
+
+      // iterate through defined environment entries
+      for (final EnvironmentEntryMetaData envEntryMD : envEntriesMD)
+      {
+         injectionTargets = envEntryMD.getInjectionTargets();
+         hasInjectionTargets = (injectionTargets != null) && (injectionTargets.size() > 0);
+
+         if (hasInjectionTargets)
+         {
+            // prepare env entry meta data
+            envEntryName = envEntryMD.getEnvEntryName();
+            envEntryValue = envEntryMD.getValue();
+            envEntryValueClass = envEntryMD.getType();
+
+            // env entry can specify multiple injection targets
+            for (final ResourceInjectionTargetMetaData resourceInjectionTargetMD : injectionTargets)
+            {
+               // prepare injection target meta data
+               targetClass = resourceInjectionTargetMD.getInjectionTargetClass();
+               targetName = resourceInjectionTargetMD.getInjectionTargetName();
+
+               // build injection meta data for injection target
+               final InjectionMetaData injectionMD = new InjectionMetaData(targetClass, targetName, envEntryValueClass,
+                     envEntryName, envEntryValue != null);
+               this.log.debug(injectionMD);
+               retVal.add(injectionMD);
+            }
+         }
+      }
+
+      return retVal;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,248 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.invocation;
+
+import java.lang.reflect.Method;
+import java.security.Principal;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.xml.rpc.handler.MessageContext;
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.ejb.EjbModule;
+import org.jboss.ejb.Interceptor;
+import org.jboss.ejb.StatelessSessionContainer;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.invocation.InvocationType;
+import org.jboss.invocation.PayloadKey;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.common.invocation.AbstractInvocationHandler;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+
+/**
+ * Handles invocations on EJB21 endpoints.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class InvocationHandlerEJB21 extends AbstractInvocationHandler
+{
+
+   /** EJB21 JNDI name. */
+   private String jndiName;
+
+   /** MBean server. */
+   private MBeanServer server;
+
+   /** Object name. */
+   private ObjectName ejb21ContainerName;
+
+   /**
+    * Consctructor.
+    */
+   InvocationHandlerEJB21()
+   {
+      super();
+
+      this.server = MBeanServerLocator.locateJBoss();
+   }
+
+   /**
+    * Initializes EJB 21 endpoint.
+    * 
+    * @param endpoint web service endpoint
+    */
+   public void init(final Endpoint endpoint)
+   {
+      final String ejbName = endpoint.getShortName();
+      final Deployment dep = endpoint.getService().getDeployment();
+      final EJBArchiveMetaData ejbArchiveMD = WSHelper.getRequiredAttachment(dep, EJBArchiveMetaData.class);
+      final EJBMetaData ejbMD = (EJBMetaData) ejbArchiveMD.getBeanByEjbName(ejbName);
+
+      if (ejbMD == null)
+      {
+         throw new WebServiceException("Cannot obtain ejb meta data for: " + ejbName);
+      }
+
+      // get the bean's JNDI name
+      this.jndiName = ejbMD.getContainerObjectNameJndiName();
+
+      if (this.jndiName == null)
+      {
+         throw new WebServiceException("Cannot obtain JNDI name for: " + ejbName);
+      }
+   }
+
+   /**
+    * Gets EJB 21 container name lazily.
+    * 
+    * @param endpoint webservice endpoint
+    * @return EJB21 container name
+    */
+   private synchronized ObjectName getEjb21ContainerName(final Endpoint endpoint)
+   {
+      final boolean ejb21ContainerNotInitialized = this.ejb21ContainerName == null;
+
+      if (ejb21ContainerNotInitialized)
+      {
+         this.ejb21ContainerName = ObjectNameFactory.create("jboss.j2ee:jndiName=" + this.jndiName + ",service=EJB");
+         final boolean ejb21NotRegistered = !this.server.isRegistered(this.ejb21ContainerName);
+         if (ejb21NotRegistered)
+         {
+            throw new IllegalArgumentException("Cannot find service endpoint target: " + this.ejb21ContainerName);
+         }
+
+         // Inject the Service endpoint interceptor
+         this.insertEJB21ServiceEndpointInterceptor(this.ejb21ContainerName, endpoint.getShortName());
+      }
+
+      return this.ejb21ContainerName;
+   }
+
+   /**
+    * Invokes EJB 21 endpoint.
+    * 
+    * @param endpoint EJB 21 endpoint
+    * @param wsInvocation web service invocation
+    * @throws Exception if any error occurs
+    */
+   public void invoke(final Endpoint endpoint, final Invocation wsInvocation) throws Exception
+   {
+      final ObjectName ejb21Name = this.getEjb21ContainerName(endpoint);
+
+      try
+      {
+         // prepare for invocation
+         final org.jboss.invocation.Invocation jbossInvocation = this.getMBeanInvocation(wsInvocation);
+         final String[] signature =
+         {org.jboss.invocation.Invocation.class.getName()};
+         final Object[] args = new Object[]
+         {jbossInvocation};
+
+         // invoke method
+         final Object retObj = this.server.invoke(ejb21Name, "invoke", args, signature);
+         wsInvocation.setReturnValue(retObj);
+      }
+      catch (Exception e)
+      {
+         this.log.error("Method invocation failed with exception: " + e.getMessage(), e);
+         this.handleInvocationException(e);
+      }
+   }
+
+   /**
+    * Returns configured EJB 21 JBoss MBean invocation.
+    * 
+    * @param wsInvocation webservice invocation
+    * @return configured JBoss invocation
+    */
+   private org.jboss.invocation.Invocation getMBeanInvocation(final Invocation wsInvocation)
+   {
+      // ensure preconditions
+      final MessageContext msgContext = wsInvocation.getInvocationContext().getAttachment(MessageContext.class);
+      if (msgContext == null)
+      {
+         throw new IllegalStateException("Cannot obtain MessageContext");
+      }
+
+      final HandlerCallback callback = wsInvocation.getInvocationContext().getAttachment(HandlerCallback.class);
+      if (callback == null)
+      {
+         throw new IllegalStateException("Cannot obtain HandlerCallback");
+      }
+
+      // prepare security data
+      final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+      final SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
+      final Principal principal = securityAdaptor.getPrincipal();
+      final Object credential = securityAdaptor.getCredential();
+
+      // prepare invocation data
+      final Method method = wsInvocation.getJavaMethod();
+      final Object[] args = wsInvocation.getArgs();
+      final org.jboss.invocation.Invocation jbossInvocation = new org.jboss.invocation.Invocation(null, method, args,
+            null, principal, credential);
+
+      // propagate values to JBoss invocation
+      jbossInvocation.setValue(InvocationKey.SOAP_MESSAGE_CONTEXT, msgContext);
+      jbossInvocation.setValue(InvocationKey.SOAP_MESSAGE, ((SOAPMessageContext) msgContext).getMessage());
+      jbossInvocation.setType(InvocationType.SERVICE_ENDPOINT);
+      jbossInvocation.setValue(HandlerCallback.class.getName(), callback, PayloadKey.TRANSIENT);
+      jbossInvocation.setValue(Invocation.class.getName(), wsInvocation, PayloadKey.TRANSIENT);
+
+      return jbossInvocation;
+   }
+
+   /**
+    * This method dynamically inserts EJB 21 webservice endpoint interceptor
+    * to the last but one position in EJB 21 processing chain. See [JBWS-756] for more info.
+    * 
+    * @param objectName EJB 21 object name
+    * @param ejbName EJB 21 short name
+    */
+   private void insertEJB21ServiceEndpointInterceptor(final ObjectName objectName, final String ejbName)
+   {
+      try
+      {
+         final EjbModule ejbModule = (EjbModule) this.server.getAttribute(objectName, "EjbModule");
+         final StatelessSessionContainer container = (StatelessSessionContainer) ejbModule.getContainer(ejbName);
+
+         Interceptor currentInterceptor = container.getInterceptor();
+         while (currentInterceptor != null && currentInterceptor.getNext() != null)
+         {
+            final Interceptor nextInterceptor = currentInterceptor.getNext();
+
+            if (nextInterceptor.getNext() == null)
+            {
+               final ServiceEndpointInterceptorEJB21 sepInterceptor = new ServiceEndpointInterceptorEJB21();
+               currentInterceptor.setNext(sepInterceptor);
+               sepInterceptor.setNext(nextInterceptor);
+               this.log.debug("Injecting EJB 21 service endpoint interceptor after: "
+                     + currentInterceptor.getClass().getName());
+
+               return;
+            }
+            currentInterceptor = nextInterceptor;
+         }
+
+         this.log.warn("Cannot find EJB 21 service endpoint interceptor insert point");
+      }
+      catch (Exception ex)
+      {
+         this.log.warn("Cannot register EJB 21 service endpoint interceptor: ", ex);
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,168 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.invocation;
+
+import java.lang.reflect.Method;
+
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.invocation.AbstractInvocationHandler;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.invocation.integration.InvocationContextCallback;
+import org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer;
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
+
+/**
+ * Handles invocations on EJB3 endpoints.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class InvocationHandlerEJB3 extends AbstractInvocationHandler
+{
+
+   /** MC kernel controller. */
+   private final IoCContainerProxy iocContainer;
+
+   /** EJB3 container name. */
+   private String containerName;
+
+   /** EJB3 container. */
+   private ServiceEndpointContainer serviceEndpointContainer;
+
+   /**
+    * Constructor.
+    */
+   InvocationHandlerEJB3()
+   {
+      super();
+
+      final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+      final IoCContainerProxyFactory iocContainerFactory = spiProvider.getSPI(IoCContainerProxyFactory.class);
+      this.iocContainer = iocContainerFactory.getContainer();
+   }
+
+   /**
+    * Initializes EJB3 container name.
+    * 
+    * @param endpoint web service endpoint
+    */
+   public void init(final Endpoint endpoint)
+   {
+      this.containerName = (String) endpoint.getProperty(ASHelper.CONTAINER_NAME);
+
+      if (this.containerName == null)
+      {
+         throw new IllegalArgumentException("Container name cannot be null");
+      }
+   }
+
+   /**
+    * Gets EJB 3 container lazily.
+    * 
+    * @return EJB3 container
+    */
+   private synchronized ServiceEndpointContainer getEjb3Container()
+   {
+      final boolean ejb3ContainerNotInitialized = this.serviceEndpointContainer == null;
+
+      if (ejb3ContainerNotInitialized)
+      {
+         this.serviceEndpointContainer = this.iocContainer.getBean(this.containerName, ServiceEndpointContainer.class);
+         if (this.serviceEndpointContainer == null)
+         {
+            throw new WebServiceException("Cannot find service endpoint target: " + this.containerName);
+         }
+      }
+
+      return this.serviceEndpointContainer;
+   }
+
+   /**
+    * Invokes EJB 3 endpoint.
+    * 
+    * @param endpoint EJB 3 endpoint
+    * @param wsInvocation web service invocation
+    * @throws Exception if any error occurs
+    */
+   public void invoke(final Endpoint endpoint, final Invocation wsInvocation) throws Exception
+   {
+      try
+      {
+         // prepare for invocation
+         final ServiceEndpointContainer ejbContainer = this.getEjb3Container();
+         final InvocationContextCallback invocationCallback = new EJB3InvocationContextCallback(wsInvocation);
+         final Class<?> implClass = ejbContainer.getServiceImplementationClass();
+         final Method seiMethod = wsInvocation.getJavaMethod();
+         final Method implMethod = this.getImplMethod(implClass, seiMethod);
+         final Object[] args = wsInvocation.getArgs();
+
+         // invoke method
+         final Object retObj = ejbContainer.invokeEndpoint(implMethod, args, invocationCallback);
+         wsInvocation.setReturnValue(retObj);
+      }
+      catch (Throwable t)
+      {
+         this.log.error("Method invocation failed with exception: " + t.getMessage(), t);
+         this.handleInvocationException(t);
+      }
+   }
+
+   /**
+    * EJB3 invocation callback allowing EJB 3 beans to access Web Service invocation properties.
+    */
+   private static final class EJB3InvocationContextCallback implements InvocationContextCallback
+   {
+
+      /** WebService invocation. */
+      private Invocation wsInvocation;
+
+      /**
+       * Constructor.
+       * 
+       * @param wsInvocation delegee
+       */
+      public EJB3InvocationContextCallback(final Invocation wsInvocation)
+      {
+         this.wsInvocation = wsInvocation;
+      }
+
+      /**
+       * Retrieves attachment type from Web Service invocation context attachments.
+       * 
+       * @param <T> attachment type
+       * @param attachmentType attachment class
+       * @return attachment value
+       */
+      public <T> T get(final Class<T> attachmentType)
+      {
+         return this.wsInvocation.getInvocationContext().getAttachment(attachmentType);
+      }
+
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.invocation;
+
+import org.jboss.wsf.common.invocation.InvocationHandlerJAXRPC;
+import org.jboss.wsf.common.invocation.InvocationHandlerJAXWS;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
+import org.jboss.wsf.spi.invocation.InvocationType;
+
+/**
+ * The default invocation model factory for JBoss AS.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+public final class InvocationHandlerFactoryImpl extends InvocationHandlerFactory
+{
+
+   /**
+    * Constructor.
+    */
+   public InvocationHandlerFactoryImpl()
+   {
+      super();
+   }
+
+   /**
+    * Returns invocation handler associated with invocation type.
+    * 
+    * @param type invocation type
+    * @return invocation handler
+    */
+   public InvocationHandler newInvocationHandler(final InvocationType type)
+   {
+      InvocationHandler handler = null;
+
+      switch (type)
+      {
+         case JAXRPC_JSE :
+            handler = new InvocationHandlerJAXRPC();
+            break;
+         case JAXRPC_EJB21 :
+            handler = new InvocationHandlerEJB21();
+            break;
+         case JAXRPC_MDB21 :
+            handler = new InvocationHandlerMDB21();
+            break;
+         case JAXWS_JSE :
+            handler = new InvocationHandlerJAXWS();
+            break;
+         case JAXWS_EJB3 :
+            handler = new InvocationHandlerEJB3();
+            break;
+         case JAXWS_MDB3 :
+            handler = new InvocationHandlerMDB3();
+            break;
+         default :
+            throw new IllegalArgumentException("Unable to resolve spi.invocation.InvocationHandler for type " + type);
+      }
+
+      return handler;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.invocation;
+
+import org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE;
+
+/**
+ * Handles invocations on MDB EJB21 endpoints.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class InvocationHandlerMDB21 extends AbstractInvocationHandlerJSE
+{
+
+   /**
+    * Constructor.
+    */
+   InvocationHandlerMDB21()
+   {
+      super();
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.invocation;
+
+import org.jboss.wsf.common.invocation.AbstractInvocationHandlerJSE;
+
+/**
+ * Handles invocations on MDB EJB3 endpoints.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class InvocationHandlerMDB3 extends AbstractInvocationHandlerJSE
+{
+
+   /**
+    * Constructor.
+    */
+   InvocationHandlerMDB3()
+   {
+      super();
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerMDB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.invocation;
+
+import javax.xml.rpc.handler.soap.SOAPMessageContext;
+
+import org.jboss.ejb.plugins.AbstractInterceptor;
+import org.jboss.invocation.InvocationKey;
+import org.jboss.wsf.spi.invocation.HandlerCallback;
+import org.jboss.wsf.spi.invocation.Invocation;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
+
+/**
+ * This Interceptor does the ws4ee handler processing on EJB 21 endpoints.
+ * 
+ * According to the ws4ee spec the handler logic must be invoked after the container
+ * applied method level security to the invocation. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class ServiceEndpointInterceptorEJB21 extends AbstractInterceptor
+{
+
+   /**
+    * Constructor.
+    */
+   ServiceEndpointInterceptorEJB21()
+   {
+      super();
+   }
+
+   /**
+    * Before and after we call the EJB 21 service endpoint bean, we process the handler chains.
+    * 
+    * @param jbossInvocation jboss invocation
+    * @return ws invocation return value
+    * @throws Exception if any error occurs
+    */
+   @Override
+   public Object invoke(final org.jboss.invocation.Invocation jbossInvocation) throws Exception
+   {
+      final SOAPMessageContext msgContext = (SOAPMessageContext) jbossInvocation
+            .getPayloadValue(InvocationKey.SOAP_MESSAGE_CONTEXT);
+      if (msgContext == null)
+      {
+         // not for us
+         return this.getNext().invoke(jbossInvocation);
+      }
+
+      final Invocation wsInvocation = (Invocation) jbossInvocation.getValue(Invocation.class.getName());
+      final HandlerCallback callback = (HandlerCallback) jbossInvocation.getValue(HandlerCallback.class.getName());
+
+      if (callback == null || wsInvocation == null)
+      {
+         log.warn("Handler callback not available");
+         return this.getNext().invoke(jbossInvocation);
+      }
+
+      // Handlers need to be Tx. Therefore we must invoke the handler chain after the TransactionInterceptor.
+      try
+      {
+         // call the request handlers
+         boolean handlersPass = callback.callRequestHandlerChain(wsInvocation, HandlerType.ENDPOINT);
+         handlersPass = handlersPass && callback.callRequestHandlerChain(wsInvocation, HandlerType.POST);
+
+         // Call the next interceptor in the chain
+         if (handlersPass)
+         {
+            // The SOAPContentElements stored in the EndpointInvocation might have changed after
+            // handler processing. Get the updated request payload. This should be a noop if request
+            // handlers did not modify the incomming SOAP message.
+            final Object[] reqParams = wsInvocation.getArgs();
+            jbossInvocation.setArguments(reqParams);
+            final Object resObj = this.getNext().invoke(jbossInvocation);
+
+            // Setting the message to null should trigger binding of the response message
+            msgContext.setMessage(null);
+            wsInvocation.setReturnValue(resObj);
+         }
+
+         // call the response handlers
+         handlersPass = callback.callResponseHandlerChain(wsInvocation, HandlerType.POST);
+         handlersPass = handlersPass && callback.callResponseHandlerChain(wsInvocation, HandlerType.ENDPOINT);
+
+         // update the return value after response handler processing
+         return wsInvocation.getReturnValue();
+      }
+      catch (Exception ex)
+      {
+         try
+         {
+            // call the fault handlers
+            boolean handlersPass = callback.callFaultHandlerChain(wsInvocation, HandlerType.POST, ex);
+            handlersPass = handlersPass && callback.callFaultHandlerChain(wsInvocation, HandlerType.ENDPOINT, ex);
+         }
+         catch (Exception e)
+         {
+            log.warn("Cannot process handlerChain.handleFault, ignoring: ", e);
+         }
+         throw ex;
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/invocation/ServiceEndpointInterceptorEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.ioc;
+
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
+
+/**
+ * @see org.jboss.wsf.spi.ioc.IoCContainerProxyFactory
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class IoCContainerProxyFactoryImpl implements IoCContainerProxyFactory
+{
+   
+   /** Container proxy singleton. */
+   private static final IoCContainerProxy CONTAINER = IoCContainerProxyImpl.getInstance();
+
+   /**
+    * Constructor.
+    */
+   public IoCContainerProxyFactoryImpl()
+   {
+      super();
+   }
+
+   /**
+    * @see org.jboss.wsf.spi.ioc.IoCContainerProxyFactory#getContainer()
+    * 
+    * @return IoC container proxy
+    */
+   public IoCContainerProxy getContainer()
+   {
+      return IoCContainerProxyFactoryImpl.CONTAINER;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.ioc;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+
+/**
+ * @see org.jboss.wsf.spi.ioc.IoCContainerProxy
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class IoCContainerProxyImpl implements IoCContainerProxy
+{
+
+   /** Singleton. */
+   private static final IoCContainerProxy SINGLETON = new IoCContainerProxyImpl();
+   /** JBoss MC kernel. */
+   private static Kernel kernel;
+
+   /**
+    * Constructor.
+    */
+   public IoCContainerProxyImpl()
+   {
+      super();
+   }
+   
+   /**
+    * Returns container proxy instance.
+    *
+    * @return container proxy instance
+    */
+   static IoCContainerProxy getInstance()
+   {
+      return IoCContainerProxyImpl.SINGLETON;
+   }
+   
+   /**
+    * Sets JBoss kernel - invoked via MC injection.
+    * 
+    * @param kernel JBoss kernel
+    */
+   public void setKernel(final Kernel kernel)
+   {
+      IoCContainerProxyImpl.kernel = kernel;
+   }
+
+   /**
+    * @see org.jboss.wsf.spi.ioc.IoCContainerProxy#getBean(java.lang.String, java.lang.Class)
+    *
+    * @param <T> bean type
+    * @param beanName bean name inside IoC registry
+    * @param clazz bean type class
+    * @return bean instance
+    * @throws IllegalArgumentException if bean is not found 
+    */
+   @SuppressWarnings("unchecked")
+   public <T> T getBean(final String beanName, final Class<T> clazz)
+   {
+      final KernelController controller = IoCContainerProxyImpl.kernel.getController();
+      final ControllerContext ctx = controller.getInstalledContext(beanName);
+
+      return (T)ctx.getTarget();
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,155 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.metadata;
+
+import java.util.Iterator;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.ws.Constants;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
+
+/**
+ * Common class for EJB meta data builders.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+abstract class AbstractMetaDataBuilderEJB
+{
+
+   /** Logger. */
+   protected final Logger log = Logger.getLogger(this.getClass());
+
+   /**
+    * Builds universal EJB meta data model that is AS agnostic.
+    * 
+    * @param dep webservice deployment
+    * @return universal EJB meta data model
+    */
+   final EJBArchiveMetaData create(final Deployment dep)
+   {
+      this.log.debug("Building JBoss agnostic meta data for EJB webservice deployment: " + dep.getSimpleName());
+
+      final EJBArchiveMetaData ejbArchiveMD = new EJBArchiveMetaData();
+
+      this.buildEnterpriseBeansMetaData(dep, ejbArchiveMD);
+      this.buildWebservicesMetaData(dep, ejbArchiveMD);
+
+      return ejbArchiveMD;
+   }
+
+   /**
+    * Template method for build enterprise beans meta data.
+    * 
+    * @param dep webservice deployment
+    * @param ejbMetaData universal EJB meta data model
+    */
+   protected abstract void buildEnterpriseBeansMetaData(Deployment dep, EJBArchiveMetaData ejbMetaData);
+
+   /**
+    * Builds webservices meta data. This methods sets:
+    * <ul>
+    *   <li>context root</li>
+    *   <li>wsdl location resolver</li>
+    *   <li>config name</li>
+    *   <li>config file</li>
+    * </ul>
+    * 
+    * @param dep webservice deployment
+    * @param ejbArchiveMD universal EJB meta data model
+    */
+   private void buildWebservicesMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
+   {
+      final JBossMetaData jbossMD = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
+      final WebservicesMetaData webservicesMD = jbossMD.getWebservices();
+
+      if (webservicesMD == null)
+      {
+         return;
+      }
+
+      // set context root
+      String contextRoot = webservicesMD.getContextRoot();
+      final WebserviceDescriptionsMetaData wsDescriptionsMD = webservicesMD.getWebserviceDescriptions();
+
+      if (wsDescriptionsMD != null)
+      {
+         // set wsdl location resolver
+         final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(wsDescriptionsMD);
+         ejbArchiveMD.setPublishLocationAdapter(resolver);
+
+         final WebserviceDescriptionMetaData wsDescriptionMD = ASHelper
+               .getWebserviceDescriptionMetaData(wsDescriptionsMD);
+         if (wsDescriptionMD != null)
+         {
+            if (!Constants.BC_CONTEXT_MODE && contextRoot == null && !hasContextRoot(ejbArchiveMD))
+            {
+               contextRoot = wsDescriptionMD.getWebserviceDescriptionName(); // TCK6 fallback
+            }
+
+            final String configName = wsDescriptionMD.getConfigName();
+            final String configFile = wsDescriptionMD.getConfigFile();
+
+            // set config name
+            this.log.debug("Setting config name: " + configName);
+            ejbArchiveMD.setConfigName(wsDescriptionMD.getConfigName());
+
+            // set config file
+            this.log.debug("Setting config file: " + configFile);
+            ejbArchiveMD.setConfigFile(wsDescriptionMD.getConfigFile());
+         }
+      }
+
+      ejbArchiveMD.setWebServiceContextRoot(contextRoot);
+      this.log.debug("Setting context root: " + contextRoot);
+   }
+
+   /**
+    * Returns true if has context root, false otherwise.
+    *
+    * @param ejbArchiveMD ejb archive MD
+    * @return true if has context root, false otherwise
+    */
+   private boolean hasContextRoot(final EJBArchiveMetaData ejbArchiveMD)
+   {
+      for (final Iterator<EJBMetaData> ejbMDs = ejbArchiveMD.getEnterpriseBeans(); ejbMDs.hasNext(); )
+      {
+         final EJBMetaData ejbMD = ejbMDs.next();
+         if (ejbMD.getPortComponentURI() != null)
+         {
+            return true;
+         }
+      }
+
+      return false;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/AbstractMetaDataBuilderEJB.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.metadata;
+
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
+
+/**
+ * An aspect that builds container independent meta data. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+public final class ContainerMetaDataDeploymentAspect extends AbstractDeploymentAspect
+{
+
+   /** JSE meta data builder. */
+   private final MetaDataBuilderJSE metaDataBuilderJSE = new MetaDataBuilderJSE();
+
+   /** EJB3 meta data builder. */
+   private final MetaDataBuilderEJB3 metaDataBuilderEJB3 = new MetaDataBuilderEJB3();
+
+   /** EJB21 meta data builder. */
+   private final MetaDataBuilderEJB21 metaDataBuilderEJB21 = new MetaDataBuilderEJB21();
+
+   /**
+    * Constructor.
+    */
+   public ContainerMetaDataDeploymentAspect()
+   {
+      super();
+   }
+
+   /**
+    * Build container independent meta data.
+    * 
+    * @param dep webservice deployment
+    */
+   @Override
+   public void start(final Deployment dep)
+   {
+      if (WSHelper.isJseDeployment(dep))
+      {
+         this.log.debug("Creating JBoss agnostic JSE meta data for deployment: " + dep.getSimpleName());
+         final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create(dep);
+         dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
+      }
+      else if (WSHelper.isJaxwsEjbDeployment(dep))
+      {
+         this.log.debug("Creating JBoss agnostic EJB3 meta data for deployment: " + dep.getSimpleName());
+         final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create(dep);
+         dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
+      }
+      else if (WSHelper.isJaxrpcEjbDeployment(dep))
+      {
+         this.log.debug("Creating JBoss agnostic EJB21 meta data for deployment: " + dep.getSimpleName());
+         final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create(dep);
+         dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.metadata;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
+import org.jboss.metadata.javaee.spec.PortComponent;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+
+/**
+ * Builds container independent meta data from EJB21 container meta data. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class MetaDataBuilderEJB21 extends AbstractMetaDataBuilderEJB
+{
+
+   /**
+    * Constructor.
+    */
+   MetaDataBuilderEJB21()
+   {
+      super();
+   }
+
+   /**
+    * @see AbstractMetaDataBuilderEJB#buildEnterpriseBeansMetaData(Deployment, EJBArchiveMetaData)
+    * 
+    * @param dep webservice deployment
+    * @param ejbArchiveMD EJB archive meta data
+    */
+   @Override
+   protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
+   {
+      final JBossMetaData jbossMetaData = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
+      final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
+
+      for (final JBossEnterpriseBeanMetaData jbossEjbMD : jbossMetaData.getEnterpriseBeans())
+      {
+         this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD);
+      }
+
+      ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
+
+      final String securityDomain = jbossMetaData.getSecurityDomain();
+      this.log.debug("Setting security domain: " + securityDomain);
+      ejbArchiveMD.setSecurityDomain(securityDomain);
+   }
+
+   /**
+    * Builds JBoss agnostic EJB meta data.
+    * 
+    * @param wsEjbsMD jboss agnostic EJBs meta data
+    * @param jbossEjbMD jboss specific EJB meta data
+    */
+   private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD,
+         final JBossEnterpriseBeanMetaData jbossEjbMD)
+   {
+      final EJBMetaData wsEjbMD = this.newEjbMetaData(jbossEjbMD);
+
+      if (wsEjbMD != null)
+      {
+         // set EJB name and class
+         wsEjbMD.setEjbName(jbossEjbMD.getEjbName());
+         wsEjbMD.setEjbClass(jbossEjbMD.getEjbClass());
+
+         if (jbossEjbMD.isSession())
+         {
+            final JBossSessionBeanMetaData sessionEjbMD = (JBossSessionBeanMetaData) jbossEjbMD;
+
+            // set home interfaces
+            wsEjbMD.setServiceEndpointInterface(sessionEjbMD.getServiceEndpoint());
+            wsEjbMD.setHome(sessionEjbMD.getHome());
+            wsEjbMD.setLocalHome(sessionEjbMD.getLocalHome());
+
+            // set JNDI names
+            wsEjbMD.setJndiName(sessionEjbMD.determineJndiName());
+            wsEjbMD.setLocalJndiName(jbossEjbMD.determineLocalJndiName());
+
+            final PortComponent portComponentMD = sessionEjbMD.getPortComponent();
+            if (portComponentMD != null)
+            {
+               // set port component meta data
+               wsEjbMD.setPortComponentName(portComponentMD.getPortComponentName());
+               wsEjbMD.setPortComponentURI(portComponentMD.getPortComponentURI());
+
+               // set security meta data
+               final EJBSecurityMetaData smd = new EJBSecurityMetaData();
+               smd.setAuthMethod(portComponentMD.getAuthMethod());
+               smd.setTransportGuarantee(portComponentMD.getTransportGuarantee());
+               smd.setSecureWSDLAccess(portComponentMD.getSecureWSDLAccess());
+               wsEjbMD.setSecurityMetaData(smd);
+            }
+         }
+
+         wsEjbsMD.add(wsEjbMD);
+      }
+   }
+
+   /**
+    * Creates new JBoss agnostic EJB bean meta data model.
+    *
+    * @param jbossEjbMD jboss EJB meta data
+    * @return webservices EJB meta data
+    */
+   private EJBMetaData newEjbMetaData(final JBossEnterpriseBeanMetaData jbossEjbMD)
+   {
+      if (jbossEjbMD.isSession())
+      {
+         this.log.debug("Creating JBoss agnostic EJB21 meta data for session bean: " + jbossEjbMD.getEjbClass());
+         return new SLSBMetaData();
+      }
+      else if (jbossEjbMD.isMessageDriven())
+      {
+         this.log.debug("Creating JBoss agnostic EJB21 meta data for message driven bean: " + jbossEjbMD.getEjbClass());
+         final MDBMetaData mdbMD = new MDBMetaData();
+
+         final JBossMessageDrivenBeanMetaData jbossMessageBean = (JBossMessageDrivenBeanMetaData) jbossEjbMD;
+         ((MDBMetaData) mdbMD).setDestinationJndiName(jbossMessageBean.getDestinationJndiName());
+
+         return mdbMD;
+      }
+
+      return null;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,166 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.metadata;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.ejb.ActivationConfigProperty;
+import javax.ejb.MessageDriven;
+
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.PortComponentSpec;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+
+/**
+ * Builds container independent meta data from EJB3 container meta data. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class MetaDataBuilderEJB3 extends AbstractMetaDataBuilderEJB
+{
+
+   /**
+    * Constructor.
+    */
+   MetaDataBuilderEJB3()
+   {
+      super();
+   }
+
+   /**
+    * @see AbstractMetaDataBuilderEJB#buildEnterpriseBeansMetaData(Deployment, EJBArchiveMetaData)
+    * 
+    * @param dep webservice deployment
+    * @param ejbArchiveMD EJB archive meta data
+    */
+   @Override
+   protected void buildEnterpriseBeansMetaData(final Deployment dep, final EJBArchiveMetaData ejbArchiveMD)
+   {
+      final WebServiceDeployment ejb3Deployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
+      final List<EJBMetaData> wsEjbsMD = new LinkedList<EJBMetaData>();
+
+      for (final WebServiceDeclaration jbossEjbMD : ejb3Deployment.getServiceEndpoints())
+      {
+         this.buildEnterpriseBeanMetaData(wsEjbsMD, jbossEjbMD);
+      }
+
+      ejbArchiveMD.setEnterpriseBeans(wsEjbsMD);
+   }
+
+   /**
+    * Builds JBoss agnostic EJB meta data.
+    * 
+    * @param wsEjbsMD jboss agnostic EJBs meta data
+    * @param jbossEjbMD jboss specific EJB meta data
+    */
+   private void buildEnterpriseBeanMetaData(final List<EJBMetaData> wsEjbsMD, final WebServiceDeclaration jbossEjbMD)
+   {
+      final EJBMetaData wsEjbMD = this.newEjbMetaData(jbossEjbMD);
+
+      if (wsEjbMD != null)
+      {
+         // set EJB name and class
+         wsEjbMD.setEjbName(jbossEjbMD.getComponentName());
+         wsEjbMD.setEjbClass(jbossEjbMD.getComponentClassName());
+
+         final PortComponentSpec portComponentAnnotation = jbossEjbMD.getAnnotation(PortComponentSpec.class);
+         if (portComponentAnnotation != null)
+         {
+            // set port component meta data
+            wsEjbMD.setPortComponentName(portComponentAnnotation.portComponentName());
+            wsEjbMD.setPortComponentURI(portComponentAnnotation.portComponentURI());
+
+            // set security meta data
+            final EJBSecurityMetaData wsEjbSecurityMD = new EJBSecurityMetaData();
+            wsEjbSecurityMD.setAuthMethod(portComponentAnnotation.authMethod());
+            wsEjbSecurityMD.setTransportGuarantee(portComponentAnnotation.transportGuarantee());
+            wsEjbSecurityMD.setSecureWSDLAccess(portComponentAnnotation.secureWSDLAccess());
+            wsEjbMD.setSecurityMetaData(wsEjbSecurityMD);
+         }
+
+         wsEjbsMD.add(wsEjbMD);
+      }
+
+   }
+
+   /**
+    * Creates new JBoss agnostic EJB bean meta data model.
+    *
+    * @param jbossEjbMD jboss EJB meta data
+    * @return webservices EJB meta data
+    */
+   private EJBMetaData newEjbMetaData(final WebServiceDeclaration jbossEjbMD)
+   {
+      final MessageDriven mdbAnnotation = jbossEjbMD.getAnnotation(MessageDriven.class);
+
+      if (mdbAnnotation == null)
+      {
+         this.log.debug("Creating JBoss agnostic EJB3 meta data for session bean: "
+               + jbossEjbMD.getComponentClassName());
+         return new SLSBMetaData();
+      }
+      else
+      {
+         this.log.debug("Creating JBoss agnostic EJB3 meta data for message driven bean: "
+               + jbossEjbMD.getComponentClassName());
+         final MDBMetaData mdbMD = new MDBMetaData();
+
+         final String destinationName = this.getActivationProperty("destination", mdbAnnotation.activationConfig());
+         mdbMD.setDestinationJndiName(destinationName);
+
+         return mdbMD;
+      }
+   }
+
+   /**
+    * Returns activation config property value or null if not found.
+    * 
+    * @param name activation property name
+    * @param activationConfigProperties activation config properties
+    * @return activation config property value
+    */
+   private String getActivationProperty(final String name, final ActivationConfigProperty[] activationConfigProperties)
+   {
+      if (activationConfigProperties != null)
+      {
+         for (final ActivationConfigProperty activationConfigProperty : activationConfigProperties)
+         {
+            if (activationConfigProperty.propertyName().equals(name))
+            {
+               return activationConfigProperty.propertyValue();
+            }
+         }
+      }
+
+      return null;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,288 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.metadata;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.ear.jboss.JBossAppMetaData;
+import org.jboss.metadata.ear.spec.ModuleMetaData;
+import org.jboss.metadata.ear.spec.WebModuleMetaData;
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.common.integration.WSConstants;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
+import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
+
+/**
+ * Builds container independent meta data from WEB container meta data. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class MetaDataBuilderJSE
+{
+
+   /** Logger. */
+   private final Logger log = Logger.getLogger(MetaDataBuilderJSE.class);
+
+   /**
+    * Constructor.
+    */
+   MetaDataBuilderJSE()
+   {
+      super();
+   }
+
+   /**
+    * Builds universal JSE meta data model that is AS agnostic.
+    * 
+    * @param dep webservice deployment
+    * @return universal JSE meta data model
+    */
+   JSEArchiveMetaData create(final Deployment dep)
+   {
+      final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
+      final JSEArchiveMetaData jseArchiveMD = new JSEArchiveMetaData();
+
+      // set context root
+      final String contextRoot = this.getContextRoot(dep, jbossWebMD);
+      jseArchiveMD.setContextRoot(contextRoot);
+
+      // set servlet url patterns mappings
+      final Map<String, String> servletMappings = this.getServletUrlPatternsMappings(jbossWebMD);
+      jseArchiveMD.setServletMappings(servletMappings);
+
+      // set servlet class names mappings
+      final Map<String, String> servletClassNamesMappings = this.getServletClassMappings(jbossWebMD);
+      jseArchiveMD.setServletClassNames(servletClassNamesMappings);
+
+      // set security domain
+      final String securityDomain = jbossWebMD.getSecurityDomain();
+      jseArchiveMD.setSecurityDomain(securityDomain);
+
+      // set wsdl location resolver
+      final PublishLocationAdapter resolver = new PublishLocationAdapterImpl(jbossWebMD.getWebserviceDescriptions());
+      jseArchiveMD.setPublishLocationAdapter(resolver);
+
+      // set security meta data
+      final List<JSESecurityMetaData> jseSecurityMDs = this.getSecurityMetaData(jbossWebMD.getSecurityConstraints());
+      jseArchiveMD.setSecurityMetaData(jseSecurityMDs);
+
+      // set config name and file
+      this.setConfigNameAndFile(jseArchiveMD, jbossWebMD);
+
+      return jseArchiveMD;
+   }
+
+   /**
+    * Sets config name and config file.
+    *
+    * @param jseArchiveMD universal JSE meta data model
+    * @param jbossWebMD jboss web meta data
+    */
+   private void setConfigNameAndFile(final JSEArchiveMetaData jseArchiveMD, final JBossWebMetaData jbossWebMD)
+   {
+      final WebserviceDescriptionsMetaData wsDescriptionsMD = jbossWebMD.getWebserviceDescriptions();
+      final WebserviceDescriptionMetaData wsDescriptionMD = ASHelper.getWebserviceDescriptionMetaData(wsDescriptionsMD);
+      if (wsDescriptionMD != null)
+      {
+         if (wsDescriptionMD.getConfigName() != null)
+         {
+            jseArchiveMD.setConfigName(wsDescriptionMD.getConfigName());
+            jseArchiveMD.setConfigFile(wsDescriptionMD.getConfigFile());
+
+            // ensure higher priority against web.xml context parameters
+            return;
+         }
+      }
+
+      final List<ParamValueMetaData> contextParams = jbossWebMD.getContextParams();
+      if (contextParams != null)
+      {
+         for (final ParamValueMetaData contextParam : contextParams)
+         {
+            if (WSConstants.JBOSSWS_CONFIG_NAME.equals(contextParam.getParamName()))
+            {
+               jseArchiveMD.setConfigName(contextParam.getParamValue());
+            }
+            if (WSConstants.JBOSSWS_CONFIG_FILE.equals(contextParam.getParamName()))
+            {
+               jseArchiveMD.setConfigFile(contextParam.getParamValue());
+            }
+         }
+      }
+   }
+
+   /**
+    * Builds security meta data.
+    * 
+    * @param securityConstraintsMD security constraints meta data
+    * @return universal JSE security meta data model
+    */
+   private List<JSESecurityMetaData> getSecurityMetaData(final List<SecurityConstraintMetaData> securityConstraintsMD)
+   {
+      final List<JSESecurityMetaData> jseSecurityMDs = new LinkedList<JSESecurityMetaData>();
+
+      if (securityConstraintsMD != null)
+      {
+         for (final SecurityConstraintMetaData securityConstraintMD : securityConstraintsMD)
+         {
+            final JSESecurityMetaData jseSecurityMD = new JSESecurityMetaData();
+
+            // transport guarantee
+            jseSecurityMD.setTransportGuarantee(securityConstraintMD.getTransportGuarantee().name());
+
+            // web resources
+            this.setWebResources(jseSecurityMD, securityConstraintMD);
+
+            jseSecurityMDs.add(jseSecurityMD);
+         }
+      }
+
+      return jseSecurityMDs;
+   }
+
+   /**
+    * Sets web resources in universal meta data model.
+    * 
+    * @param jseSecurityMD universal JSE security meta data model
+    * @param securityConstraintMD security constraint meta data
+    */
+   private void setWebResources(final JSESecurityMetaData jseSecurityMD,
+         final SecurityConstraintMetaData securityConstraintMD)
+   {
+      final WebResourceCollectionsMetaData webResources = securityConstraintMD.getResourceCollections();
+
+      for (final WebResourceCollectionMetaData webResourceMD : webResources)
+      {
+         final JSEResourceCollection jseResource = jseSecurityMD.addWebResource(webResourceMD.getName());
+
+         for (final String webResourceUrlPatterns : webResourceMD.getUrlPatterns())
+         {
+            jseResource.addPattern(webResourceUrlPatterns);
+         }
+      }
+   }
+
+   /**
+    * Returns servlet name to url pattern mappings.
+    * 
+    * @param jbossWebMD jboss web meta data
+    * @return servlet name to url pattern mappings
+    */
+   private Map<String, String> getServletUrlPatternsMappings(final JBossWebMetaData jbossWebMD)
+   {
+      final Map<String, String> mappings = new HashMap<String, String>();
+      final List<ServletMappingMetaData> servletMappings = jbossWebMD.getServletMappings();
+
+      if (servletMappings != null)
+      {
+         for (final ServletMappingMetaData mapping : servletMappings)
+         {
+            mappings.put(mapping.getServletName(), mapping.getUrlPatterns().get(0));
+         }
+      }
+
+      return mappings;
+   }
+
+   /**
+    * Returns servlet name to servlet class mappings.
+    * 
+    * @param jbossWebMD jboss web meta data
+    * @return servlet name to servlet mappings
+    */
+   private Map<String, String> getServletClassMappings(final JBossWebMetaData jbossWebMD)
+   {
+      final Map<String, String> mappings = new HashMap<String, String>();
+      final JBossServletsMetaData servlets = jbossWebMD.getServlets();
+
+      if (servlets != null)
+      {
+         for (final ServletMetaData servlet : servlets)
+         {
+            if (servlet.getServletClass() == null || servlet.getServletClass().trim().length() == 0)
+            {
+               // Skip JSPs
+               continue;
+            }
+
+            this.log.debug("Creating JBoss agnostic JSE meta data for POJO bean: " + servlet.getServletClass());
+            mappings.put(servlet.getName(), servlet.getServletClass());
+         }
+      }
+
+      return mappings;
+   }
+
+   /**
+    * Returns context root associated with webservice deployment.
+    *
+    * If there's application.xml descriptor provided defining nested web module,
+    * then context root defined there will be returned. 
+    * Otherwise context root defined in jboss-web.xml will be returned.
+    * 
+    * @param dep webservice deployment
+    * @param jbossWebMD jboss web meta data
+    * @return context root
+    */
+   private String getContextRoot(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
+      final JBossAppMetaData jbossAppMD = unit.getParent() == null ? null : ASHelper.getOptionalAttachment(unit
+            .getParent(), JBossAppMetaData.class);
+
+      String contextRoot = null;
+
+      if (jbossAppMD != null)
+      {
+         final ModuleMetaData moduleMD = jbossAppMD.getModule(dep.getSimpleName());
+         if (moduleMD != null)
+         {
+            final WebModuleMetaData webModuleMD = (WebModuleMetaData) moduleMD.getValue();
+            contextRoot = webModuleMD.getContextRoot();
+         }
+      }
+
+      // prefer context root defined in application.xml over one defined in jboss-web.xml
+      return contextRoot != null ? contextRoot : jbossWebMD.getContextRoot();
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.metadata;
+
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter;
+
+/**
+ * Publish location adapter implementation.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class PublishLocationAdapterImpl implements PublishLocationAdapter
+{
+
+   /** Webservice descriptions meta data. */
+   private final WebserviceDescriptionsMetaData wsDescriptionsMD;
+
+   /**
+    * Constructor.
+    * 
+    * @param wsDescriptionsMD webservice descriptions meta data
+    */
+   PublishLocationAdapterImpl(final WebserviceDescriptionsMetaData wsDescriptionsMD)
+   {
+      super();
+
+      this.wsDescriptionsMD = wsDescriptionsMD;
+   }
+
+   /**
+    * @see org.jboss.wsf.spi.metadata.j2ee.PublishLocationAdapter#getWsdlPublishLocationByName(String)
+    * 
+    * @param endpointName endpoint name
+    * @return publish location
+    */
+   public String getWsdlPublishLocationByName(final String endpointName)
+   {
+      if (this.wsDescriptionsMD != null)
+      {
+         final WebserviceDescriptionMetaData endpointMD = this.wsDescriptionsMD.get(endpointName);
+
+         if (endpointMD != null)
+         {
+            return endpointMD.getWsdlPublishLocation();
+         }
+      }
+
+      return null;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/metadata/PublishLocationAdapterImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.security;
+
+import javax.security.jacc.PolicyConfiguration;
+import javax.security.jacc.PolicyConfigurationFactory;
+
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.web.WebPermissionMapping;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
+
+/**
+ * Generates JACC permissions. (This is temporary and really hacky solution). 
+ * 
+ * TODO: remove this deployment aspect and update 
+ * particular JACC deployer to execute after 
+ * JBossWS has modified web meta data. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class JACCPermissionsDeploymentAspect extends AbstractDeploymentAspect
+{
+
+   /**
+    * Constructor.
+    */
+   public JACCPermissionsDeploymentAspect()
+   {
+      super();
+   }
+
+   /**
+    * JBAS-5935: The dynamic web application generated by the JBossWS
+    * does not go through the war security deployer. Hence the JACC
+    * permissions are not created. There is a need to explicitly create
+    * the war jacc permissions.
+    * 
+    * @param dep webservice deployment
+    */
+   @Override
+   public void start(final Deployment dep)
+   {
+      final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
+
+      try
+      {
+         final PolicyConfigurationFactory policyConfigurationFactory = PolicyConfigurationFactory
+               .getPolicyConfigurationFactory();
+         final PolicyConfiguration policyConfiguration = policyConfigurationFactory.getPolicyConfiguration(dep
+               .getSimpleName(), false);
+
+         WebPermissionMapping.createPermissions(jbossWebMD, policyConfiguration);
+         policyConfiguration.commit();
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException("Exception generating JACC perms: ", e);
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.security;
+
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+
+/**
+ * Security adapters factory.
+ * 
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+public final class SecurityAdapterFactoryImpl extends SecurityAdaptorFactory
+{
+
+   /**
+    * Constructor.
+    */
+   public SecurityAdapterFactoryImpl()
+   {
+      super();
+   }
+
+   /**
+    * Creates new security adapter instance.
+    * 
+    * @return security adapter
+    */
+   public SecurityAdaptor newSecurityAdapter()
+   {
+      return new SecurityAdapterImpl();
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.security;
+
+import java.security.AccessController;
+import java.security.Principal;
+import java.security.PrivilegedAction;
+
+import javax.security.auth.Subject;
+
+import org.jboss.security.SecurityAssociation;
+import org.jboss.security.SecurityContext;
+import org.jboss.security.SecurityContextAssociation;
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+
+/**
+ * The JBoss AS specific SecurityAssociation adapter.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class SecurityAdapterImpl implements SecurityAdaptor
+{
+
+   /**
+    * Constructor.
+    */
+   SecurityAdapterImpl()
+   {
+      super();
+   }
+
+   /**
+    * @see org.jboss.wsf.spi.invocation.SecurityAdaptor#getPrincipal()
+    * 
+    * @return principal
+    */
+   public Principal getPrincipal()
+   {
+      return SecurityAssociation.getPrincipal();
+   }
+
+   /**
+    * @see org.jboss.wsf.spi.invocation.SecurityAdaptor#setPrincipal(Principal)
+    * 
+    * @param principal principal
+    */
+   public void setPrincipal(final Principal principal)
+   {
+      SecurityAssociation.setPrincipal(principal);
+   }
+
+   /**
+    * @see org.jboss.wsf.spi.invocation.SecurityAdaptor#getCredential()
+    * 
+    * @return credential
+    */
+   public Object getCredential()
+   {
+      return SecurityAssociation.getCredential();
+   }
+
+   /**
+    * @see org.jboss.wsf.spi.invocation.SecurityAdaptor#setCredential(Object)
+    *  
+    * @param credential credential
+    */
+   public void setCredential(final Object credential)
+   {
+      SecurityAssociation.setCredential(credential);
+   }
+
+   /**
+    * @see org.jboss.wsf.spi.invocation.SecurityAdaptor#pushSubjectContext(Subject, Principal, Object)
+    * 
+    * @param subject subject
+    * @param principal principal
+    * @param credential credential
+    */
+   public void pushSubjectContext(final Subject subject, final Principal principal, final Object credential)
+   {
+      AccessController.doPrivileged(new PrivilegedAction<Void>()
+      {
+
+         public Void run()
+         {
+            final SecurityContext securityContext = SecurityContextAssociation.getSecurityContext();
+            if (securityContext == null)
+            {
+               throw new IllegalStateException("Security Context is null");
+            }
+
+            securityContext.getUtil().createSubjectInfo(principal, credential, subject);
+
+            return null;
+         }
+      });
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/security/SecurityAdapterImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+
+/**
+ * Creates web app security meta data for EJB deployment.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+abstract class AbstractSecurityMetaDataAccessorEJB implements SecurityMetaDataAccessorEJB
+{
+
+   /** JAAS JNDI prefix. */
+   private static final String JAAS_JNDI_PREFIX = "java:/jaas/";
+
+   /**
+    * Constructor.
+    */
+   protected AbstractSecurityMetaDataAccessorEJB()
+   {
+      super();
+   }
+
+   /**
+    * Appends 'java:/jaas/' prefix to security domain if it's not prefixed with it.
+    *
+    * @param securityDomain security domain to be prefixed
+    * @return security domain prefixed with jaas JNDI prefix
+    */
+   protected final String appendJaasPrefix(final String securityDomain)
+   {
+      if (securityDomain != null)
+      {
+         final boolean hasJaasPrefix = securityDomain.startsWith(AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX);
+
+         if (!hasJaasPrefix)
+         {
+            return AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX + securityDomain;
+         }
+      }
+
+      return securityDomain;
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getAuthMethod(Endpoint)
+    *
+    * @param endpoint EJB webservice endpoint
+    * @return authentication method or null if not specified
+    */
+   public String getAuthMethod(final Endpoint endpoint)
+   {
+      final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint);
+      final boolean hasEjbSecurityMD = ejbSecurityMD != null;
+
+      return hasEjbSecurityMD ? ejbSecurityMD.getAuthMethod() : null;
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#isSecureWsdlAccess(Endpoint)
+    *
+    * @param endpoint EJB webservice endpoint
+    * @return whether WSDL access have to be secured
+    */
+   public boolean isSecureWsdlAccess(final Endpoint endpoint)
+   {
+      final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint);
+      final boolean hasEjbSecurityMD = ejbSecurityMD != null;
+
+      return hasEjbSecurityMD ? ejbSecurityMD.getSecureWSDLAccess() : false;
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getTransportGuarantee(Endpoint)
+    *
+    * @param endpoint EJB webservice endpoint
+    * @return transport guarantee or null if not specified
+    */
+   public String getTransportGuarantee(final Endpoint endpoint)
+   {
+      final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint);
+      final boolean hasEjbSecurityMD = ejbSecurityMD != null;
+
+      return hasEjbSecurityMD ? ejbSecurityMD.getTransportGuarantee() : null;
+   }
+
+   /**
+    * Gets EJB security meta data if associated with EJB endpoint.
+    *
+    * @param endpoint EJB webservice endpoint
+    * @return EJB security meta data or null
+    */
+   private EJBSecurityMetaData getEjbSecurityMetaData(final Endpoint endpoint)
+   {
+      final String ejbName = endpoint.getShortName();
+      final Deployment dep = endpoint.getService().getDeployment();
+      final EJBArchiveMetaData ejbArchiveMD = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
+      final EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD.getBeanByEjbName(ejbName) : null;
+
+      return ejbMD != null ? ejbMD.getSecurityMetaData() : null;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * Creates web app security meta data for EJB deployments.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+interface SecurityMetaDataAccessorEJB
+{
+
+   /**
+    * Obtains security domain from EJB deployment.
+    *
+    * @param dep webservice deployment
+    * @return security domain associated with EJB deployment
+    */
+   String getSecurityDomain(Deployment dep);
+
+   /**
+    * Obtains security roles from EJB deployment.
+    *
+    * @param dep webservice deployment
+    * @return security roles associated with EJB deployment
+    */
+   SecurityRolesMetaData getSecurityRoles(Deployment dep);
+
+   /**
+    * Whether WSDL access have to be secured.
+    *
+    * @param endpoint webservice EJB endpoint
+    * @return authentication method or null if not specified
+    */
+   boolean isSecureWsdlAccess(Endpoint endpoint);
+
+   /**
+    * Gets EJB authentication method.
+    *
+    * @param endpoint webservice EJB endpoint
+    * @return authentication method or null if not specified
+    */
+   String getAuthMethod(Endpoint endpoint);
+
+   /**
+    * Gets EJB transport guarantee.
+    *
+    * @param endpoint webservice EJB endpoint
+    * @return transport guarantee or null if not specified
+    */
+   String getTransportGuarantee(Endpoint endpoint);
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import org.jboss.metadata.common.ejb.IAssemblyDescriptorMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+
+/**
+ * Creates web app security meta data for EJB 21 deployment. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class SecurityMetaDataAccessorEJB21 extends AbstractSecurityMetaDataAccessorEJB
+{
+
+   /**
+    * Constructor.
+    */
+   SecurityMetaDataAccessorEJB21()
+   {
+      super();
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityDomain(Deployment)
+    *
+    * @param dep webservice deployment
+    * @return security domain associated with EJB 21 deployment
+    */
+   public String getSecurityDomain(final Deployment dep)
+   {
+      final EJBArchiveMetaData ejbMetaData = WSHelper.getRequiredAttachment(dep, EJBArchiveMetaData.class);
+
+      return super.appendJaasPrefix(ejbMetaData.getSecurityDomain());
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityRoles(Deployment)
+    *
+    * @param dep webservice deployment
+    * @return security roles associated with EJB 21 deployment
+    */
+   public SecurityRolesMetaData getSecurityRoles(final Deployment dep)
+   {
+      final JBossMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
+      final IAssemblyDescriptorMetaData assemblyDescriptorMD = jbossWebMD.getAssemblyDescriptor();
+
+      return (assemblyDescriptorMD != null) ? assemblyDescriptorMD.getSecurityRoles() : null;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,212 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import java.util.Iterator;
+
+import javax.annotation.security.RolesAllowed;
+
+import org.jboss.ejb3.annotation.SecurityDomain;
+import org.jboss.metadata.javaee.spec.SecurityRoleMetaData;
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+
+/**
+ * Creates web app security meta data for EJB 3 deployment.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class SecurityMetaDataAccessorEJB3 extends AbstractSecurityMetaDataAccessorEJB
+{
+
+   /**
+    * Constructor.
+    */
+   SecurityMetaDataAccessorEJB3()
+   {
+      super();
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityDomain(Deployment)
+    *
+    * @param dep webservice deployment
+    * @return security domain associated with EJB 3 deployment
+    */
+   public String getSecurityDomain(final Deployment dep)
+   {
+      final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
+      String securityDomain = null;
+      final Iterator<WebServiceDeclaration> ejbContainers = wsDeployment.getServiceEndpoints().iterator();
+
+      while (ejbContainers.hasNext())
+      {
+         final WebServiceDeclaration ejbContainer = ejbContainers.next();
+         final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation(SecurityDomain.class);
+
+         securityDomain = this.getDomain(securityDomain, nextSecurityDomain);
+      }
+
+      return super.appendJaasPrefix(securityDomain);
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityRoles(Deployment)
+    *
+    * @param dep webservice deployment
+    * @return security roles associated with EJB 21 deployment
+    */
+   public SecurityRolesMetaData getSecurityRoles(final Deployment dep)
+   {
+      final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
+      final SecurityRolesMetaData securityRolesMD = new SecurityRolesMetaData();
+      final Iterator<WebServiceDeclaration> ejbContainers = wsDeployment.getServiceEndpoints().iterator();
+
+      while (ejbContainers.hasNext())
+      {
+         final WebServiceDeclaration ejbContainer = ejbContainers.next();
+         final RolesAllowed allowedRoles = ejbContainer.getAnnotation(RolesAllowed.class);
+         final boolean hasAllowedRoles = allowedRoles != null;
+
+         if (hasAllowedRoles)
+         {
+            for (final String roleName : allowedRoles.value())
+            {
+               final SecurityRoleMetaData securityRoleMD = new SecurityRoleMetaData();
+
+               securityRoleMD.setRoleName(roleName);
+               securityRolesMD.add(securityRoleMD);
+            }
+         }
+      }
+
+      return securityRolesMD;
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getAuthMethod(Endpoint)
+    *
+    * @param endpoint EJB webservice endpoint
+    * @return authentication method or null if not specified
+    */
+   public String getAuthMethod(final Endpoint endpoint)
+   {
+      final WebContext webContext = this.getWebContextAnnotation(endpoint);
+      final boolean hasAuthMethod = (webContext != null) && (webContext.authMethod().length() > 0);
+
+      return hasAuthMethod ? webContext.authMethod() : super.getAuthMethod(endpoint);
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#isSecureWsdlAccess(Endpoint)
+    *
+    * @param endpoint EJB webservice endpoint
+    * @return whether WSDL access have to be secured
+    */
+   public boolean isSecureWsdlAccess(final Endpoint endpoint)
+   {
+      final WebContext webContext = this.getWebContextAnnotation(endpoint);
+      final boolean hasSecureWsdlAccess = (webContext != null) && (webContext.secureWSDLAccess());
+
+      return hasSecureWsdlAccess ? true : super.isSecureWsdlAccess(endpoint);
+   }
+
+   /**
+    * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getTransportGuarantee(Endpoint)
+    *
+    * @param endpoint EJB webservice endpoint
+    * @return transport guarantee or null if not specified
+    */
+   public String getTransportGuarantee(final Endpoint endpoint)
+   {
+      final WebContext webContext = this.getWebContextAnnotation(endpoint);
+      final boolean hasTransportGuarantee = (webContext != null) && (webContext.transportGuarantee().length() > 0);
+
+      return hasTransportGuarantee ? webContext.transportGuarantee() : super.getTransportGuarantee(endpoint);
+   }
+
+   /**
+    * Gets <b>WebContext</b> if associated with EJB endpoint.
+    * 
+    * @param endpoint EJB webservice endpoint 
+    * @return web context associated with EJB or null
+    */
+   @SuppressWarnings(
+   {"unchecked"})
+   private WebContext getWebContextAnnotation(final Endpoint endpoint)
+   {
+      return (WebContext) endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
+   }
+
+   /**
+    * Returns security domain value. This method checks domain is the same for every EJB 3 endpoint.
+    *
+    * @param oldSecurityDomain our security domain
+    * @param nextSecurityDomain next security domain
+    * @return security domain value
+    * @throws IllegalStateException if domains have different values
+    */
+   private String getDomain(final String oldSecurityDomain, final SecurityDomain nextSecurityDomain)
+   {
+      if (nextSecurityDomain == null)
+      {
+         return oldSecurityDomain;
+      }
+
+      if (oldSecurityDomain == null)
+      {
+         return nextSecurityDomain.value();
+      }
+
+      this.ensureSameDomains(oldSecurityDomain, nextSecurityDomain.value());
+
+      return oldSecurityDomain;
+   }
+
+   /**
+    * This method ensures both passed domains contain the same value.
+    *
+    * @param oldSecurityDomain our security domain
+    * @param newSecurityDomain next security domain
+    * @throws IllegalStateException if domains have different values
+    */
+   private void ensureSameDomains(final String oldSecurityDomain, final String newSecurityDomain)
+   {
+      final boolean domainsDiffer = !oldSecurityDomain.equals(newSecurityDomain);
+
+      if (domainsDiffer)
+      {
+         final String errorMessage = "Multiple security domains not supported. ";
+         final String firstDomain = "First domain: '" + oldSecurityDomain + "' ";
+         final String secondDomain = "second domain: '" + newSecurityDomain + "'";
+
+         throw new IllegalStateException(errorMessage + firstDomain + secondDomain);
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
+
+/**
+ * A deployment aspect that generates web app meta data for EJB endpoints. 
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+public final class WebMetaDataCreatingDeploymentAspect extends AbstractDeploymentAspect
+{
+
+   /** Web meta data creator. */
+   private WebMetaDataCreator webMetaDataCreator = new WebMetaDataCreator();
+
+   /**
+    * Constructor.
+    */
+   public WebMetaDataCreatingDeploymentAspect()
+   {
+      super();
+   }
+
+   /**
+    * Creates web meta data for EJB deployments.
+    *
+    * @param dep webservice deployment
+    */
+   @Override
+   public void start(final Deployment dep)
+   {
+      final boolean isEjbDeployment = WSHelper.isEjbDeployment(dep);
+
+      if (isEjbDeployment)
+      {
+         this.log.debug("Creating web meta data for EJB webservice deployment: " + dep.getSimpleName());
+         this.webMetaDataCreator.create(dep);
+      }
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,367 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import java.util.List;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.LoginConfigMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * Creator of web app meta data for EJB endpoints.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class WebMetaDataCreator
+{
+
+   /** Our Realm. */
+   private static final String EJB_WEBSERVICE_REALM = "EJBWebServiceEndpointServlet Realm";
+
+   /** EJB 21 security meta data builder. */
+   private final SecurityMetaDataAccessorEJB ejb21SecurityAccessor = new SecurityMetaDataAccessorEJB21();
+
+   /** EJB 3 security meta data builder. */
+   private final SecurityMetaDataAccessorEJB ejb3SecurityAccessor = new SecurityMetaDataAccessorEJB3();
+
+   /** Logger. */
+   private final Logger log = Logger.getLogger(WebMetaDataCreator.class);
+
+   /**
+    * Constructor.
+    */
+   WebMetaDataCreator()
+   {
+      super();
+   }
+
+   /**
+    * Creates web meta data for EJB deployments.
+    *
+    * @param dep webservice deployment
+    */
+   void create(final Deployment dep)
+   {
+      final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
+      final JBossWebMetaData jbossWebMD = new JBossWebMetaData();
+
+      this.createWebAppDescriptor(dep, jbossWebMD);
+      this.createJBossWebAppDescriptor(dep, jbossWebMD);
+
+      dep.addAttachment(JBossWebMetaData.class, jbossWebMD);
+      unit.addAttachment(JBossWebMetaData.class, jbossWebMD);
+   }
+
+   /**
+    * Creates web.xml descriptor meta data.
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD jboss web meta data
+    */
+   private void createWebAppDescriptor(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      this.log.debug("Creating web descriptor");
+      this.createServlets(dep, jbossWebMD);
+      this.createServletMappings(dep, jbossWebMD);
+      this.createSecurityConstraints(dep, jbossWebMD);
+      this.createLoginConfig(dep, jbossWebMD);
+      this.createSecurityRoles(dep, jbossWebMD);
+   }
+
+   /**
+    * Creates jboss-web.xml descriptor meta data.
+    *
+    * <pre>
+    * &lt;jboss-web&gt;
+    *   &lt;security-domain&gt;java:/jaas/custom-security-domain&lt;/security-domain&gt;
+    *   &lt;context-root&gt;/custom-context-root&lt;/context-root&gt;
+    *   &lt;virtual-host&gt;host1&lt;/virtual-host&gt;
+    *   ...
+    *   &lt;virtual-host&gt;hostN&lt;/virtual-host&gt;
+    * &lt;/jboss-web&gt;
+    * </pre>
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD jboss web meta data
+    */
+   private void createJBossWebAppDescriptor(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      this.log.debug("Creating jboss web descriptor");
+      final SecurityMetaDataAccessorEJB ejbMDAccessor = this.getEjbSecurityMetaDataAccessor(dep);
+
+      // Set security domain
+      final String securityDomain = ejbMDAccessor.getSecurityDomain(dep);
+      final boolean hasSecurityDomain = securityDomain != null;
+
+      if (hasSecurityDomain)
+      {
+         this.log.debug("Setting security domain: " + securityDomain);
+         jbossWebMD.setSecurityDomain(securityDomain);
+      }
+
+      // Set virtual hosts
+      final List<String> virtualHosts = dep.getService().getVirtualHosts();
+      this.log.debug("Setting virtual hosts: " + virtualHosts);
+      jbossWebMD.setVirtualHosts(virtualHosts);
+   }
+
+   /**
+    * Creates servlets part of web.xml descriptor.
+    *
+    * <pre>
+    * &lt;servlet&gt;
+    *   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
+    *   &lt;servlet-class&gt;EJBEndpointTargetBeanName&lt;/servlet-class&gt;
+    * &lt;/servlet&gt;
+    * </pre>
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD jboss web meta data
+    */
+   private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      this.log.debug("Creating servlets");
+      final JBossServletsMetaData servlets = WebMetaDataHelper.getServlets(jbossWebMD);
+
+      for (final Endpoint endpoint : dep.getService().getEndpoints())
+      {
+         final String endpointName = endpoint.getShortName();
+         final String endpointClassName = endpoint.getTargetBeanName();
+
+         this.log.debug("Servlet name: " + endpointName + ", servlet class: " + endpointClassName);
+         WebMetaDataHelper.newServlet(endpointName, endpointClassName, servlets);
+      }
+   }
+
+   /**
+    * Creates servlet-mapping part of web.xml descriptor.
+    *
+    * <pre>
+    * &lt;servlet-mapping&gt;
+    *   &lt;servlet-name&gt;EJBEndpointShortName&lt;/servlet-name&gt;
+    *   &lt;url-pattern&gt;EJBEndpointURLPattern&lt;/url-pattern&gt;
+    * &lt;/servlet-mapping&gt;
+    * </pre>
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD jboss web meta data
+    */
+   private void createServletMappings(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      this.log.debug("Creating servlet mappings");
+      final List<ServletMappingMetaData> servletMappings = WebMetaDataHelper.getServletMappings(jbossWebMD);
+
+      for (final Endpoint ep : dep.getService().getEndpoints())
+      {
+         final String endpointName = ep.getShortName();
+         final List<String> urlPatterns = WebMetaDataHelper.getUrlPatterns(ep.getURLPattern());
+
+         this.log.debug("Servlet name: " + endpointName + ", URL patterns: " + urlPatterns);
+         WebMetaDataHelper.newServletMapping(endpointName, urlPatterns, servletMappings);
+      }
+   }
+
+   /**
+    * Creates security constraints part of web.xml descriptor.
+    *
+    * <pre>
+    * &lt;security-constraint&gt;
+    *   &lt;web-resource-collection&gt;
+    *     &lt;web-resource-name&gt;EJBEndpointShortName&lt;/web-resource-name&gt;
+    *     &lt;url-pattern&gt;EJBEndpointURLPattern&lt;/url-pattern&gt;
+    *     &lt;http-method&gt;GET&lt;/http-method&gt;
+    *     &lt;http-method&gt;POST&lt;/http-method&gt;
+    *   &lt;/web-resource-collection&gt;
+    *   &lt;auth-constraint&gt;
+    *     &lt;role-name&gt;*&lt;/role-name&gt;
+    *   &lt;/auth-constraint&gt;
+    *   &lt;user-data-constraint&gt;
+    *     &lt;transport-guarantee&gt;EjbTransportGuarantee&lt;/transport-guarantee&gt;
+    *   &lt;/user-data-constraint&gt;
+    * &lt;/security-constraint&gt;
+    * </pre>
+    *
+    * @param dep webservice deployemnt
+    * @param jbossWebMD jboss web meta data
+    */
+   private void createSecurityConstraints(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      this.log.debug("Creating security constraints");
+      final SecurityMetaDataAccessorEJB ejbMDAccessor = this.getEjbSecurityMetaDataAccessor(dep);
+
+      for (final Endpoint ejbEndpoint : dep.getService().getEndpoints())
+      {
+         final boolean secureWsdlAccess = ejbMDAccessor.isSecureWsdlAccess(ejbEndpoint);
+         final String transportGuarantee = ejbMDAccessor.getTransportGuarantee(ejbEndpoint);
+         final boolean hasTransportGuarantee = transportGuarantee != null;
+         final String authMethod = ejbMDAccessor.getAuthMethod(ejbEndpoint);
+         final boolean hasAuthMethod = authMethod != null;
+
+         if (hasAuthMethod || hasTransportGuarantee)
+         {
+            final List<SecurityConstraintMetaData> securityConstraints = WebMetaDataHelper
+                  .getSecurityConstraints(jbossWebMD);
+
+            // security-constraint
+            final SecurityConstraintMetaData securityConstraint = WebMetaDataHelper
+                  .newSecurityConstraint(securityConstraints);
+
+            // web-resource-collection
+            final WebResourceCollectionsMetaData webResourceCollections = WebMetaDataHelper
+                  .getWebResourceCollections(securityConstraint);
+            final String endpointName = ejbEndpoint.getShortName();
+            final String urlPattern = ejbEndpoint.getURLPattern();
+            this.log.debug("Creating web resource collection for endpoint: " + endpointName + ", URL pattern: "
+                  + urlPattern);
+            WebMetaDataHelper.newWebResourceCollection(endpointName, urlPattern, secureWsdlAccess,
+                  webResourceCollections);
+
+            // auth-constraint
+            if (hasAuthMethod)
+            {
+               this.log.debug("Creating auth constraint for endpoint: " + endpointName);
+               WebMetaDataHelper.newAuthConstraint(WebMetaDataHelper.getAllRoles(), securityConstraint);
+            }
+
+            // user-data-constraint
+            if (hasTransportGuarantee)
+            {
+               this.log.debug("Creating new user data constraint for endpoint: " + endpointName
+                     + ", transport guarantee: " + transportGuarantee);
+               WebMetaDataHelper.newUserDataConstraint(transportGuarantee, securityConstraint);
+            }
+         }
+      }
+   }
+
+   /**
+    * Creates login-config part of web.xml descriptor.
+    *
+    * <pre>
+    * &lt;login-config&gt;
+    *   &lt;auth-method&gt;EjbDeploymentAuthMethod&lt;/auth-method&gt;
+    *   &lt;realm-name&gt;EJBWebServiceEndpointServlet Realm&lt;/realm-name&gt;
+    * &lt;/login-config&gt;
+    * </pre>
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD jboss web meta data
+    */
+   private void createLoginConfig(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      final String authMethod = this.getAuthMethod(dep);
+      final boolean hasAuthMethod = authMethod != null;
+
+      if (hasAuthMethod)
+      {
+         this.log.debug("Creating new login config: " + WebMetaDataCreator.EJB_WEBSERVICE_REALM + ", auth method: "
+               + authMethod);
+         final LoginConfigMetaData loginConfig = WebMetaDataHelper.getLoginConfig(jbossWebMD);
+         loginConfig.setRealmName(WebMetaDataCreator.EJB_WEBSERVICE_REALM);
+         loginConfig.setAuthMethod(authMethod);
+      }
+   }
+
+   /**
+    * Creates security roles part of web.xml descriptor.
+    *
+    * <pre>
+    * &lt;security-role&gt;
+    *   &lt;role-name&gt;role1&lt;/role-name&gt;
+    *   ...
+    *   &lt;role-name&gt;roleN&lt;/role-name&gt;
+    * &lt;/security-role&gt;
+    * </pre>
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD jboss web meta data
+    */
+   private void createSecurityRoles(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      final String authMethod = this.getAuthMethod(dep);
+      final boolean hasAuthMethod = authMethod != null;
+
+      if (hasAuthMethod)
+      {
+         final SecurityMetaDataAccessorEJB ejbMDAccessor = this.getEjbSecurityMetaDataAccessor(dep);
+         final SecurityRolesMetaData securityRolesMD = ejbMDAccessor.getSecurityRoles(dep);
+         final boolean hasSecurityRolesMD = securityRolesMD != null;
+
+         if (hasSecurityRolesMD)
+         {
+            this.log.debug("Setting security roles: " + securityRolesMD);
+            jbossWebMD.setSecurityRoles(securityRolesMD);
+         }
+      }
+   }
+
+   /**
+    * Returns deployment authentication method.
+    *
+    * @param dep webservice deployment
+    * @return deployment authentication method
+    */
+   private String getAuthMethod(final Deployment dep)
+   {
+      final SecurityMetaDataAccessorEJB ejbMDAccessor = this.getEjbSecurityMetaDataAccessor(dep);
+
+      for (final Endpoint ejbEndpoint : dep.getService().getEndpoints())
+      {
+         final String beanAuthMethod = ejbMDAccessor.getAuthMethod(ejbEndpoint);
+         final boolean hasBeanAuthMethod = beanAuthMethod != null;
+
+         if (hasBeanAuthMethod)
+         {
+            // First found auth-method defines war login-config/auth-method
+            return beanAuthMethod;
+         }
+      }
+
+      return null;
+   }
+
+   /**
+    * Returns security builder associated with EJB deployment.
+    *
+    * @param dep webservice EJB deployment
+    * @return security builder for EJB deployment
+    */
+   private SecurityMetaDataAccessorEJB getEjbSecurityMetaDataAccessor(final Deployment dep)
+   {
+      final boolean isJaxws = WSHelper.isJaxwsDeployment(dep);
+
+      return isJaxws ? this.ejb3SecurityAccessor : this.ejb21SecurityAccessor;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,164 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.logging.Logger;
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.webservices.integration.util.WebMetaDataHelper;
+import org.jboss.wsf.common.integration.WSConstants;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * The modifier of jboss web meta data.
+ * It configures WS transport for every webservice endpoint
+ * plus propagates WS stack specific context parameters if required.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+final class WebMetaDataModifier
+{
+
+   /** Logger. */
+   private final Logger log = Logger.getLogger(WebMetaDataModifier.class);
+
+   /**
+    * Constructor.
+    */
+   WebMetaDataModifier()
+   {
+      super();
+   }
+
+   /**
+    * Modifies web meta data to configure webservice stack transport and properties.
+    *
+    * @param dep webservice deployment
+    */
+   void modify(final Deployment dep)
+   {
+      final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
+
+      this.propagateContextProps(dep, jbossWebMD);
+      this.configureEndpoints(dep, jbossWebMD);
+      this.modifyContextRoot(dep, jbossWebMD);
+   }
+
+   /**
+    * Propagates stack specific context parameters if specified. 
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD web meta data
+    */
+   @SuppressWarnings("unchecked")
+   private void propagateContextProps(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      final Map<String, String> stackContextParams = (Map<String, String>) dep
+            .getProperty(WSConstants.STACK_CONTEXT_PARAMS);
+
+      if (stackContextParams != null)
+      {
+         this.log.debug("Creating context parameters");
+         final List<ParamValueMetaData> contextParams = WebMetaDataHelper.getContextParams(jbossWebMD);
+
+         for (Map.Entry<String, String> entry : stackContextParams.entrySet())
+         {
+            final String paramName = entry.getKey();
+            final String paramValue = entry.getValue();
+
+            this.log.debug("Setting context parameter name: " + paramName + " value: " + paramValue);
+            WebMetaDataHelper.newParamValue(paramName, paramValue, contextParams);
+         }
+      }
+   }
+
+   /**
+    * Configures transport servlet class for every found webservice endpoint. 
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD web meta data
+    */
+   private void configureEndpoints(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      final String transportClassName = this.getTransportClassName(dep);
+      final ClassLoader loader = dep.getInitialClassLoader();
+      this.log.debug("Modifying servlets");
+
+      for (final ServletMetaData servletMD : jbossWebMD.getServlets())
+      {
+         final boolean isWebserviceEndpoint = ASHelper.getEndpointClass(servletMD, loader) != null;
+
+         if (isWebserviceEndpoint)
+         {
+            // set transport servlet
+            servletMD.setServletClass(transportClassName);
+
+            // configure webservice endpoint
+            final String endpointClassName = servletMD.getServletClass();
+            this.log.debug("Setting transport class: " + transportClassName + " for servlet: " + endpointClassName);
+            final List<ParamValueMetaData> initParams = WebMetaDataHelper.getServletInitParams(servletMD);
+            WebMetaDataHelper.newParamValue(Endpoint.SEPID_DOMAIN_ENDPOINT, endpointClassName, initParams);
+         }
+      }
+   }
+
+   /**
+    * Modifies context root. 
+    *
+    * @param dep webservice deployment
+    * @param jbossWebMD web meta data
+    */
+   private void modifyContextRoot(final Deployment dep, final JBossWebMetaData jbossWebMD)
+   {
+      final String contextRoot = dep.getService().getContextRoot();
+      this.log.debug("Setting context root: " + contextRoot + " for deployment: " + dep.getSimpleName());
+      jbossWebMD.setContextRoot(contextRoot);
+   }
+
+   /**
+    * Returns stack specific transport class name.
+    *
+    * @param dep webservice deployment
+    * @return stack specific transport class name
+    * @throws IllegalStateException if transport class name is not found in deployment properties map
+    */
+   private String getTransportClassName(final Deployment dep)
+   {
+      final String transportClassName = (String) dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS);
+
+      if (transportClassName == null)
+      {
+         throw new IllegalStateException("Cannot obtain deployment property: " + WSConstants.STACK_TRANSPORT_CLASS);
+      }
+
+      return transportClassName;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.common.integration.AbstractDeploymentAspect;
+
+/**
+ * Modifies web meta data to configure webservice stack endpoints and properties.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+public final class WebMetaDataModifyingDeploymentAspect extends AbstractDeploymentAspect
+{
+
+   /** Web meta data modifier. */
+   private WebMetaDataModifier webMetaDataModifier = new WebMetaDataModifier();
+
+   /**
+    * Constructor.
+    */
+   public WebMetaDataModifyingDeploymentAspect()
+   {
+      super();
+   }
+
+   /**
+    * Modifies web meta data.
+    *
+    * @param dep webservice deployment
+    */
+   @Override
+   public void start(final Deployment dep)
+   {
+      this.log.debug("Modifying web meta data for webservice deployment: " + dep.getSimpleName());
+      this.webMetaDataModifier.modify(dep);
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/ASHelper.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/ASHelper.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,419 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.util;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.jws.WebService;
+import javax.servlet.Servlet;
+import javax.xml.ws.WebServiceProvider;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+
+/**
+ * JBoss AS integration helper class.
+ *
+ * @author <a href="ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class ASHelper
+{
+
+   /** 
+    * EJB invocation property.
+    */
+   public static final String CONTAINER_NAME = "org.jboss.wsf.spi.invocation.ContainerName";
+
+   /** Logger. */
+   private static final Logger LOGGER = Logger.getLogger(ASHelper.class);
+
+   /**
+    * Forbidden constructor.
+    */
+   private ASHelper()
+   {
+      super();
+   }
+
+   /**
+    * Returns true if unit contains JAXWS JSE, JAXRPC JSE, JAXWS EJB or JAXRPC EJB deployment.
+    *
+    * @param unit deployment unit
+    * @return true if JAXWS JSE, JAXRPC JSE, JAXWS EJB or JAXRPC EJB deployment, false otherwise.
+    */
+   public static boolean isWebServiceDeployment(final DeploymentUnit unit)
+   {
+      return ASHelper.getOptionalAttachment(unit, DeploymentType.class) != null;
+   }
+
+   /**
+    * Returns true if unit contains JAXRPC EJB deployment.
+    *
+    * @param unit deployment unit
+    * @return true if JAXRPC EJB deployment, false otherwise
+    */
+   public static boolean isJaxrpcEjbDeployment(final DeploymentUnit unit)
+   {
+      final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
+
+      return DeploymentType.JAXRPC_EJB21.equals(deploymentType);
+   }
+
+   /**
+    * Returns true if unit contains JAXRPC JSE deployment.
+    *
+    * @param unit deployment unit
+    * @return true if JAXRPC JSE deployment, false otherwise
+    */
+   public static boolean isJaxrpcJseDeployment(final DeploymentUnit unit)
+   {
+      final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
+
+      return DeploymentType.JAXRPC_JSE.equals(deploymentType);
+   }
+
+   /**
+    * Returns true if unit contains JAXWS EJB deployment.
+    *
+    * @param unit deployment unit
+    * @return true if JAXWS EJB deployment, false otherwise
+    */
+   public static boolean isJaxwsEjbDeployment(final DeploymentUnit unit)
+   {
+      final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
+
+      return DeploymentType.JAXWS_EJB3.equals(deploymentType);
+   }
+
+   /**
+    * Returns true if unit contains JAXWS JSE deployment.
+    *
+    * @param unit deployment unit
+    * @return true if JAXWS JSE deployment, false otherwise
+    */
+   public static boolean isJaxwsJseDeployment(final DeploymentUnit unit)
+   {
+      final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
+
+      return DeploymentType.JAXWS_JSE.equals(deploymentType);
+   }
+
+   /**
+    * Returns true if unit contains either JAXWS JSE or JAXRPC JSE deployment.
+    *
+    * @param unit deployment unit
+    * @return true if either JAXWS JSE or JAXRPC JSE deployment, false otherwise.
+    */
+   public static boolean isJseDeployment(final DeploymentUnit unit)
+   {
+      final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment(unit);
+      final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment(unit);
+
+      return isJaxwsJse || isJaxrpcJse;
+   }
+
+   /**
+    * Returns true if unit contains either JAXWS EJB or JAXRPC EJB deployment.
+    *
+    * @param unit deployment unit
+    * @return true if either JAXWS EJB or JAXRPC EJB deployment, false otherwise
+    */
+   public static boolean isEjbDeployment(final DeploymentUnit unit)
+   {
+      final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment(unit);
+      final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment(unit);
+
+      return isJaxwsEjb || isJaxrpcEjb;
+   }
+
+   /**
+    * Returns true if unit contains either JAXWS EJB or JAXWS JSE deployment.
+    *
+    * @param unit deployment unit
+    * @return true if either JAXWS EJB or JAXWS JSE deployment, false otherwise
+    */
+   public static boolean isJaxwsDeployment(final DeploymentUnit unit)
+   {
+      final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment(unit);
+      final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment(unit);
+
+      return isJaxwsEjb || isJaxwsJse;
+   }
+
+   /**
+    * Returns true if unit contains either JAXRPC EJB or JAXRPC JSE deployment.
+    *
+    * @param unit deployment unit
+    * @return true if either JAXRPC EJB or JAXRPC JSE deployment, false otherwise
+    */
+   public static boolean isJaxrpcDeployment(final DeploymentUnit unit)
+   {
+      final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment(unit);
+      final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment(unit);
+
+      return isJaxrpcEjb || isJaxrpcJse;
+   }
+
+   /**
+    * Gets list of JAXWS servlets meta data.
+    *
+    * @param unit deployment unit
+    * @return list of JAXWS servlets meta data
+    */
+   public static List<ServletMetaData> getJaxwsServlets(final DeploymentUnit unit)
+   {
+      return ASHelper.getWebServiceServlets(unit, true);
+   }
+
+   /**
+    * Gets list of JAXRPC servlets meta data.
+    *
+    * @param unit deployment unit
+    * @return list of JAXRPC servlets meta data
+    */
+   public static List<ServletMetaData> getJaxrpcServlets(final DeploymentUnit unit)
+   {
+      return ASHelper.getWebServiceServlets(unit, false);
+   }
+
+   /**
+    * Gets list of JAXWS EJBs meta data.
+    *
+    * @param unit deployment unit
+    * @return list of JAXWS EJBs meta data
+    */
+   public static List<WebServiceDeclaration> getJaxwsEjbs(final DeploymentUnit unit)
+   {
+      final WebServiceDeployment wsDeployment = ASHelper.getRequiredAttachment(unit, WebServiceDeployment.class);
+      final List<WebServiceDeclaration> endpoints = new ArrayList<WebServiceDeclaration>();
+
+      final Iterator<WebServiceDeclaration> ejbIterator = wsDeployment.getServiceEndpoints().iterator();
+      while (ejbIterator.hasNext())
+      {
+         final WebServiceDeclaration ejbContainer = ejbIterator.next();
+         if (ASHelper.isWebServiceBean(ejbContainer))
+         {
+            endpoints.add(ejbContainer);
+         }
+      }
+
+      return endpoints;
+   }
+
+   /**
+    * Returns true if EJB container is webservice endpoint.
+    * 
+    * @param ejbContainerAdapter EJB container adapter
+    * @return true if EJB container is webservice endpoint, false otherwise
+    */
+   public static boolean isWebServiceBean(final WebServiceDeclaration ejbContainerAdapter)
+   {
+      final boolean isWebService = ejbContainerAdapter.getAnnotation(WebService.class) != null;
+      final boolean isWebServiceProvider = ejbContainerAdapter.getAnnotation(WebServiceProvider.class) != null;
+
+      return isWebService || isWebServiceProvider;
+   }
+
+   /**
+    * Returns endpoint class name.
+    *
+    * @param servletMD servlet meta data
+    * @return endpoint class name
+    */
+   public static String getEndpointName(final ServletMetaData servletMD)
+   {
+      final String endpointClass = servletMD.getServletClass();
+
+      return endpointClass != null ? endpointClass.trim() : null;
+   }
+
+   /**
+    * Returns servlet meta data for requested servlet name.
+    * 
+    * @param jbossWebMD jboss web meta data
+    * @param servletName servlet name
+    * @return servlet meta data
+    */
+   public static ServletMetaData getServletForName(final JBossWebMetaData jbossWebMD, final String servletName)
+   {
+      for (JBossServletMetaData servlet : jbossWebMD.getServlets())
+      {
+         if (servlet.getName().equals(servletName))
+         {
+            return servlet;
+         }
+      }
+
+      throw new IllegalStateException("Cannot find servlet for link: " + servletName);
+   }
+
+   /**
+    * Returns webservice endpoint class or null if passed servlet meta data belong to either JSP or servlet instance.
+    *
+    * @param servletMD servlet meta data
+    * @param loader class loader
+    * @return webservice endpoint class or null
+    */
+   public static Class<?> getEndpointClass(final ServletMetaData servletMD, final ClassLoader loader)
+   {
+      final String endpointClassName = ASHelper.getEndpointName(servletMD);
+      final boolean notJSP = endpointClassName != null && endpointClassName.length() > 0;
+
+      if (notJSP)
+      {
+         try
+         {
+            final Class<?> endpointClass = loader.loadClass(endpointClassName);
+            final boolean notServlet = !Servlet.class.isAssignableFrom(endpointClass);
+
+            if (notServlet)
+            {
+               return endpointClass;
+            }
+         }
+         catch (ClassNotFoundException cnfe)
+         {
+            ASHelper.LOGGER.warn("Cannot load servlet class: " + endpointClassName, cnfe);
+         }
+      }
+
+      return null;
+   }
+
+   /**
+    * Returns required attachment value from deployment unit. 
+    * 
+    * @param <A> expected value
+    * @param unit deployment unit
+    * @param key attachment key
+    * @return required attachment 
+    * @throws IllegalStateException if attachment value is null
+    */
+   public static <A> A getRequiredAttachment(final DeploymentUnit unit, final Class<A> key)
+   {
+      final A value = unit.getAttachment(key);
+      if (value == null)
+      {
+         ASHelper.LOGGER.error("Cannot find attachment in deployment unit: " + key);
+         throw new IllegalStateException();
+      }
+
+      return value;
+   }
+
+   /**
+    * Returns optional attachment value from deployment unit or null if not bound.
+    * 
+    * @param <A> expected value
+    * @param unit deployment unit
+    * @param key attachment key
+    * @return optional attachment value or null 
+    */
+   public static <A> A getOptionalAttachment(final DeploymentUnit unit, final Class<A> key)
+   {
+      return unit.getAttachment(key);
+   }
+
+   /**
+    * Returns true if deployment unit have attachment value associated with the <b>key</b>.
+    *  
+    * @param unit deployment unit
+    * @param key attachment key
+    * @return true if contains attachment, false otherwise
+    */
+   public static boolean hasAttachment(final DeploymentUnit unit, final Class<?> key)
+   {
+      return ASHelper.getOptionalAttachment(unit, key) != null;
+   }
+
+   /**
+    * Returns first webservice description meta data or null if not found.
+    *
+    * @param wsDescriptionsMD webservice descriptions
+    * @return webservice description
+    */
+   public static WebserviceDescriptionMetaData getWebserviceDescriptionMetaData(
+         final WebserviceDescriptionsMetaData wsDescriptionsMD)
+   {
+      if (wsDescriptionsMD != null)
+      {
+         if (wsDescriptionsMD.size() > 1)
+         {
+            ASHelper.LOGGER.warn("Multiple <webservice-description> elements not supported");
+         }
+
+         if (wsDescriptionsMD.size() > 0)
+         {
+            return wsDescriptionsMD.iterator().next();
+         }
+      }
+
+      return null;
+   }
+
+   /**
+    * Gets list of JAXRPC or JAXWS servlets meta data.
+    *
+    * @param unit deployment unit
+    * @param jaxws if passed value is <b>true</b> JAXWS servlets list will be returned, otherwise JAXRPC servlets list
+    * @return either JAXRPC or JAXWS servlets list
+    */
+   private static List<ServletMetaData> getWebServiceServlets(final DeploymentUnit unit, final boolean jaxws)
+   {
+      final JBossWebMetaData jbossWebMD = ASHelper.getRequiredAttachment(unit, JBossWebMetaData.class);
+      final ClassLoader loader = unit.getClassLoader();
+      final List<ServletMetaData> endpoints = new ArrayList<ServletMetaData>();
+
+      for (ServletMetaData servletMD : jbossWebMD.getServlets())
+      {
+         final Class<?> endpointClass = ASHelper.getEndpointClass(servletMD, loader);
+
+         if (endpointClass != null)
+         {
+            // check webservice annotations
+            final boolean isWebService = endpointClass.isAnnotationPresent(WebService.class);
+            final boolean isWebServiceProvider = endpointClass.isAnnotationPresent(WebServiceProvider.class);
+            // detect webservice type
+            final boolean isJaxwsEndpoint = jaxws && (isWebService || isWebServiceProvider);
+            final boolean isJaxrpcEndpoint = !jaxws && (!isWebService && !isWebServiceProvider);
+
+            if (isJaxwsEndpoint || isJaxrpcEndpoint)
+            {
+               endpoints.add(servletMD);
+            }
+         }
+      }
+
+      return endpoints;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,424 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.util;
+
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.AuthConstraintMetaData;
+import org.jboss.metadata.web.spec.LoginConfigMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.web.spec.TransportGuaranteeType;
+import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+
+/**
+ * Utility class that simplifies work with JBossWebMetaData object structure.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler at redhat.com">Thomas Diesler</a>
+ */
+public final class WebMetaDataHelper
+{
+
+   /** Star utility string. */
+   private static final String STAR_STRING = "*";
+
+   /** GET http method utility string. */
+   private static final String GET_STRING = "GET";
+
+   /** POST http method utility string. */
+   private static final String POST_STRING = "POST";
+
+   /** GET and POST methods utility list. */
+   private static List<String> getAndPostMethods;
+
+   /** POST method utility list. */
+   private static List<String> onlyPostMethod;
+
+   /** All roles utility list. */
+   private static List<String> allRoles;
+
+   static
+   {
+      final List<String> getAndPostList = new LinkedList<String>();
+      getAndPostList.add(WebMetaDataHelper.GET_STRING);
+      getAndPostList.add(WebMetaDataHelper.POST_STRING);
+      WebMetaDataHelper.getAndPostMethods = Collections.unmodifiableList(getAndPostList);
+
+      final List<String> onlyPostList = new LinkedList<String>();
+      onlyPostList.add(WebMetaDataHelper.POST_STRING);
+      WebMetaDataHelper.onlyPostMethod = Collections.unmodifiableList(onlyPostList);
+
+      final List<String> roleNamesList = new LinkedList<String>();
+      roleNamesList.add(WebMetaDataHelper.STAR_STRING);
+      WebMetaDataHelper.allRoles = Collections.unmodifiableList(roleNamesList);
+   }
+
+   /**
+    * Constructor.
+    */
+   private WebMetaDataHelper()
+   {
+      super();
+   }
+
+   /**
+    * Creates URL pattern list from passed string.
+    *
+    * @param urlPattern URL pattern
+    * @return list wrapping passed parameter
+    */
+   public static List<String> getUrlPatterns(final String urlPattern)
+   {
+      final List<String> linkedList = new LinkedList<String>();
+
+      linkedList.add(urlPattern);
+
+      return linkedList;
+   }
+
+   /**
+    * If WSDL access is secured, it returns both POST and GET methods, otherwise only POST method.
+    *
+    * @param secureWsdlAccess whether WSDL is secured
+    * @return web access methods
+    */
+   public static List<String> getHttpMethods(final boolean secureWsdlAccess)
+   {
+      return secureWsdlAccess ? WebMetaDataHelper.getAndPostMethods : WebMetaDataHelper.onlyPostMethod;
+   }
+
+   /**
+    * Returns all role list.
+    *
+    * @return all role list
+    */
+   public static List<String> getAllRoles()
+   {
+      return WebMetaDataHelper.allRoles;
+   }
+
+   /**
+    * Gests servlets meta data from jboss web meta data.
+    * If not found it creates new servlets meta data
+    * and associates them with jboss web meta data.
+    *
+    * @param jbossWebMD jboss web meta data
+    * @return servlets meta data
+    */
+   public static JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
+   {
+      JBossServletsMetaData servletsMD = jbossWebMD.getServlets();
+
+      if (servletsMD == null)
+      {
+         servletsMD = new JBossServletsMetaData();
+         jbossWebMD.setServlets(servletsMD);
+      }
+
+      return servletsMD;
+   }
+
+   /**
+    * Gests servlet mappings meta data from jboss web meta data.
+    * If not found it creates new servlet mappings meta data
+    * and associates them with jboss web meta data.
+    *
+    * @param jbossWebMD jboss web meta data
+    * @return servlet mappings meta data
+    */
+   public static List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData jbossWebMD)
+   {
+      List<ServletMappingMetaData> servletMappingsMD = jbossWebMD.getServletMappings();
+
+      if (servletMappingsMD == null)
+      {
+         servletMappingsMD = new LinkedList<ServletMappingMetaData>();
+         jbossWebMD.setServletMappings(servletMappingsMD);
+      }
+
+      return servletMappingsMD;
+   }
+
+   /**
+    * Gests security constraints meta data from jboss web meta data.
+    * If not found it creates new security constraints meta data
+    * and associates them with jboss web meta data.
+    *
+    * @param jbossWebMD jboss web meta data
+    * @return security constraints meta data
+    */
+   public static List<SecurityConstraintMetaData> getSecurityConstraints(final JBossWebMetaData jbossWebMD)
+   {
+      List<SecurityConstraintMetaData> securityConstraintsMD = jbossWebMD.getSecurityConstraints();
+
+      if (securityConstraintsMD == null)
+      {
+         securityConstraintsMD = new LinkedList<SecurityConstraintMetaData>();
+         jbossWebMD.setSecurityConstraints(securityConstraintsMD);
+      }
+
+      return securityConstraintsMD;
+   }
+
+   /**
+    * Gests login config meta data from jboss web meta data.
+    * If not found it creates new login config meta data
+    * and associates them with jboss web meta data.
+    *
+    * @param jbossWebMD jboss web meta data
+    * @return login config meta data
+    */
+   public static LoginConfigMetaData getLoginConfig(final JBossWebMetaData jbossWebMD)
+   {
+      LoginConfigMetaData loginConfigMD = jbossWebMD.getLoginConfig();
+
+      if (loginConfigMD == null)
+      {
+         loginConfigMD = new LoginConfigMetaData();
+         jbossWebMD.setLoginConfig(loginConfigMD);
+      }
+
+      return loginConfigMD;
+   }
+
+   /**
+    * Gests context parameters meta data from jboss web meta data.
+    * If not found it creates new context parameters meta data
+    * and associates them with jboss web meta data.
+    *
+    * @param jbossWebMD jboss web meta data
+    * @return context parameters meta data
+    */
+   public static List<ParamValueMetaData> getContextParams(final JBossWebMetaData jbossWebMD)
+   {
+      List<ParamValueMetaData> contextParamsMD = jbossWebMD.getContextParams();
+
+      if (contextParamsMD == null)
+      {
+         contextParamsMD = new LinkedList<ParamValueMetaData>();
+         jbossWebMD.setContextParams(contextParamsMD);
+      }
+
+      return contextParamsMD;
+   }
+
+   /**
+    * Gests web resource collections meta data from security constraint meta data.
+    * If not found it creates new web resource collections meta data
+    * and associates them with security constraint meta data.
+    *
+    * @param securityConstraintMD security constraint meta data
+    * @return web resource collections meta data
+    */
+   public static WebResourceCollectionsMetaData getWebResourceCollections(final SecurityConstraintMetaData securityConstraintMD)
+   {
+      WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections();
+
+      if (webResourceCollectionsMD == null)
+      {
+         webResourceCollectionsMD = new WebResourceCollectionsMetaData();
+         securityConstraintMD.setResourceCollections(webResourceCollectionsMD);
+      }
+
+      return webResourceCollectionsMD;
+   }
+
+   /**
+    * Gests init parameters meta data from servlet meta data.
+    * If not found it creates new init parameters meta data
+    * and associates them with servlet meta data.
+    *
+    * @param servletMD servlet meta data
+    * @return init parameters meta data
+    */
+   public static List<ParamValueMetaData> getServletInitParams(final ServletMetaData servletMD)
+   {
+      List<ParamValueMetaData> initParamsMD = servletMD.getInitParam();
+
+      if (initParamsMD == null)
+      {
+         initParamsMD = new LinkedList<ParamValueMetaData>();
+         servletMD.setInitParam(initParamsMD);
+      }
+
+      return initParamsMD;
+   }
+
+   /**
+    * Creates new security constraint meta data and associates them with security constraints meta data.
+    *
+    * @param securityConstraintsMD security constraints meta data
+    * @return new security constraing meta data
+    */
+   public static SecurityConstraintMetaData newSecurityConstraint(final List<SecurityConstraintMetaData> securityConstraintsMD)
+   {
+      final SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData();
+
+      securityConstraintsMD.add(securityConstraintMD);
+
+      return securityConstraintMD;
+   }
+
+   /**
+    * Creates new web resource collection meta data and associates them with web resource collections meta data.
+    *
+    * @param servletName servlet name
+    * @param urlPattern URL pattern
+    * @param securedWsdl whether WSDL access is secured
+    * @param webResourceCollectionsMD web resource collections meta data
+    * @return new web resource collection meta data
+    */
+   public static WebResourceCollectionMetaData newWebResourceCollection(final String servletName, final String urlPattern,
+         final boolean securedWsdl, final WebResourceCollectionsMetaData webResourceCollectionsMD)
+   {
+      final WebResourceCollectionMetaData webResourceCollectionMD = new WebResourceCollectionMetaData();
+
+      webResourceCollectionMD.setWebResourceName(servletName);
+      webResourceCollectionMD.setUrlPatterns(WebMetaDataHelper.getUrlPatterns(urlPattern));
+      webResourceCollectionMD.setHttpMethods(WebMetaDataHelper.getHttpMethods(securedWsdl));
+      webResourceCollectionsMD.add(webResourceCollectionMD);
+
+      return webResourceCollectionMD;
+   }
+
+   /**
+    * Creates new servlet meta data and associates them with servlets meta data.
+    *
+    * @param servletName servlet name
+    * @param servletClass servlet class name
+    * @param servletsMD servlets meta data
+    * @return new servlet meta data
+    */
+   public static JBossServletMetaData newServlet(final String servletName, final String servletClass,
+         final JBossServletsMetaData servletsMD)
+   {
+      final JBossServletMetaData servletMD = new JBossServletMetaData();
+
+      servletMD.setServletName(servletName);
+      servletMD.setServletClass(servletClass);
+      servletsMD.add(servletMD);
+
+      return servletMD;
+   }
+
+   /**
+    * Creates new servlet mapping meta data and associates them with servlet mappings meta data.
+    *
+    * @param servletName servlet name
+    * @param urlPatterns URL patterns
+    * @param servletMappingsMD servlet mapping meta data
+    * @return new servlet mapping meta data
+    */
+   public static ServletMappingMetaData newServletMapping(final String servletName, final List<String> urlPatterns,
+         final List<ServletMappingMetaData> servletMappingsMD)
+   {
+      final ServletMappingMetaData servletMappingMD = new ServletMappingMetaData();
+
+      servletMappingMD.setServletName(servletName);
+      servletMappingMD.setUrlPatterns(urlPatterns);
+      servletMappingsMD.add(servletMappingMD);
+
+      return servletMappingMD;
+   }
+
+   /**
+    * Creates new authentication constraint and associates it with security constraint meta data.
+    *
+    * @param roleNames roles
+    * @param securityConstraintMD security constraint meta data
+    * @return new authentication constraint meta data
+    */
+   public static AuthConstraintMetaData newAuthConstraint(final List<String> roleNames,
+         final SecurityConstraintMetaData securityConstraintMD)
+   {
+      final AuthConstraintMetaData authConstraintMD = new AuthConstraintMetaData();
+
+      authConstraintMD.setRoleNames(roleNames);
+      securityConstraintMD.setAuthConstraint(authConstraintMD);
+
+      return authConstraintMD;
+   }
+
+   /**
+    * Creates new user constraint meta data and associates it with security constraint meta data.
+    *
+    * @param transportGuarantee transport guarantee value
+    * @param securityConstraintMD security constraint meta data
+    * @return new user data constraint meta data
+    */
+   public static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee,
+         final SecurityConstraintMetaData securityConstraintMD)
+   {
+      final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
+      final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
+
+      userDataConstraintMD.setTransportGuarantee(transportGuaranteeValue);
+      securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
+
+      return userDataConstraintMD;
+   }
+
+   /**
+    * Creates new parameter meta data and associates it with parameters meta data.
+    *
+    * @param key parameter key
+    * @param value parameter value
+    * @param paramsMD parameters meta data
+    * @return new parameter meta data
+    */
+   public static ParamValueMetaData newParamValue(final String key, final String value, final List<ParamValueMetaData> paramsMD)
+   {
+      final ParamValueMetaData paramValueMD = WebMetaDataHelper.newParamValue(key, value);
+
+      paramsMD.add(paramValueMD);
+
+      return paramValueMD;
+   }
+
+   /**
+    * Creates new parameter with specified key and value.
+    *
+    * @param key the key
+    * @param value the value
+    * @return new parameter
+    */
+   private static ParamValueMetaData newParamValue(final String key, final String value)
+   {
+      final ParamValueMetaData paramMD = new ParamValueMetaData();
+
+      paramMD.setParamName(key);
+      paramMD.setParamValue(value);
+
+      return paramMD;
+   }
+
+}


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/java/org/jboss/webservices/integration/util/WebMetaDataHelper.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- Wraps single instance of the kernel -->
+  <bean name="WSIoCContainerProxy" class="org.jboss.webservices.integration.ioc.IoCContainerProxyImpl">
+    <property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
+  </bean>
+
+  <!-- Locate the single instance of the MBeanServer -->
+  <bean name="WSMBeanServerLocator" class="org.jboss.wsf.framework.management.MBeanServerLocator">
+    <constructor>
+      <parameter>
+        <inject bean="JMXKernel" property="mbeanServer"/>
+      </parameter>
+    </constructor>
+  </bean>
+
+  <!-- Endpoint API http server -->
+  <bean name="WSHTTPServer" class="org.jboss.webservices.integration.endpoint.EndpointAPIHttpServer">
+    <constructor>
+      <parameter>
+        <inject bean="MainDeployer"/>
+      </parameter>
+    </constructor>
+  </bean>
+
+  <!-- An abstraction of server configuration aspects. -->
+  <bean name="WSServerConfig" class="org.jboss.webservices.integration.config.ServerConfigImpl">
+    <property name="mbeanServer"><inject bean="WSMBeanServerLocator" property="mbeanServer"/></property>
+
+    <!--
+      The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
+      element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
+
+      If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless 'modifySOAPAddress' is true.
+      If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
+
+      If 'webServiceHost' is set to 'jbossws.undefined.host', JBossWS uses requesters host when rewriting the <soap:address>
+    -->
+    <property name="webServiceHost">${jboss.bind.address}</property>
+    <property name="modifySOAPAddress">true</property>
+
+    <!--
+      Set these properties to explicitly define the ports that will be used for rewriting the SOAP address.
+      Otherwise the ports will be identified by querying the list of installed connectors.
+      If multiple connectors are found the port of the first connector is used.
+      <property name="webServiceSecurePort">8443</property>
+      <property name="webServicePort">8080</property>
+    -->
+  </bean>
+
+  <!-- deployers -->
+  <bean name="WSDescriptorDeployer" class="org.jboss.webservices.integration.deployers.WSDescriptorDeployer">
+    <property name="name">webservices.xml</property>
+    <property name="useSchemaValidation">true</property>
+  </bean>
+
+  <bean name="WSEJBAdapterDeployer" class="org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer"/>
+
+  <bean name="WSTypeDeployer" class="org.jboss.webservices.integration.deployers.WSTypeDeployer"/>
+
+  <bean name="WSDeploymentDeployer" class="org.jboss.webservices.integration.deployers.WSDeploymentDeployer"/>
+
+  <!-- WSDeploymentAspectDeployers factory -->
+  <bean name="WSAspectizedDeployersFactory" class="org.jboss.webservices.integration.deployers.WSAspectizedDeployersFactory">
+    <constructor>
+      <parameter>
+        <inject bean="Deployers"/>
+      </parameter>
+    </constructor>
+    <incallback method="addDeployer"/>
+    <uncallback method="removeDeployer"/>
+  </bean>
+  
+  <!-- The AS specific deployment aspects -->
+  <bean name="WSContainerMetaDataDeploymentAspect" class="org.jboss.webservices.integration.metadata.ContainerMetaDataDeploymentAspect">
+    <property name="provides">ContainerMetaData, VFSRoot</property>
+  </bean>
+
+  <bean name="WSInjectionMetaDataDeploymentAspect" class="org.jboss.webservices.integration.injection.InjectionMetaDataDeploymentAspect">
+    <property name="requires">WebMetaData</property>
+    <property name="provides">InjectionMetaData</property>
+    <property name="ejbReferenceResolver"><inject bean="org.jboss.ejb3.EjbReferenceResolver"/></property>
+  </bean>
+
+  <!-- TODO: remove this hacky aspect -->
+  <bean name="WSJACCPermissionsDeploymentAspect" class="org.jboss.webservices.integration.security.JACCPermissionsDeploymentAspect">
+    <property name="requires">WebMetaData</property>
+    <property name="provides">JACCPermisions</property>
+  </bean>
+
+  <bean name="WSContextRootDeploymentAspect" class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
+    <property name="requires">ContainerMetaData</property>
+    <property name="provides">ContextRoot</property>
+  </bean>
+
+  <bean name="WSVirtualHostDeploymentAspect" class="org.jboss.wsf.framework.deployment.VirtualHostDeploymentAspect">
+    <property name="requires">ContainerMetaData</property>
+    <property name="provides">VirtualHosts</property>
+  </bean>
+
+  <bean name="WSEndpointAddressDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointAddressDeploymentAspect">
+    <property name="requires">URLPattern</property>
+    <property name="provides">EndpointAddress</property>
+  </bean>
+
+  <bean name="WSEndpointLifecycleDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect">
+    <property name="provides">LifecycleHandler</property>
+    <property name="last">true</property>
+  </bean>
+
+  <bean name="WSEndpointMetricsDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
+    <property name="provides">EndpointMetrics</property>
+  </bean>
+
+  <bean name="WSEndpointNameDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
+    <property name="requires">URLPattern</property>
+    <property name="provides">EndpointName</property>
+  </bean>
+
+  <bean name="WSEndpointRegistryDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect">
+    <property name="requires">EndpointName</property>
+    <property name="provides">RegisteredEndpoint</property>
+  </bean>
+
+  <bean name="WSURLPatternDeploymentAspect" class="org.jboss.wsf.framework.deployment.URLPatternDeploymentAspect">
+    <property name="requires">ContextRoot, ContainerMetaData</property>
+    <property name="provides">URLPattern</property>
+  </bean>
+
+  <bean name="WSWebMetaDataModifyingDeploymentAspect" class="org.jboss.webservices.integration.tomcat.WebMetaDataModifyingDeploymentAspect">
+    <property name="requires">WebMetaData, ContextProperties, StackDescriptor</property>
+    <property name="provides">WebMetaData</property>
+  </bean>
+
+  <bean name="WSWebMetaDataCreatingDeploymentAspect" class="org.jboss.webservices.integration.tomcat.WebMetaDataCreatingDeploymentAspect">
+    <property name="requires">VirtualHosts,URLPattern</property>
+    <property name="provides">WebMetaData</property>
+  </bean>
+
+</deployment>


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentModelFactory
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentModelFactory	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.deployment.DeploymentModelFactory	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1 @@
+org.jboss.wsf.framework.deployment.ArchiveDeploymentModelFactory
\ No newline at end of file

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1 @@
+org.jboss.webservices.integration.endpoint.HttpServerFactoryImpl
\ No newline at end of file

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.invocation.InvocationHandlerFactory	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1 @@
+org.jboss.webservices.integration.invocation.InvocationHandlerFactoryImpl
\ No newline at end of file

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.invocation.SecurityAdaptorFactory	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1 @@
+org.jboss.webservices.integration.security.SecurityAdapterFactoryImpl
\ No newline at end of file

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.ioc.IoCContainerProxyFactory
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.ioc.IoCContainerProxyFactory	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.ioc.IoCContainerProxyFactory	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1 @@
+org.jboss.webservices.integration.ioc.IoCContainerProxyFactoryImpl
\ No newline at end of file

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1 @@
+org.jboss.webservices.integration.config.ServerConfigFactoryImpl
\ No newline at end of file

Added: container/jboss60/branches/jbossws-jboss600M2/src/main/scripts/assembly-resources.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600M2/src/main/scripts/assembly-resources.xml	                        (rev 0)
+++ container/jboss60/branches/jbossws-jboss600M2/src/main/scripts/assembly-resources.xml	2010-02-19 17:02:40 UTC (rev 11646)
@@ -0,0 +1,18 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+  <id>resources</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>jbossws-jboss.deployer/**</include>
+        <include>jbossws-jboss.jar/**</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</assembly>
\ No newline at end of file


Property changes on: container/jboss60/branches/jbossws-jboss600M2/src/main/scripts/assembly-resources.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF



More information about the jbossws-commits mailing list