Author: ffang
Date: Tue Jul 24 22:00:22 2007
New Revision: 559318
URL: http://svn.apache.org/viewvc?view=rev&rev=559318
Log:
[CXF-776] when use aegis databinding, support number of operation parameters is
more than one
add system test to deploy server using aegis databinding into servlet
container with spring configuration file
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
(with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisServerTest.java
(with props)
incubator/cxf/trunk/systests/src/test/resources/webapp/
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
(with props)
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/web.xml
(with props)
incubator/cxf/trunk/testutils/src/main/java/de/
incubator/cxf/trunk/testutils/src/main/java/de/footprint/
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/auth/
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/auth/AuthServiceImpl.java
(with props)
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/AuthService.java
(with props)
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/Authenticate.java
(with props)
Modified:
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
incubator/cxf/trunk/systests/pom.xml
incubator/cxf/trunk/testutils/pom.xml
Modified:
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java?view=diff&rev=559318&r1=559317&r2=559318
==============================================================================
---
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
(original)
+++
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
Tue Jul 24 22:00:22 2007
@@ -19,6 +19,7 @@
package org.apache.cxf.helpers;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@@ -100,5 +101,31 @@
n = input.read(buffer);
}
return buf.toString();
+ }
+
+ public static String readStringFromStream(InputStream in) throws
IOException {
+
+ StringBuilder sb = new StringBuilder(1024);
+
+ for (int i = in.read(); i != -1; i = in.read()) {
+ sb.append((char)i);
+ }
+
+ in.close();
+
+ return sb.toString();
+ }
+
+ public static byte[] readBytesFromStream(InputStream in) throws
IOException {
+
+ ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
+
+ for (int i = in.read(); i != -1; i = in.read()) {
+ bos.write(i);
+ }
+
+ in.close();
+
+ return bos.toByteArray();
}
}
Modified:
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java?view=diff&rev=559318&r1=559317&r2=559318
==============================================================================
---
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
(original)
+++
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/DocLiteralInInterceptor.java
Tue Jul 24 22:00:22 2007
@@ -39,6 +39,7 @@
import org.apache.cxf.message.Message;
import org.apache.cxf.message.MessageContentsList;
import org.apache.cxf.phase.Phase;
+import org.apache.cxf.service.Service;
import org.apache.cxf.service.model.BindingMessageInfo;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.apache.cxf.service.model.EndpointInfo;
@@ -117,7 +118,7 @@
}
// loop through each child element
- getPara(xmlReader, dr, parameters, itr);
+ getPara(xmlReader, dr, parameters, itr, message);
}
} else {
@@ -196,7 +197,8 @@
private void getPara(DepthXMLStreamReader xmlReader,
DataReader<XMLStreamReader> dr,
MessageContentsList parameters,
- Iterator<MessagePartInfo> itr) {
+ Iterator<MessagePartInfo> itr,
+ Message message) {
boolean hasNext = true;
while (itr.hasNext()) {
@@ -209,10 +211,17 @@
QName rname = xmlReader.getName();
while (part != null
&& !rname.equals(part.getConcreteName())) {
+ String bindingType =
+
message.getExchange().get(Service.class).getDataBinding().getClass().getName();
if (part.getXmlSchema() instanceof XmlSchemaElement) {
- //should check minOccurs=0
- parameters.put(part, null);
- }
+ if (bindingType.endsWith("AegisDatabinding")) {
+ parameters.add(dr.read(part, xmlReader));
+ } else {
+ //should check minOccurs=0
+ parameters.put(part, null);
+ }
+ }
+
if (itr.hasNext()) {
part = itr.next();
} else {
Modified: incubator/cxf/trunk/systests/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/pom.xml?view=diff&rev=559318&r1=559317&r2=559318
==============================================================================
--- incubator/cxf/trunk/systests/pom.xml (original)
+++ incubator/cxf/trunk/systests/pom.xml Tue Jul 24 22:00:22 2007
@@ -245,6 +245,11 @@
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-databinding-aegis</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${project.version}</version>
</dependency>
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java?view=auto&rev=559318
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
Tue Jul 24 22:00:22 2007
@@ -0,0 +1,70 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.systest.aegis;
+
+
+import java.util.List;
+import java.util.logging.Logger;
+
+import de.silberlicht.authservice.AuthService;
+import de.silberlicht.authservice.Authenticate;
+import org.apache.cxf.Bus;
+import org.apache.cxf.aegis.databinding.AegisDatabinding;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class AegisClientServerTest extends AbstractBusClientServerTestBase {
+ static final Logger LOG =
Logger.getLogger(AegisClientServerTest.class.getName());
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly",
launchServer(AegisServerTest.class));
+ }
+
+ @Test
+ public void testAegisClient() throws Exception {
+ Bus bus = new SpringBusFactory().createBus();
+ bus.getInInterceptors().add(new LoggingInInterceptor());
+ bus.getOutInterceptors().add(new LoggingOutInterceptor());
+ AegisDatabinding aegisBinding = new AegisDatabinding();
+ ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
+ proxyFactory.getServiceFactory().setDataBinding(aegisBinding);
+ proxyFactory.setServiceClass(AuthService.class);
+ proxyFactory.setAddress("http://localhost:9002/service");
+ AuthService service = (AuthService) proxyFactory.create();
+ assertTrue(service.authenticate("Joe", "Joe", "123"));
+ assertFalse(service.authenticate("Joe1", "Joe", "fang"));
+ List<String> list = service.getRoles("Joe");
+ assertEquals(1, list.size());
+ assertEquals("Joe", list.get(0));
+ assertEquals("get Joe", service.getAuthentication("Joe"));
+ Authenticate au = new Authenticate();
+ au.setSid("ffang");
+ au.setUid("ffang");
+ assertTrue(service.authenticate(au));
+ au.setUid("ffang1");
+ assertFalse(service.authenticate(au));
+ }
+}
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisClientServerTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisServerTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisServerTest.java?view=auto&rev=559318
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisServerTest.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisServerTest.java
Tue Jul 24 22:00:22 2007
@@ -0,0 +1,102 @@
+/**
+ * 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.
+ */
+
+package org.apache.cxf.systest.aegis;
+
+import java.net.URISyntaxException;
+
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.handler.DefaultHandler;
+import org.mortbay.jetty.handler.HandlerCollection;
+import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
+
+
+public class AegisServerTest extends AbstractBusTestServerBase {
+
+ private org.mortbay.jetty.Server server;
+
+ protected void run() {
+ /*ServerFactoryBean sf = new ServerFactoryBean();
+ sf.setServiceClass(AuthServiceImpl.class);
+ sf.setAddress("http://localhost:9001/service");
+ sf.getServiceFactory().setDataBinding(new AegisDatabinding());
+ sf.getInInterceptors().add(new LoggingInInterceptor());
+ sf.getOutInterceptors().add(new LoggingOutInterceptor());
+ sf.getInFaultInterceptors().add(new LoggingInInterceptor());
+ sf.getOutFaultInterceptors().add(new LoggingOutInterceptor());
+ sf.create();*/
+ System.out.println("Starting Server");
+
+ server = new org.mortbay.jetty.Server();
+
+ SelectChannelConnector connector = new SelectChannelConnector();
+ connector.setPort(9002);
+ server.setConnectors(new Connector[] {connector});
+
+ WebAppContext webappcontext = new WebAppContext();
+ String contextPath = null;
+ try {
+ contextPath = getClass().getResource("/").toURI().getPath();
+ } catch (URISyntaxException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ webappcontext.setContextPath("/");
+
+ webappcontext.setWar(contextPath + "webapp");
+
+ HandlerCollection handlers = new HandlerCollection();
+ handlers.setHandlers(new Handler[] {webappcontext, new
DefaultHandler()});
+
+ server.setHandler(handlers);
+ try {
+ server.start();
+
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+
+ }
+
+ public boolean stopInProcess() throws Exception {
+ boolean ret = super.stopInProcess();
+ if (server != null) {
+ server.stop();
+ }
+ return ret;
+ }
+
+ public static void main(String args[]) {
+ try {
+ AegisServerTest s = new AegisServerTest();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+
+}
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisServerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/aegis/AegisServerTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml?view=auto&rev=559318
==============================================================================
--- incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
Tue Jul 24 22:00:22 2007
@@ -0,0 +1,55 @@
+<?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.
+-->
+<!-- START SNIPPET: beans -->
+<!--beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:simple="http://cxf.apache.org/simple"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd"-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:simple="http://cxf.apache.org/simple"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
+http://www.springframework.org/schema/beans/spring-beans.xsd
+http://cxf.apache.org/simple
+http://cxf.apache.org/schemas/simple.xsd">
+
+ <import resource="classpath:META-INF/cxf/cxf.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
+ <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+ <bean id="aegisDatabinding"
+ class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
+ <bean id="serviceFactory"
+
class="org.apache.cxf.service.factory.ReflectionServiceFactoryBean">
+ <property name="dataBinding" ref="aegisDatabinding"/>
+ </bean>
+ <simple:server address="/service"
serviceClass="de.silberlicht.authservice.AuthService">
+ <simple:serviceFactory>
+ <ref bean="serviceFactory"/>
+ </simple:serviceFactory>
+ <simple:serviceBean>
+ <bean class="de.footprint.www.services.auth.AuthServiceImpl"/>
+ </simple:serviceBean>
+ </simple:server>
+
+</beans>
+<!-- END SNIPPET: beans -->
Propchange:
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/web.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/web.xml?view=auto&rev=559318
==============================================================================
--- incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/web.xml
(added)
+++ incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/web.xml Tue
Jul 24 22:00:22 2007
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!--
+ 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.
+-->
+<!-- START SNIPPET: webxml -->
+<web-app>
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>WEB-INF/beans.xml</param-value>
+ </context-param>
+
+ <listener>
+ <listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>CXFServlet</servlet-name>
+ <display-name>CXF Servlet</display-name>
+ <servlet-class>
+ org.apache.cxf.transport.servlet.CXFServlet
+ </servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>CXFServlet</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+<!-- END SNIPPET: webxml -->
\ No newline at end of file
Propchange:
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange:
incubator/cxf/trunk/systests/src/test/resources/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/cxf/trunk/testutils/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=559318&r1=559317&r2=559318
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Tue Jul 24 22:00:22 2007
@@ -360,8 +360,6 @@
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/hello_world_jbi.wsdl</wsdl>
</wsdlOption>
-
- <!-- will be removed-->
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/test_chars.wsdl</wsdl>
</wsdlOption>
Added:
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/auth/AuthServiceImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/auth/AuthServiceImpl.java?view=auto&rev=559318
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/auth/AuthServiceImpl.java
(added)
+++
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/auth/AuthServiceImpl.java
Tue Jul 24 22:00:22 2007
@@ -0,0 +1,48 @@
+/**
+ * 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.
+ */
+
+package de.footprint.www.services.auth;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import de.silberlicht.authservice.AuthService;
+import de.silberlicht.authservice.Authenticate;
+
+public class AuthServiceImpl implements AuthService {
+
+ public boolean authenticate(String sid, String uid, String pwd) {
+ return sid.equals(uid);
+ }
+
+ public boolean authenticate(Authenticate au) {
+ return au.getUid().equals(au.getSid());
+ }
+
+ public String getAuthentication(String sid) {
+ return "get " + sid;
+ }
+
+ public List<String> getRoles(String sid) {
+ List<String> list = new ArrayList<String>();
+ list.add(sid);
+ return list;
+ }
+
+}
Propchange:
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/auth/AuthServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/java/de/footprint/www/services/auth/AuthServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/AuthService.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/AuthService.java?view=auto&rev=559318
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/AuthService.java
(added)
+++
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/AuthService.java
Tue Jul 24 22:00:22 2007
@@ -0,0 +1,50 @@
+/**
+ * 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.
+ */
+
+package de.silberlicht.authservice;
+
+
+import javax.jws.WebService;
+
+/**
+ * This class was generated by the CXF 2.1-incubator-SNAPSHOT
+ * Tue Jul 24 17:08:55 CST 2007
+ * Generated source version: 2.1-incubator-SNAPSHOT
+ *
+ */
+
[EMAIL PROTECTED](targetNamespace = "http://silberlicht.de/AuthService", name =
"AuthService")
+
+public interface AuthService {
+
+ java.util.List<java.lang.String> getRoles(
+ String sid
+ );
+
+ boolean authenticate(
+ String sid,
+ String uid,
+ String pwd
+ );
+
+ //test bean mode
+ boolean authenticate(Authenticate auth);
+
+ String getAuthentication(String sid);
+}
Propchange:
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/AuthService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/AuthService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/Authenticate.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/Authenticate.java?view=auto&rev=559318
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/Authenticate.java
(added)
+++
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/Authenticate.java
Tue Jul 24 22:00:22 2007
@@ -0,0 +1,56 @@
+/**
+ * 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.
+ */
+
+
+package de.silberlicht.authservice;
+
+
+public class Authenticate {
+
+ protected String sid;
+ protected String uid;
+ protected String pwd;
+
+ public String getSid() {
+ return sid;
+ }
+
+ public void setSid(String value) {
+ this.sid = value;
+ }
+
+ public String getUid() {
+ return uid;
+ }
+
+
+ public void setUid(String value) {
+ this.uid = value;
+ }
+
+
+ public String getPwd() {
+ return pwd;
+ }
+
+ public void setPwd(String value) {
+ this.pwd = value;
+ }
+
+}
Propchange:
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/Authenticate.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/java/de/silberlicht/authservice/Authenticate.java
------------------------------------------------------------------------------
svn:keywords = Rev Date