You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by we...@apache.org on 2007/08/17 12:13:20 UTC
svn commit: r566999 - in
/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis:
Client_deploy.wsdd Scenario2b.java ping/deploy.wsdd
Author: werner
Date: Fri Aug 17 03:13:19 2007
New Revision: 566999
URL: http://svn.apache.org/viewvc?view=rev&rev=566999
Log:
Add an additional interop/deployment test scenario to check the enhancement
to use digest password type for UsernameToken signature.
Added:
webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Scenario2b.java
Modified:
webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
Modified: webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd?view=diff&rev=566999&r1=566998&r2=566999
==============================================================================
--- webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd (original)
+++ webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Client_deploy.wsdd Fri Aug 17 03:13:19 2007
@@ -68,6 +68,18 @@
</requestFlow>
</service>
+ <service name="Ping2b">
+ <requestFlow>
+ <handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
+ <parameter name="action" value="UsernameTokenSignature Timestamp"/>
+ <parameter name="user" value="Chris"/>
+ <parameter name="passwordCallbackClass"
+ value="org.apache.ws.axis.oasis.PWCallback1"/>
+ <parameter name="passwordType" value="PasswordDigest" />
+ </handler>
+ </requestFlow>
+ </service>
+
<service name="Ping3">
<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender" >
Added: webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Scenario2b.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Scenario2b.java?view=auto&rev=566999
==============================================================================
--- webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Scenario2b.java (added)
+++ webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/Scenario2b.java Fri Aug 17 03:13:19 2007
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2003-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.ws.axis.oasis;
+
+import org.apache.axis.utils.Options;
+import org.apache.ws.axis.oasis.ping.PingPort;
+import org.apache.ws.axis.oasis.ping.PingServiceLocator;
+
+import javax.xml.rpc.holders.StringHolder;
+
+/**
+ * Class Scenario2b
+ */
+public class Scenario2b {
+
+ /** Field address */
+ private static final java.lang.String address =
+ "http://localhost:9080/axis/services/Ping2b";
+
+ /**
+ * Method main
+ *
+ * @param args
+ * @throws Exception
+ */
+ public static void main(String[] args) throws Exception {
+
+ Options opts = new Options(args);
+ opts.setDefaultURL(address);
+
+ /*
+ * Start to prepare service call. Once this is done, several
+ * calls can be made on the port (see below)
+ *
+ * Fist: get the service locator. This implements the functionality
+ * to get a client stub (aka port).
+ */
+ PingServiceLocator service = new PingServiceLocator();
+
+ /*
+ * this is a JAX-RPC compliant call. It uses a preconfigured
+ * endpoint address (usually contained in the WSDL). Note the
+ * cast.
+ *
+ * SecPort port = (SwaPort)service.getPort(SwaPortType.class);
+ */
+
+ /*
+ * Here we use an Axis specific call that allows to override the
+ * port address (service endpoint address) with an own URL. Comes
+ * in handy for testing.
+ */
+ java.net.URL endpoint;
+
+ try {
+ endpoint = new java.net.URL(opts.getURL());
+ } catch (java.net.MalformedURLException e) {
+ throw new javax.xml.rpc.ServiceException(e);
+ }
+
+ PingPort port = (PingPort) service.getPing2b(endpoint);
+
+ /*
+ * At this point all preparations are done. Using the port we can
+ * now perform as many calls as necessary.
+ */
+
+ // perform call
+ StringHolder text =
+ new StringHolder("WSS4J - Scenario 2b text");
+ port.ping(new org.apache.ws.axis.oasis.ping.TicketType("WSS4J"), text);
+ System.out.println(text.value);
+
+ if (opts.isFlagSet('t') > 0) {
+ long startTime = System.currentTimeMillis();
+
+ for (int i = 0; i < 20; i++) {
+ port.ping(new org.apache.ws.axis.oasis.ping.TicketType("WSS4J"), text);
+ }
+
+ long endTime = System.currentTimeMillis();
+
+ System.out.println("Time used: " + (endTime - startTime) + "ms");
+ }
+ }
+}
Modified: webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd?view=diff&rev=566999&r1=566998&r2=566999
==============================================================================
--- webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd (original)
+++ webservices/wss4j/trunk/interop/org/apache/ws/axis/oasis/ping/deploy.wsdd Fri Aug 17 03:13:19 2007
@@ -103,6 +103,34 @@
</requestFlow>
</service>
+ <service name="Ping2b" provider="java:RPC" style="wrapped" use="literal">
+ <parameter name="wsdlTargetNamespace" value="http://xmlsoap.org/Ping"/>
+ <parameter name="wsdlServiceElement" value="PingService"/>
+ <parameter name="wsdlServicePort" value="Ping2"/>
+ <parameter name="className" value="org.apache.ws.axis.oasis.ping.PingBindingImpl"/>
+ <parameter name="wsdlPortType" value="PingPort"/>
+ <operation name="ping" qname="operNS:Ping" xmlns:operNS="http://xmlsoap.org/Ping" >
+ <parameter qname="pns:ticket" xmlns:pns="http://xmlsoap.org/Ping" type="tns:ticketType" xmlns:tns="http://xmlsoap.org/Ping"/>
+ <parameter qname="pns:text" xmlns:pns="http://xmlsoap.org/Ping" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema" mode="INOUT"/>
+ </operation>
+ <parameter name="allowedMethods" value="ping"/>
+
+ <typeMapping
+ xmlns:ns="http://xmlsoap.org/Ping"
+ qname="ns:ticketType"
+ type="java:org.apache.ws.axis.oasis.ping.TicketType"
+ serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
+ deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
+ encodingStyle=""
+ />
+ <requestFlow>
+ <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
+ <parameter name="passwordCallbackClass" value="org.apache.ws.axis.oasis.PWCallback1"/>
+ <parameter name="action" value="UsernameTokenSignature UsernameToken Timestamp"/>
+ </handler>
+ </requestFlow>
+ </service>
+
<service name="Ping3" provider="java:RPC" style="wrapped" use="literal">
<parameter name="wsdlTargetNamespace" value="http://xmlsoap.org/Ping"/>
<parameter name="wsdlServiceElement" value="PingService"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org