[jboss-svn-commits] JBL Code SVN: r15340 - in labs/jbossesb/trunk/product: samples/quickstarts/webservice_bpel/war/resources/META-INF and 17 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Sep 24 12:16:56 EDT 2007


Author: tfennelly
Date: 2007-09-24 12:16:55 -0400 (Mon, 24 Sep 2007)
New Revision: 15340

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/README.html
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/deployment.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/images/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/images/client-console.png
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/images/esb-console.png
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbm-queue-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbmq-queue-service.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jndi.properties
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/lib/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/listener.log
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/log4j.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/jboss-wsse-client.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/wsse.keystore
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/wsse.truststore
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/Hello.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/UserType.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/client/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/client/WSSClient.java
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-wsse-server.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/web.xml
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/wsse.keystore
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/wsse.truststore
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/view/
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/view/index.jsp
Modified:
   labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml
   labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
Log:
Verify WS-Security support when running with SOAPProcessor Action: http://jira.jboss.com/jira/browse/JBESB-730

Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml	2007-09-24 16:04:47 UTC (rev 15339)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_bpel/war/resources/META-INF/jaxb-intros.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -20,10 +20,10 @@
         </Method>
     </Class>
     <Class name="com.activebpel.ordermanagement.CancelOrder">
-        <XmlType name="cancelOrder" propOrder="orderInquiry" />
+        <XmlType name="cancelOrder" />
     </Class>
     <Class name="com.activebpel.ordermanagement.OrderInquiry">
