Author: objectiser
Date: 2010-05-11 06:51:06 -0400 (Tue, 11 May 2010)
New Revision: 650
Added:
branches/gbrown/samples/quickstart/secure_invoke/
branches/gbrown/samples/quickstart/secure_invoke/.settings/
branches/gbrown/samples/quickstart/secure_invoke/.settings/org.eclipse.wst.common.component
branches/gbrown/samples/quickstart/secure_invoke/.settings/org.eclipse.wst.common.project.facet.core.xml
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureHelloWorldWS.wsdl
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureInvoke.bpel
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureInvoke.wsdl
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/bpel-deploy.xml
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/jbossws-cxf.xml
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/jws_handlers.xml
branches/gbrown/samples/quickstart/secure_invoke/build.xml
branches/gbrown/samples/quickstart/secure_invoke/messages/
branches/gbrown/samples/quickstart/secure_invoke/messages/hello_request1.xml
branches/gbrown/samples/quickstart/secure_invoke/readme.txt
branches/gbrown/samples/quickstart/secure_invoke/war/
branches/gbrown/samples/quickstart/secure_invoke/war/resources/
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/classes/
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/jbossws-cxfXX.xml
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/lib/
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/web.xml
branches/gbrown/samples/quickstart/secure_invoke/war/src/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/bpel/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/bpel/samples/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/bpel/samples/quickstart/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/bpel/samples/quickstart/secure_invoke/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/bpel/samples/quickstart/secure_invoke/SecureHelloWorldWS.java
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/ws/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/ws/jaxws/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/ws/jaxws/samples/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/ws/jaxws/samples/wsse/
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/ws/jaxws/samples/wsse/ServerUsernamePasswordCallback.java
branches/gbrown/samples/quickstart/secure_invoke/war/view/
branches/gbrown/samples/quickstart/secure_invoke/war/view/index.jsp
Log:
Initial WS-security related example. Currently the username callback code is associated
with the jaxws invoked service, so that needs to be placed in a jar configured in the
riftsaw.sar - this needs to be sorted out before distributing the example.
Added:
branches/gbrown/samples/quickstart/secure_invoke/.settings/org.eclipse.wst.common.component
===================================================================
---
branches/gbrown/samples/quickstart/secure_invoke/.settings/org.eclipse.wst.common.component
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/.settings/org.eclipse.wst.common.component 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="Quickstart_bpel_simple_invoke">
+ <wb-resource deploy-path="/"
source-path="/bpelContent"/>
+ <dependent-module deploy-path="/"
handle="module:/org.jboss.ide.eclipse.as.wtp.core.vcf.outputFolders/">
+ <dependency-type>consumes</dependency-type>
+ </dependent-module>
+ </wb-module>
+</project-modules>
Added:
branches/gbrown/samples/quickstart/secure_invoke/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
---
branches/gbrown/samples/quickstart/secure_invoke/.settings/org.eclipse.wst.common.project.facet.core.xml
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jbt.bpel.facet.core"/>
+ <installed facet="jbt.bpel.facet.core" version="2.0"/>
+</faceted-project>
Added:
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureHelloWorldWS.wsdl
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureHelloWorldWS.wsdl
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureHelloWorldWS.wsdl 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<definitions name='SecureHelloWorldWSService'
+targetNamespace='http://secure_invoke/helloworld'
+xmlns='http://schemas.xmlsoap.org/wsdl/'
+xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
+xmlns:tns='http://secure_invoke/helloworld'
+xmlns:xsd='http://www.w3.org/2001/XMLSchema'
+xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
+>
+ <types>
+ <xs:schema targetNamespace='http://secure_invoke/helloworld'
version='1.0' xmlns:tns='http://secure_invoke/helloworld'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:element name='sayGoodbye' type='tns:sayGoodbye'/>
+ <xs:element name='sayGoodbyeResponse'
type='tns:sayGoodbyeResponse'/>
+ <xs:element name='sayHello' type='tns:sayHello'/>
+ <xs:element name='sayHelloResponse'
type='tns:sayHelloResponse'/>
+ <xs:complexType name='sayGoodbye'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='toWhom'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='sayGoodbyeResponse'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='return'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='sayHello'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='toWhom'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name='sayHelloResponse'>
+ <xs:sequence>
+ <xs:element minOccurs='0' name='return'
type='xs:string'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name='HelloWorld_sayGoodbye'>
+ <part element='tns:sayGoodbye' name='sayGoodbye'></part>
+ </message>
+ <message name='HelloWorld_sayHello'>
+ <part element='tns:sayHello' name='sayHello'></part>
+ </message>
+ <message name='HelloWorld_sayHelloResponse'>
+ <part element='tns:sayHelloResponse'
name='sayHelloResponse'></part>
+ </message>
+ <message name='HelloWorld_sayGoodbyeResponse'>
+ <part element='tns:sayGoodbyeResponse'
name='sayGoodbyeResponse'></part>
+ </message>
+ <portType name='SecureHelloWorld'>
+ <operation name='sayGoodbye' parameterOrder='sayGoodbye'>
+ <input message='tns:HelloWorld_sayGoodbye'></input>
+ <output message='tns:HelloWorld_sayGoodbyeResponse'></output>
+ </operation>
+ <operation name='sayHello' parameterOrder='sayHello'>
+ <input message='tns:HelloWorld_sayHello'></input>
+ <output message='tns:HelloWorld_sayHelloResponse'></output>
+ </operation>
+ </portType>
+ <binding name='SecureHelloWorldBinding'
type='tns:SecureHelloWorld'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='sayGoodbye'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ <operation name='sayHello'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='SecureHelloWorldWSService'>
+ <port binding='tns:SecureHelloWorldBinding'
name='SecureHelloWorldPort'>
+ <soap:address
location='http://127.0.0.1:8080/Quickstart_bpel_secure_invoke/SecureHelloWorldWS'/>
+ </port>
+ </service>
+ <plnk:partnerLinkType name="theExternalService_PartnerLinkType">
+ <plnk:role name="callingTheExternalService"
portType="tns:SecureHelloWorld"/>
+ </plnk:partnerLinkType>
+</definitions>
Added: branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureInvoke.bpel
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureInvoke.bpel
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureInvoke.bpel 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,96 @@
+<!--
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, 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.
+ -->
+<process name="SecureInvoke"
+
targetNamespace="http://www.jboss.org/bpel/examples"
+
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
+
xmlns:tns="http://www.jboss.org/bpel/examples"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns:intf2="http://secure_invoke/helloworld"
+ queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
+
expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
+
+ <import location="SecureInvoke.wsdl"
+
namespace="http://www.jboss.org/bpel/examples/wsdl"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <import location="SecureHelloWorldWS.wsdl"
+ namespace="http://secure_invoke/helloworld"
+
importType="http://schemas.xmlsoap.org/wsdl/" />
+
+ <partnerLinks>
+ <partnerLink name="theClient_PartnerLink"
+ partnerLinkType="intf:myClientCalling_PartnerLinkType"
+ myRole="me" />
+ <partnerLink name="theExternalService_PartnerLink"
+ partnerLinkType="intf2:theExternalService_PartnerLinkType"
+ partnerRole="callingTheExternalService"
+ initializePartnerRole="yes"/>
+ </partnerLinks>
+
+ <variables>
+ <variable name="myVar"
messageType="intf:GreetingTarget_Message"/>
+ <variable name="inVar"
messageType="intf2:HelloWorld_sayHello"/>
+ <variable name="outVar"
messageType="intf2:HelloWorld_sayHelloResponse"/>
+ <variable name="tempVar" type="xsd:string"/>
+ </variables>
+
+ <sequence>
+ <receive
+ name="request"
+ partnerLink="theClient_PartnerLink"
+ portType="intf:SecureInvoke_PortType"
+ operation="sayHelloTo"
+ variable="myVar"
+ createInstance="yes"/>
+
+ <assign name="assignRequestToHelloWorldWS">
+ <!-- Ode requires variable initialization -->
+ <copy>
+ <from><literal><intf2:sayHello><toWhom
xmlns=""/></intf2:sayHello></literal></from>
+ <to variable="inVar" part="sayHello"/>
+ </copy>
+ <!-- now the real copy -->
+ <copy>
+ <from variable="myVar" part="ToWhom"/>
+ <to>$inVar.sayHello/toWhom</to>
+ </copy>
+ </assign>
+
+ <invoke name="ICallTheExternalService"
+ partnerLink="theExternalService_PartnerLink"
+ portType="intf2:SecureHelloWorld"
+ operation="sayHello"
+ inputVariable="inVar"
+ outputVariable="outVar"
+ />
+
+ <assign name="assignResponseOfHelloWorldWS">
+ <copy>
+ <from>concat($outVar.sayHelloResponse/return,' and
BPEL')</from>
+ <to variable="myVar" part="ToWhom"/>
+ </copy>
+ </assign>
+
+ <reply name="response"
+ partnerLink="theClient_PartnerLink"
+ portType="intf:SecureInvoke_PortType"
+ operation="sayHelloTo"
+ variable="myVar"/>
+ </sequence>
+</process>
Added: branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureInvoke.wsdl
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureInvoke.wsdl
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/SecureInvoke.wsdl 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, 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.
+ -->
+<wsdl:definitions
+
targetNamespace="http://www.jboss.org/bpel/examples/wsdl"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:tns="http://www.jboss.org/bpel/examples/wsdl"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype">
+
+ <wsdl:message name="GreetingTarget_Message">
+ <wsdl:part name="ToWhom" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:portType name="SecureInvoke_PortType">
+ <wsdl:operation name="sayHelloTo">
+ <wsdl:input message="tns:GreetingTarget_Message"
name="TestIn"/>
+ <wsdl:output message="tns:GreetingTarget_Message"
name="TestOut"/>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="SecureInvoke_SoapBinding"
type="tns:SecureInvoke_PortType">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sayHelloTo">
+ <soap:operation soapAction="" style="rpc"/>
+ <wsdl:input>
+ <soap:body
+
namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body
+
namespace="http://www.jboss.org/bpel/examples/wsdl"
+ use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SecureInvoke_Service">
+ <wsdl:port name="SecureInvoke_Port"
binding="tns:SecureInvoke_SoapBinding">
+ <soap:address
location="http://localhost:8080/Quickstart_bpel_secure_invokeWS"/>
+ </wsdl:port>
+ </wsdl:service>
+
+ <plnk:partnerLinkType name="myClientCalling_PartnerLinkType">
+ <plnk:role name="me"
portType="tns:SecureInvoke_PortType"/>
+ <plnk:role name="you"
portType="tns:SecureInvoke_PortType"/>
+ </plnk:partnerLinkType>
+</wsdl:definitions>
+
Added: branches/gbrown/samples/quickstart/secure_invoke/bpelContent/bpel-deploy.xml
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/bpelContent/bpel-deploy.xml
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/bpel-deploy.xml 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,32 @@
+<!--
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, 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.
+ -->
+<deploy
xmlns="http://www.apache.org/ode/schemas/dd/2007/03"
+
xmlns:bpl="http://www.jboss.org/bpel/examples"
+
xmlns:intf="http://www.jboss.org/bpel/examples/wsdl"
+ xmlns:intf2="http://secure_invoke/helloworld">
+
+ <process name="bpl:SecureInvoke">
+ <active>true</active>
+ <provide partnerLink="theClient_PartnerLink">
+ <service name="intf:SecureInvoke_Service"
port="SecureInvoke_Port"/>
+ </provide>
+ <invoke partnerLink="theExternalService_PartnerLink">
+ <service name="intf2:SecureHelloWorldWSService"
port="SecureHelloWorldPort"/>
+ </invoke>
+ </process>
+</deploy>
Added: branches/gbrown/samples/quickstart/secure_invoke/bpelContent/jbossws-cxf.xml
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/bpelContent/jbossws-cxf.xml
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/jbossws-cxf.xml 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,34 @@
+<beans
+
xmlns='http://www.springframework.org/schema/beans'
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+
xmlns:beans='http://www.springframework.org/schema/beans'
+
xmlns:jaxws='http://cxf.apache.org/jaxws'
+
xsi:schemaLocation='http://cxf.apache.org/core
+
http://cxf.apache.org/schemas/core.xsd
+
http://www.springframework.org/schema/beans
+
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+
http://cxf.apache.org/jaxws
+
http://cxf.apache.org/schemas/jaxws.xsd'>
+
+ <bean id="UsernameToken_Request"
class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken"/>
+ <!-- <entry key="passwordType"
value="PasswordDigest"/> -->
+ <entry key="passwordCallbackClass"
value="org.jboss.test.ws.jaxws.samples.wsse.ServerUsernamePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+
+ <jaxws:endpoint
+ id='SecureHelloWorldWS'
+ address='http://@jboss.bind.address@:8080/Quickstart_bpel_secure_invokeWS'
+ implementor='@provider@'>
+ <jaxws:inInterceptors>
+ <ref bean="UsernameToken_Request"/>
+ <bean
class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
+
+</beans>
Added: branches/gbrown/samples/quickstart/secure_invoke/bpelContent/jws_handlers.xml
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/bpelContent/jws_handlers.xml
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/bpelContent/jws_handlers.xml 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+
http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<handler-chains
xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>LoggingHandler</handler-name>
+ <handler-class>demo.handlers.common.LoggingHandler</handler-class>
+ <handler-property name="test">value</handler-property>
+ <init-param>
+ <param-name>test</param-name>
+ <param-value>MyService</param-value>
+ </init-param>
+ </handler>
+ </handler-chain>
+</handler-chains>
Added: branches/gbrown/samples/quickstart/secure_invoke/build.xml
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/build.xml
(rev 0)
+++ branches/gbrown/samples/quickstart/secure_invoke/build.xml 2010-05-11 10:51:06 UTC
(rev 650)
@@ -0,0 +1,87 @@
+<project name="Quickstart_bpel_secure_invoke" default="deploy"
basedir=".">
+
+ <description>
+ ${ant.project.name}
+ ${line.separator}
+ </description>
+
+ <!-- Import the base Ant build script... -->
+ <property file="../../../install/deployment.properties" />
+
+ <property name="version" value="1" />
+
+ <property name="server.dir"
value="${org.jboss.as.home}/server/${org.jboss.as.config}"/>
+ <property name="conf.dir" value="${server.dir}/conf"/>
+ <property name="deploy.dir" value="${server.dir}/deploy"/>
+ <property name="server.lib.dir" value="${server.dir}/lib"/>
+
+ <property name="sample.jar.name"
value="${ant.project.name}-${version}.jar" />
+
+ <property name="war.build.dir"
location="build/war/classes"/>
+
+ <path id="compile-classpath">
+ <fileset dir="${org.jboss.as.home}/client" includes="*.jar"
/> <!-- Required for JMS Client Code. -->
+ </path>
+ <property name="compile-classpath"
refid="compile-classpath"/>
+
+ <target name="makewar" description="make war">
+ <!-- Compile... -->
+ <mkdir dir="${war.build.dir}" />
+ <javac srcdir="war/src" destdir="${war.build.dir}"
debug="true">
+ <classpath>
+ <path refid="compile-classpath" />
+ <fileset dir="war/resources/WEB-INF/lib"
includes="*.jar" />
+ </classpath>
+ </javac>
+
+ <!-- War... -->
+ <war warfile="build/${ant.project.name}.war"
+ webxml="${basedir}/war/resources/WEB-INF/web.xml">
+ <webinf dir="${basedir}/war/resources/WEB-INF">
+ <include name="jboss-web.xml"/>
+ <include name="jbossws-cxf.xml"/>
+ </webinf>
+ <classes dir="${war.build.dir}"
includes="**/*.class"/>
+ <fileset dir="${basedir}/war/view">
+ <include name="**/*"/>
+ </fileset>
+ <classes dir="${basedir}">
+ <include name="juddi.properties"/>
+ </classes>
+ </war>
+ </target>
+
+ <target name="deploywar" depends="makewar" >
+ <copy todir="${deploy.dir}"
+ file="build/${ant.project.name}.war"/>
+ </target>
+
+ <target name="undeploywar">
+ <delete file="${deploy.dir}/${ant.project.name}.war"/>
+ </target>
+
+ <target name="deploy" depends="deploywar" >
+ <echo>Deploy ${ant.project.name}</echo>
+ <jar basedir="bpelContent"
destfile="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+ <target name="undeploy" depends="undeploywar" >
+ <echo>Undeploy ${ant.project.name}</echo>
+ <delete file="${deploy.dir}/${sample.jar.name}" />
+ </target>
+
+ <target name="sendhello">
+ <echo>Send test message to: ${ant.project.name}</echo>
+ <java
classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
+ <arg
value="http://localhost:8080/Quickstart_bpel_secure_invokeWS"/>
+ <arg value="messages/hello_request1.xml"/>
+ <classpath>
+ <fileset dir="../../common/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ <pathelement path="${java.class.path}"/>
+ </classpath>
+ </java>
+ </target>
+
+</project>
Added: branches/gbrown/samples/quickstart/secure_invoke/messages/hello_request1.xml
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/messages/hello_request1.xml
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/messages/hello_request1.xml 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,8 @@
+<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsdl="http://www.jboss.org/bpel/examples/wsdl">
+ <soapenv:Header/>
+ <soapenv:Body>
+ <wsdl:sayHelloTo>
+ <ToWhom>ME</ToWhom>
+ </wsdl:sayHelloTo>
+ </soapenv:Body>
+</soapenv:Envelope>
Added: branches/gbrown/samples/quickstart/secure_invoke/readme.txt
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/readme.txt
(rev 0)
+++ branches/gbrown/samples/quickstart/secure_invoke/readme.txt 2010-05-11 10:51:06 UTC
(rev 650)
@@ -0,0 +1,31 @@
+Quickstart Examples - Simple Invoke
+===================================
+
+This is a simple echo example, used to respond to a sent message with a
+modified version of the request message being returned in a response. The
+difference with this example, compared to the Hello World sample, is
+that the invoked service calls another JAX-WS based service to construct
+the response message. The BPEL process in this example, is primarily
+acting as a relay between the client and the invoked JAX-WS service, although
+the BPEL process also appends some text to the response message aswell.
+
+To deploy the example, open a command line window in the example's folder,
+and simply type 'ant deploy'. To undeploy, use the command 'ant
undeploy'.
+
+To test the example, for example using the SOAPUI client, an example message
+can be found in the messages sub-folder, with the relevant WSDL being
+located in the bpel sub-folder.
+
+Alternatively, use the 'ant sendhello' command (from a command line window)
+to send the example message directly to the deployed process.
+
+NOTE: The "ant deploy" command will by default deploy version 1 of the
+example to the server. If you wish to change the example, and redeploy,
+then you will need to update the version number in the build.xml, or
+override the version property, e.g. "ant -Dversion=2 deploy" (and similarly
+when undeploying "ant -Dversion=2 undeploy").
+
+Some handy URLs:
+http://localhost:8080/bpel-console is the BPEL console
+http://localhost:8080/Quickstart_bpel_simple_invokeWS?wsdl is the URL to the BPEL
process' WSDL
+http://localhost:8080/Quickstart_bpel_simple_invoke/HelloWorldWS?wsdl is the JBossWS
endpoint's WSDL
Added:
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/jbossws-cxfXX.xml
===================================================================
---
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/jbossws-cxfXX.xml
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/jbossws-cxfXX.xml 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,34 @@
+<beans
+
xmlns='http://www.springframework.org/schema/beans'
+
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+
xmlns:beans='http://www.springframework.org/schema/beans'
+
xmlns:jaxws='http://cxf.apache.org/jaxws'
+
xsi:schemaLocation='http://cxf.apache.org/core
+
http://cxf.apache.org/schemas/core.xsd
+
http://www.springframework.org/schema/beans
+
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+
http://cxf.apache.org/jaxws
+
http://cxf.apache.org/schemas/jaxws.xsd'>
+
+ <bean id="UsernameToken_Request"
class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken"/>
+ <!-- <entry key="passwordType"
value="PasswordDigest"/> -->
+ <entry key="passwordCallbackClass"
value="org.jboss.test.ws.jaxws.samples.wsse.ServerUsernamePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+
+ <jaxws:endpoint
+ id='SecureHelloWorldWS'
+
address='http://@jboss.bind.address@:8080/Quickstart_bpel_secure_invoke/SecureHelloWorldWS'
+
implementor='org.jboss.soa.bpel.samples.quickstart.secure_invoke.SecureHelloWorldWS'>
+ <jaxws:inInterceptors>
+ <ref bean="UsernameToken_Request"/>
+ <bean
class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
+
+</beans>
Added: branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/web.xml
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/web.xml
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/war/resources/WEB-INF/web.xml 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,18 @@
+<?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>SecureHelloWorldWS</servlet-name>
+
<servlet-class>org.jboss.soa.bpel.samples.quickstart.secure_invoke.SecureHelloWorldWS</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>SecureHelloWorldWS</servlet-name>
+ <url-pattern>/SecureHelloWorldWS</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Added:
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/bpel/samples/quickstart/secure_invoke/SecureHelloWorldWS.java
===================================================================
---
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/bpel/samples/quickstart/secure_invoke/SecureHelloWorldWS.java
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/soa/bpel/samples/quickstart/secure_invoke/SecureHelloWorldWS.java 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,56 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.bpel.samples.quickstart.secure_invoke;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.WebParam;
+
+@WebService(name = "SecureHelloWorld", targetNamespace =
"http://secure_invoke/helloworld")
+public class SecureHelloWorldWS
+{
+ @WebMethod
+ public String sayHello(@WebParam(name = "toWhom")
+ String toWhom)
+ {
+ System.out.println("\n");
+ System.out.println("*************************************************");
+ System.out.println("toWhom Parameter: " + toWhom );
+ System.out.println("*************************************************");
+ System.out.println("\n");
+ String greeting = "Secure Hello " + toWhom + ". Sincerely,
JBossWS";
+ return greeting;
+
+ }
+
+ @WebMethod
+ public String sayGoodbye(@WebParam(name = "toWhom")
+ String toWhom)
+ {
+
+ String greeting = "Secure Goodbye Cruel World, sincerely '" + toWhom
+ "' at " + new java.util.Date();
+
+ return greeting;
+
+ }
+}
Added:
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/ws/jaxws/samples/wsse/ServerUsernamePasswordCallback.java
===================================================================
---
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/ws/jaxws/samples/wsse/ServerUsernamePasswordCallback.java
(rev 0)
+++
branches/gbrown/samples/quickstart/secure_invoke/war/src/org/jboss/test/ws/jaxws/samples/wsse/ServerUsernamePasswordCallback.java 2010-05-11
10:51:06 UTC (rev 650)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.test.ws.jaxws.samples.wsse;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class ServerUsernamePasswordCallback implements CallbackHandler
+{
+ public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException
+ {
+ WSPasswordCallback pc = (WSPasswordCallback)callbacks[0];
+
+System.out.println("**************** GPB: CHECK ID: "+pc.getIdentifer());
+
+ if (!("kermit".equals(pc.getIdentifer()) &&
"thefrog".equals(pc.getPassword())))
+ throw new SecurityException("User '" + pc.getIdentifer() +
"' with password '" + pc.getPassword() + "' not
allowed.");
+ }
+}
Added: branches/gbrown/samples/quickstart/secure_invoke/war/view/index.jsp
===================================================================
--- branches/gbrown/samples/quickstart/secure_invoke/war/view/index.jsp
(rev 0)
+++ branches/gbrown/samples/quickstart/secure_invoke/war/view/index.jsp 2010-05-11
10:51:06 UTC (rev 650)
@@ -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