-        <XmlType name="orderInquiry" propOrder="customerNumber, poNumber" />
+        <XmlType name="orderInquiry" />
     </Class>
 
     <!--

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/README.html
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/README.html	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/README.html	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,39 @@
+<html>
+    <head>
+        <title>JBossESB - WS-Addressing Quickstart</title>
+    </head>
+    <body>
+        <h2>Overview</h2>
+        This sample demonstrates how to implement a secure webservice using WS-Security and access it through
+        an ESB endpoint.  JBossESB relies of JBossWS for WS-Security support.
+        <a href="http://jbws.dyndns.org/mediawiki/index.php?title=User_Guide#WS-Security">See more here</a>.
+
+        <h2>Prerequisits</h2>
+        Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
+        and a more detailed descripton of the different ways to run the quickstarts.
+        <p/>
+        Note, this quickstart requires an ESB and JBossWS installation into
+        JBoss AS 4.2.1.GA. Installation instructions for both can be found in the
+        install/readme.txt.
+
+        <h2>To Run</h2>
+        <ol>
+            <li>In a command terminal window in this folder ("Window1"), type 'ant deploy'.</li>
+            <li>Open another command terminal window in this folder ("Window2"), type
+                'ant runtest'.
+            </li>
+            <li>Check "Window1" and "Window2" for output.</li>
+            <li>To undeploy, type 'ant undeploy' in "Window1".</li>
+        </ol>
+
+        "Window1" should contain ESB Server side logging from the quickstart, showing the message before and
+        after execution through the SOAPProcessor.
+        <p/>
+        <img src="images/esb-console.png" />
+        <p/>
+        "Window2" should contain Client side logging from the quickstart, showing the view of the shopping
+        carts for both client port instances as the cart transitions through its different states.
+        <p/>
+        <img src="images/client-console.png" />
+    </body>
+</html>

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,46 @@
+<project name="Quickstart_webservice_wss" default="deploy" basedir=".">
+
+    <description>
+        ${ant.project.name}
+        ${line.separator}
+    </description>
+
+    <!-- Import the base Ant build script... -->
+    <import file="../conf/base-build.xml"/>
+
+    <target name="quickstart-specific-dependencies" depends="assert-ws-available">
+        <path id="quickstart-dependencies-classpath">
+            <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar,jboss-remoting.jar"/>
+        </path>
+    </target>
+
+    <target name="quickstart-specific-assemblies">
+        <!-- Overriden from the target of the same name in base-build.xml. -->
+        <!-- Called by the "deploy" target.  Don't call directly!! -->
+
+        <!-- Build the webservice... -->
+        <war warfile="build/${ant.project.name}.war"
+             webxml="${basedir}/war/resources/WEB-INF/web.xml">
+            <fileset dir="${basedir}/war/view">
+                <include name="**/*"/>
+            </fileset>
+            <fileset dir="${basedir}/war/resources/">
+                <include name="WEB-INF/**/*"/>
+            </fileset>
+        </war>
+    </target>
+
+    <target name="runtest" depends="compile" description="runs test JMS Sender">
+        <java fork="yes" classname="org.jboss.test.ws.jaxws.samples.wssecurity.client.WSSClient"
+              failonerror="true">
+            <classpath refid="exec-classpath"/>
+            <sysproperty key="org.jboss.ws.wsse.keyStore" value="src/META-INF/wsse.keystore"/>
+            <sysproperty key="org.jboss.ws.wsse.trustStore" value="src/META-INF/wsse.truststore"/>
+            <sysproperty key="org.jboss.ws.wsse.keyStorePassword" value="jbossws"/>
+            <sysproperty key="org.jboss.ws.wsse.trustStorePassword" value="jbossws"/>
+            <sysproperty key="org.jboss.ws.wsse.keyStoreType" value="jks"/>
+            <sysproperty key="org.jboss.ws.wsse.trustStoreType" value="jks"/>
+        </java>
+    </target>
+
+</project>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/build.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/deployment.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/deployment.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/deployment.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,5 @@
+<jbossesb-deployment>
+    <depends>jboss.esb:deployment=soap.esb</depends>
+    <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_webservice_wss_esb</depends>
+    <depends>jboss.esb.quickstart.destination:service=Queue,name=quickstart_webservice_wss_esb_reply</depends>
+</jbossesb-deployment>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/deployment.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/images/client-console.png
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/images/client-console.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/images/esb-console.png
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/images/esb-console.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbm-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbm-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbm-queue-service.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+    <mbean code="org.jboss.jms.server.destination.QueueService"
+           name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_webservice_wss_esb"
+           xmbean-dd="xmdesc/Queue-xmbean.xml">
+        <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+        <depends>jboss.messaging:service=PostOffice</depends>
+    </mbean>
+    <mbean code="org.jboss.jms.server.destination.QueueService"
+           name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_webservice_wss_esb_reply"
+           xmbean-dd="xmdesc/Queue-xmbean.xml">
+        <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
+        <depends>jboss.messaging:service=PostOffice</depends>
+    </mbean>
+</server>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbm-queue-service.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbmq-queue-service.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbmq-queue-service.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbmq-queue-service.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<server>
+    <mbean code="org.jboss.mq.server.jmx.Queue"
+           name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_webservice_wss_esb">
+        <depends optional-attribute-name="DestinationManager">
+            jboss.mq:service=DestinationManager
+        </depends>
+    </mbean>
+    <mbean code="org.jboss.mq.server.jmx.Queue"
+           name="jboss.esb.quickstart.destination:service=Queue,name=quickstart_webservice_wss_esb_reply">
+        <depends optional-attribute-name="DestinationManager">
+            jboss.mq:service=DestinationManager
+        </depends>
+    </mbean>
+</server>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jbmq-queue-service.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,47 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<jbossesb
+        xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"
+        parameterReloadSecs="5">
+
+    <providers>
+        <jms-provider name="JBossMQ" connection-factory="ConnectionFactory"
+                      jndi-context-factory="org.jnp.interfaces.NamingContextFactory"
+                      jndi-URL="localhost">
+            <jms-bus busid="quickstartEsbChannel">
+                <jms-message-filter dest-type="QUEUE" dest-name="queue/quickstart_webservice_wss_esb"/>
+            </jms-bus>
+        </jms-provider>
+
+        <jbr-provider name="JBR-Http" protocol="http" host="localhost">
+            <jbr-bus busid="Http-1" port="9876" />
+        </jbr-provider>
+
+    </providers>
+
+    <services>
+
+        <service category="MyServiceCategory" name="MyWssService" description="WS Frontend speaks natively to the ESB">
+
+            <listeners>
+                <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" maxThreads="1"/>
+
+                <jms-listener name="JMS-ESBListener" busidref="quickstartEsbChannel" maxThreads="1"/>
+            </listeners>
+            <actions>
+                <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message"
+                              value="[Quickstart_webservice_wssecurity] Message before invoking jbossws endpoint"/>
+                </action>
+                <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
+                    <property name="jbossws-endpoint" value="HelloService"/>
+                </action>
+                <action name="print-after" class="org.jboss.soa.esb.actions.SystemPrintln">
+                    <property name="message"
+                              value="[Quickstart_webservice_wssecurity] Message after invoking jbossws endpoint"/>
+                </action>
+            </actions>
+        </service>
+
+    </services>
+
+</jbossesb>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jboss-esb.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jndi.properties
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jndi.properties	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jndi.properties	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,5 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.url.pkgs=org.jboss.naming
+java.naming.factory.url.pkgs=org.jnp.interfaces
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/jndi.properties
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/listener.log
===================================================================

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/log4j.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/log4j.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/log4j.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <!-- The default pattern: Date Priority [Category] Message\n -->
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A size based file rolling appender -->
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="./listener.log"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
+     </layout>	    
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="org.jboss">
+      <priority value="WARN"/>
+   </category>
+   <category name="org.jboss.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.jboss.internal.soa.esb">
+      <priority value="ERROR"/>
+   </category>
+   <category name="org.apache">
+      <priority value="ERROR"/>
+   </category>
+   <category name="quickstart">
+      <priority value="INFO"/>
+   </category>
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/log4j.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/jboss-wsse-client.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/jboss-wsse-client.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/jboss-wsse-client.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+    <config>
+        <encrypt type="x509v3" alias="wsse"/>
+        <!-- sign type="x509v3" alias="wsse"/ -->
+        <requires>
+            <encryption/>
+            <!-- signature/ -->
+        </requires>
+    </config>
+</jboss-ws-security>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/jboss-wsse-client.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/wsse.keystore
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/wsse.keystore
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/wsse.truststore
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/META-INF/wsse.truststore
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/Hello.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/Hello.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/Hello.java	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,36 @@
+
+package org.jboss.test.ws.jaxws.samples.wssecurity;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.1-b03-
+ * Generated source version: 2.0
+ * 
+ */
+ at WebService(name = "Hello", targetNamespace = "http://org.jboss.ws/samples/wssecurity")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Hello {
+
+    public static final String SERVICE_NAME = "HelloService";
+    public static final String SERVICE_NAMESPACE = "http://org.jboss.ws/samples/wssecurity";
+
+    /**
+     * 
+     * @param user
+     * @return
+     *     returns org.jboss.test.ws.jaxws.samples.wssecurity.UserType
+     */
+    @WebMethod
+    @WebResult(partName = "return")
+    public UserType echoUserType(
+        @WebParam(name = "user", partName = "user")
+        UserType user);
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/Hello.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.wssecurity;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.annotation.EndpointConfig;
+
+ at WebService(name = "Hello", serviceName = "HelloService", targetNamespace = "http://org.jboss.ws/samples/wssecurity")
+ at EndpointConfig(configName = "Standard WSSecurity Endpoint")
+ at SOAPBinding(style = SOAPBinding.Style.RPC)
+public class HelloJavaBean
+{
+   private Logger log = Logger.getLogger(HelloJavaBean.class);
+
+   @WebMethod
+   public UserType echoUserType(@WebParam(name = "user") UserType in0)
+   {
+      log.info(in0);
+      return in0;
+   }
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/HelloJavaBean.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/UserType.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/UserType.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/UserType.java	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,60 @@
+
+package org.jboss.test.ws.jaxws.samples.wssecurity;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for UserType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="UserType">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="msg" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "UserType", propOrder = {
+    "msg"
+})
+public class UserType {
+
+    protected String msg;
+
+    /**
+     * Gets the value of the msg property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getMsg() {
+        return msg;
+    }
+
+    /**
+     * Sets the value of the msg property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setMsg(String value) {
+        this.msg = value;
+    }
+
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/UserType.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/client/WSSClient.java
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/client/WSSClient.java	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/client/WSSClient.java	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.test.ws.jaxws.samples.wssecurity.client;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.test.ws.jaxws.samples.wssecurity.Hello;
+import org.jboss.test.ws.jaxws.samples.wssecurity.UserType;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.RemoteException;
+import java.util.Map;
+
+/**
+ * WSA Client.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class WSSClient {
+
+    public static void main(String[] args) throws MalformedURLException, RemoteException {
+        Hello hello = getEndpointPort();
+
+        UserType userType = new UserType();
+        userType.setMsg("Hello ESB");
+        UserType retObj = hello.echoUserType(userType);
+        System.out.println("Echo received '" + retObj.getMsg() +  "'.");
+    }
+
+    private static Hello getEndpointPort() throws MalformedURLException {
+        QName serviceName = new QName(Hello.SERVICE_NAMESPACE, Hello.SERVICE_NAME);
+        URL wsdlURL = new URL("http://localhost:8080/contract/contract.jsp?serviceCat=MyServiceCategory&serviceName=MyWssService&protocol=http");
+        //URL wsdlURL = new URL("http://127.0.0.1:8080/Quickstart_webservice_wss?wsdl");
+        //URL wsdlURL = new URL("http://127.0.0.1:8080/jaxws-samples-wssecurity-sign?wsdl");
+
+        Service service = Service.create(wsdlURL, serviceName);
+        Hello endpoint = service.getPort(Hello.class);
+
+        ((StubExt) endpoint).setSecurityConfig("jboss-wsse-client.xml");
+        ((StubExt) endpoint).setConfigName("Standard WSSecurity Client");
+
+        Map<String, Object> reqContext = ((BindingProvider) endpoint).getRequestContext();
+        reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:9876/");
+        //reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://127.0.0.1:8080/Quickstart_webservice_wss");
+        //reqContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://127.0.0.1:8080/jaxws-samples-wssecurity-sign");
+
+        return endpoint;
+    }
+}


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/src/org/jboss/test/ws/jaxws/samples/wssecurity/client/WSSClient.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-wsse-server.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-wsse-server.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-wsse-server.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                   xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
+    <key-store-file>WEB-INF/wsse.keystore</key-store-file>
+    <key-store-password>jbossws</key-store-password>
+    <trust-store-file>WEB-INF/wsse.truststore</trust-store-file>
+    <trust-store-password>jbossws</trust-store-password>
+    <config>
+        <encrypt type="x509v3" alias="wsse"/>
+        <!-- sign type="x509v3" alias="wsse"/ -->
+        <requires>
+            <encryption/>
+            <!-- signature/ -->
+        </requires>
+    </config>
+</jboss-ws-security>
\ No newline at end of file


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/jboss-wsse-server.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/web.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/web.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/web.xml	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+  version="2.4">
+
+  <servlet>
+    <servlet-name>HelloService</servlet-name>
+    <servlet-class>org.jboss.test.ws.jaxws.samples.wssecurity.HelloJavaBean</servlet-class>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>HelloService</servlet-name>
+    <url-pattern>/*</url-pattern>
+  </servlet-mapping>
+</web-app>
+


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
   + text/xml
Name: svn:eol-style
   + native

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/wsse.keystore
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/wsse.keystore
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/wsse.truststore
===================================================================
(Binary files differ)


Property changes on: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/resources/WEB-INF/wsse.truststore
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/view/index.jsp
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/view/index.jsp	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_wssecurity/war/view/index.jsp	2007-09-24 16:16:55 UTC (rev 15340)
@@ -0,0 +1,9 @@
+<html>
+	<body>
+		This is just a place holder.<br>
+		Verify the that the WS has been deployed by hitting 
+			<a href="http://localhost:8080/jbossws">
+				http://localhost:8080/jbossws
+			</a>
+  </body>
+</html>	
\ No newline at end of file

Modified: labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java
===================================================================
--- labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2007-09-24 16:04:47 UTC (rev 15339)
+++ labs/jbossesb/trunk/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/WebserviceContractPublisher.java	2007-09-24 16:16:55 UTC (rev 15340)
@@ -98,24 +98,30 @@
 
     public ContractInfo getContractInfo(EPR epr, HttpServletRequest servletRequest) {
         Endpoint endpoint = SOAPProcessor.getServiceEndpoint(endpointName);
-        String targetServiceCat = servletRequest.getParameter("serviceCat");
-        String targetServiceName = servletRequest.getParameter("serviceName");
-        String targetProtocol = servletRequest.getParameter("protocol");
-        RequestHandler requestHandler = endpoint.getRequestHandler();
-        ByteArrayOutputStream wsdlStream =  new ByteArrayOutputStream();
-        InvocationContext invocationContext;
 
-        invocationContext = new ServletRequestContext(null, servletRequest, null);
+        if(endpoint != null) {
+            String targetServiceCat = servletRequest.getParameter("serviceCat");
+            String targetServiceName = servletRequest.getParameter("serviceName");
+            String targetProtocol = servletRequest.getParameter("protocol");
+            RequestHandler requestHandler = endpoint.getRequestHandler();
+            ByteArrayOutputStream wsdlStream =  new ByteArrayOutputStream();
+            InvocationContext invocationContext;
 
-        try {
-            // Generate the WSDL...
-            requestHandler.handleWSDLRequest(endpoint, wsdlStream, invocationContext);
-            String wsdl = updateWsdl(new String(wsdlStream.toByteArray()), epr, targetServiceCat, targetServiceName, targetProtocol);
+            invocationContext = new ServletRequestContext(null, servletRequest, null);
 
-            return new ContractInfo("text/xml", wsdl);
-        } catch (Exception e) {
-            logger.error("Failed to load contract information from JBossWS Endpoint '" + endpointName + "'.", e);
-            return new ContractInfo("text/plain", "Unavailable: " + e.getMessage());
+            try {
+                // Generate the WSDL...
+                requestHandler.handleWSDLRequest(endpoint, wsdlStream, invocationContext);
+                String wsdl = updateWsdl(new String(wsdlStream.toByteArray()), epr, targetServiceCat, targetServiceName, targetProtocol);
+
+                return new ContractInfo("text/xml", wsdl);
+            } catch (Exception e) {
+                logger.error("Failed to load contract information from JBossWS Endpoint '" + endpointName + "'.", e);
+                return new ContractInfo("text/plain", "Unavailable: " + e.getMessage());
+            }
+        } else {
+            logger.warn("Requested contract info for unknown webservice endpoint '" + endpointName + "'.");
+            return null;
         }
     }
 




More information about the jboss-svn-commits mailing list