You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by da...@apache.org on 2007/11/04 23:42:06 UTC
svn commit: r591858 [9/13] - in /openejb/trunk/openejb3: ./
assembly/openejb-tomcat/
assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/
container/openejb-core/
container/openejb-core/src/main/java/org/apache/openejb/
container/openejb-cor...
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbServiceDispatcher.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbServiceDispatcher.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbServiceDispatcher.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbServiceDispatcher.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,39 @@
+/*
+ * 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.openejb.server.axis2.ejb;
+
+import org.apache.axis2.jaxws.core.MessageContext;
+import org.apache.axis2.jaxws.server.dispatcher.JavaBeanDispatcher;
+
+import javax.interceptor.InvocationContext;
+import java.lang.reflect.Method;
+
+public class EjbServiceDispatcher extends JavaBeanDispatcher {
+ private InvocationContext invContext;
+
+ public EjbServiceDispatcher(Class serviceImplClass, InvocationContext invContext) {
+ super(serviceImplClass, null);
+ this.invContext = invContext;
+ }
+
+ protected Object invokeService(MessageContext ctx, Method method, Object obj, Object args[]) throws Exception {
+ this.invContext.setParameters(args);
+ return this.invContext.proceed();
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbWsContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbWsContainer.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbWsContainer.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/ejb/EjbWsContainer.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,75 @@
+/**
+ * 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.openejb.server.axis2.ejb;
+
+import org.apache.openejb.DeploymentInfo;
+import org.apache.openejb.core.webservices.PortData;
+import org.apache.openejb.server.axis2.Axis2WsContainer;
+import org.apache.openejb.server.axis2.AxisServiceGenerator;
+
+import javax.xml.ws.WebServiceException;
+
+public class EjbWsContainer extends Axis2WsContainer {
+ private DeploymentInfo deploymnetInfo;
+
+ public EjbWsContainer(PortData portData, DeploymentInfo deploymentInfo) {
+ super(portData, deploymentInfo.getBeanClass(), deploymentInfo.getJndiEnc());
+ this.deploymnetInfo = deploymentInfo;
+ }
+
+ public void start() throws Exception {
+ super.start();
+
+ String rootContext = null;
+ String servicePath = null;
+ String location = trimContext(this.port.getLocation());
+ int pos = location.indexOf('/');
+ if (pos > 0) {
+ rootContext = location.substring(0, pos);
+ servicePath = location.substring(pos + 1);
+ } else {
+ rootContext = "/";
+ servicePath = location;
+ }
+
+ this.configurationContext.setServicePath(servicePath);
+ //need to setContextRoot after servicePath as cachedServicePath is only built
+ //when setContextRoot is called.
+ this.configurationContext.setContextRoot(rootContext);
+
+ // configure handlers
+ try {
+ configureHandlers();
+ } catch (Exception e) {
+ throw new WebServiceException("Error configuring handlers", e);
+ }
+ }
+
+ protected AxisServiceGenerator createServiceGenerator() {
+ AxisServiceGenerator serviceGenerator = super.createServiceGenerator();
+ EjbMessageReceiver messageReceiver = new EjbMessageReceiver(this, endpointClass, deploymnetInfo);
+ serviceGenerator.setMessageReceiver(messageReceiver);
+ return serviceGenerator;
+ }
+
+ public void destroy() {
+ // call handler preDestroy
+ destroyHandlers();
+ super.destroy();
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManager.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManager.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManager.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManager.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,54 @@
+/*
+ * 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.openejb.server.axis2.pojo;
+
+import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.jaxws.context.factory.MessageContextFactory;
+import org.apache.axis2.jaxws.context.utils.ContextUtils;
+import org.apache.axis2.jaxws.core.MessageContext;
+import org.apache.axis2.jaxws.handler.SoapMessageContext;
+import org.apache.axis2.jaxws.server.endpoint.lifecycle.EndpointLifecycleException;
+import org.apache.axis2.jaxws.server.endpoint.lifecycle.EndpointLifecycleManager;
+
+public class PojoEndpointLifecycleManager implements EndpointLifecycleManager {
+ // This method is called on each web service call.
+ public Object createServiceInstance(MessageContext context, Class serviceClass) throws EndpointLifecycleException {
+ org.apache.axis2.context.MessageContext msgContext = context.getAxisMessageContext();
+
+ ServiceContext serviceContext = msgContext.getServiceContext();
+ Object instance = serviceContext.getProperty(ServiceContext.SERVICE_OBJECT);
+
+ // associate JAX-WS MessageContext with the thread
+ PojoWsContext.setMessageContext(createSOAPMessageContext(context));
+
+ return instance;
+ }
+
+ private javax.xml.ws.handler.MessageContext createSOAPMessageContext(MessageContext mc) {
+ SoapMessageContext soapMessageContext = MessageContextFactory.createSoapMessageContext(mc);
+ ContextUtils.addProperties(soapMessageContext, mc);
+ return soapMessageContext;
+ }
+
+ public void invokePostConstruct() throws EndpointLifecycleException {
+ }
+
+ public void invokePreDestroy() throws EndpointLifecycleException {
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManagerFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManagerFactory.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManagerFactory.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoEndpointLifecycleManagerFactory.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,40 @@
+/*
+ * 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.openejb.server.axis2.pojo;
+
+import org.apache.axis2.jaxws.server.endpoint.lifecycle.EndpointLifecycleException;
+import org.apache.axis2.jaxws.server.endpoint.lifecycle.EndpointLifecycleManager;
+import org.apache.axis2.jaxws.server.endpoint.lifecycle.factory.EndpointLifecycleManagerFactory;
+
+public class PojoEndpointLifecycleManagerFactory extends EndpointLifecycleManagerFactory {
+
+ private EndpointLifecycleManager lifecycleManager;
+
+ public PojoEndpointLifecycleManagerFactory() {
+ this.lifecycleManager = new PojoEndpointLifecycleManager();
+ }
+
+ public EndpointLifecycleManager createEndpointLifecycleManager(Object endpointInstance) throws EndpointLifecycleException {
+ throw new UnsupportedOperationException();
+ }
+
+ public EndpointLifecycleManager createEndpointLifecycleManager() {
+ return this.lifecycleManager;
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContainer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContainer.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContainer.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContainer.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,123 @@
+/**
+ * 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.openejb.server.axis2.pojo;
+
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.jaxws.registry.FactoryRegistry;
+import org.apache.axis2.jaxws.server.endpoint.lifecycle.factory.EndpointLifecycleManagerFactory;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.axis2.transport.http.HTTPTransportUtils;
+import org.apache.openejb.InjectionProcessor;
+import org.apache.openejb.core.webservices.PortData;
+import org.apache.openejb.server.axis2.Axis2WsContainer;
+import org.apache.openejb.server.httpd.HttpRequest;
+import org.apache.openejb.server.httpd.HttpResponse;
+
+import javax.naming.Context;
+import javax.xml.ws.WebServiceException;
+
+public class PojoWsContainer extends Axis2WsContainer {
+ private Object endpointInstance;
+ private String contextRoot;
+ private InjectionProcessor<Object> injectionProcessor;
+
+ public PojoWsContainer(PortData port, Class<?> endpointClass, Context context, String contextRoot) {
+ super(port, endpointClass, context);
+ this.contextRoot = contextRoot;
+ }
+
+ public void start() throws Exception {
+ super.start();
+
+ /*
+ * This replaces EndpointLifecycleManagerFactory for all web services.
+ * This should be ok as we do our own endpoint instance management and injection.
+ */
+ FactoryRegistry.setFactory(EndpointLifecycleManagerFactory.class,
+ new PojoEndpointLifecycleManagerFactory());
+
+ String servicePath = trimContext(getServicePath(this.contextRoot));
+ this.configurationContext.setServicePath(servicePath);
+ //need to setContextRoot after servicePath as cachedServicePath is only built
+ //when setContextRoot is called.
+ String rootContext = trimContext(this.contextRoot);
+ this.configurationContext.setContextRoot(rootContext);
+
+ // instantiate and inject resources into service
+ try {
+ injectionProcessor = new InjectionProcessor<Object>(endpointClass, port.getInjections(), null, null, context);
+ injectionProcessor.createInstance();
+ injectionProcessor.postConstruct();
+ endpointInstance = injectionProcessor.getInstance();
+ } catch (Exception e) {
+ throw new WebServiceException("Service resource injection failed", e);
+ }
+
+ // configure and inject handlers
+ try {
+ configureHandlers();
+ } catch (Exception e) {
+ throw new WebServiceException("Error configuring handlers", e);
+ }
+
+ }
+
+ protected void processPOSTRequest(HttpRequest request, HttpResponse response, AxisService service, MessageContext msgContext) throws Exception {
+ String contentType = request.getHeader(HTTPConstants.HEADER_CONTENT_TYPE);
+ String soapAction = request.getHeader(HTTPConstants.HEADER_SOAP_ACTION);
+ if (soapAction == null) {
+ soapAction = "\"\"";
+ }
+
+ ConfigurationContext configurationContext = msgContext.getConfigurationContext();
+ configurationContext.fillServiceContextAndServiceGroupContext(msgContext);
+
+ setMsgContextProperties(request, response, service, msgContext);
+
+ ServiceContext serviceContext = msgContext.getServiceContext();
+ serviceContext.setProperty(ServiceContext.SERVICE_OBJECT, this.endpointInstance);
+
+ try {
+ HTTPTransportUtils.processHTTPPostRequest(msgContext,
+ request.getInputStream(),
+ response.getOutputStream(),
+ contentType,
+ soapAction,
+ request.getURI().getPath());
+ } finally {
+ // de-associate JAX-WS MessageContext with the thread
+ // (association happens in POJOEndpointLifecycleManager.createService() call)
+ PojoWsContext.clear();
+ }
+ }
+
+ public void destroy() {
+ // call handler preDestroy
+ destroyHandlers();
+
+ // call service preDestroy
+ if (injectionProcessor != null) {
+ injectionProcessor.preDestroy();
+ }
+
+ super.destroy();
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContext.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContext.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContext.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/pojo/PojoWsContext.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,62 @@
+/**
+ * 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.openejb.server.axis2.pojo;
+
+import java.security.Principal;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * Implementation of WebServiceContext for POJO WS to ensure that getUserPrincipal()
+ * and isUserInRole() are properly handled.
+ */
+public class PojoWsContext implements WebServiceContext {
+ private static ThreadLocal<MessageContext> context = new ThreadLocal<MessageContext>();
+
+ public PojoWsContext() {
+ }
+
+ public final MessageContext getMessageContext() {
+ return context.get();
+ }
+
+ private HttpServletRequest getHttpServletRequest() {
+ MessageContext ctx = getMessageContext();
+ return (ctx != null) ? (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST) : null;
+ }
+
+ public final Principal getUserPrincipal() {
+ HttpServletRequest request = getHttpServletRequest();
+ return (request != null) ? request.getUserPrincipal() : null;
+ }
+
+ public final boolean isUserInRole(String user) {
+ HttpServletRequest request = getHttpServletRequest();
+ return request != null && request.isUserInRole(user);
+ }
+
+ public static void setMessageContext(MessageContext ctx) {
+ context.set(ctx);
+ }
+
+ public static void clear() {
+ context.set(null);
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleUriResolver.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleUriResolver.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleUriResolver.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleUriResolver.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,167 @@
+/**
+ * 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.openejb.server.axis2.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+public class SimpleUriResolver {
+ private URI uri;
+ private URL url;
+ private InputStream is;
+
+ public SimpleUriResolver() {
+ }
+
+ public SimpleUriResolver(String path) throws IOException {
+ this("", path);
+ }
+
+ public SimpleUriResolver(String baseUriStr, String uriStr) throws IOException {
+ if (baseUriStr != null && baseUriStr.startsWith("jar:")) {
+ tryJar(baseUriStr, uriStr);
+ } else if (uriStr.startsWith("jar:")) {
+ tryJar(uriStr);
+ } else {
+ tryFileSystem(baseUriStr, uriStr);
+ }
+ }
+
+ public void resolve(String baseUriStr, String uriStr) throws IOException {
+ this.uri = null;
+ this.url = null;
+ this.is = null;
+
+ if (baseUriStr != null && baseUriStr.startsWith("jar:")) {
+ tryJar(baseUriStr, uriStr);
+ } else if (uriStr.startsWith("jar:")) {
+ tryJar(uriStr);
+ } else {
+ tryFileSystem(baseUriStr, uriStr);
+ }
+ }
+
+ private void tryFileSystem(String baseUriStr, String uriStr) throws IOException {
+ try {
+ URI relative;
+ File uriFile = new File(uriStr);
+ uriFile = new File(uriFile.getAbsolutePath());
+
+ if (uriFile.exists()) {
+ relative = uriFile.toURI();
+ } else {
+ relative = new URI(uriStr.replaceAll(" ", "%20"));
+ }
+
+ if (relative.isAbsolute()) {
+ uri = relative;
+ url = relative.toURL();
+ is = url.openStream();
+ } else if (baseUriStr != null) {
+ URI base;
+ File baseFile = new File(baseUriStr);
+
+ if (!baseFile.exists() && baseUriStr.startsWith("file:/")) {
+ baseFile = new File(baseUriStr.substring(6));
+ }
+
+ if (baseFile.exists()) {
+ base = baseFile.toURI();
+ } else {
+ base = new URI(baseUriStr);
+ }
+
+ base = base.resolve(relative);
+ if (base.isAbsolute()) {
+ uri = base;
+ url = base.toURL();
+ is = url.openStream();
+ }
+ }
+ } catch (URISyntaxException e) {
+ // do nothing
+ }
+ }
+
+ private void tryJar(String baseStr, String uriStr) throws IOException {
+ int i = baseStr.indexOf('!');
+ if (i == -1) {
+ tryFileSystem(baseStr, uriStr);
+ }
+
+ String jarBase = baseStr.substring(0, i + 1);
+ String jarEntry = baseStr.substring(i + 1);
+ try {
+ URI u = new URI(jarEntry).resolve(uriStr);
+
+ tryJar(jarBase + u.toString());
+
+ if (is != null) {
+ if (u.isAbsolute()) {
+ url = u.toURL();
+ }
+ return;
+ }
+ } catch (URISyntaxException e) {
+ // do nothing
+ }
+
+ tryFileSystem("", uriStr);
+ }
+
+ private void tryJar(String uriStr) throws IOException {
+ int i = uriStr.indexOf('!');
+ if (i == -1) {
+ return;
+ }
+
+ url = new URL(uriStr);
+ try {
+ is = url.openStream();
+ try {
+ uri = url.toURI();
+ } catch (URISyntaxException ex) {
+ // ignore
+ }
+ } catch (IOException e) {
+ // do nothing
+ }
+ }
+
+ public URI getURI() {
+ return uri;
+ }
+
+ public URL getURL() {
+ return url;
+ }
+
+ public InputStream getInputStream() {
+ return is;
+ }
+
+ public boolean isResolved() {
+ return is != null;
+ }
+}
+
\ No newline at end of file
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleWsdlLocator.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleWsdlLocator.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleWsdlLocator.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/java/org/apache/openejb/server/axis2/util/SimpleWsdlLocator.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,78 @@
+/**
+ * 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.openejb.server.axis2.util;
+
+import org.apache.openejb.util.Logger;
+import org.apache.openejb.util.LogCategory;
+import org.xml.sax.InputSource;
+
+import javax.wsdl.xml.WSDLLocator;
+import java.io.IOException;
+
+public class SimpleWsdlLocator implements WSDLLocator {
+ private static final Logger logger = Logger.getInstance(LogCategory.AXIS2, SimpleWsdlLocator.class);
+
+ private String baseURI;
+ private String lastImportLocation;
+ private SimpleUriResolver resolver;
+
+ public SimpleWsdlLocator(String baseURI) {
+ this.baseURI = baseURI;
+ this.resolver = new SimpleUriResolver();
+ }
+
+ public InputSource getBaseInputSource() {
+ return resolve("", this.baseURI);
+ }
+
+ public String getBaseURI() {
+ return this.baseURI;
+ }
+
+ public InputSource getImportInputSource(String parentLocation, String importLocation) {
+ return resolve(parentLocation, importLocation);
+ }
+
+ protected InputSource resolve(String parentLocation, String importLocation) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Resolving '" + importLocation + "' relative to '" + parentLocation + "'");
+ }
+ try {
+ this.resolver.resolve(parentLocation, importLocation);
+ if (this.resolver.isResolved()) {
+ this.lastImportLocation = this.resolver.getURI().toString();
+ if (logger.isDebugEnabled()) {
+ logger.debug("Resolved location '" + this.lastImportLocation + "'");
+ }
+ return new InputSource(this.resolver.getInputStream());
+ }
+ } catch (IOException e) {
+ // ignore
+ }
+ return null;
+ }
+
+ public String getLatestImportURI() {
+ return this.lastImportLocation;
+ }
+
+ public void close() {
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/main/resources/META-INF/openejb-axis2.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/main/resources/META-INF/openejb-axis2.xml?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/main/resources/META-INF/openejb-axis2.xml (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/main/resources/META-INF/openejb-axis2.xml Sun Nov 4 14:41:49 2007
@@ -0,0 +1,303 @@
+<!--
+ ~ 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.
+ -->
+<axisconfig name="AxisJava2.0">
+ <!-- ================================================= -->
+ <!-- Parameters -->
+ <!-- ================================================= -->
+ <parameter name="hotdeployment">true</parameter>
+ <parameter name="hotupdate">false</parameter>
+ <parameter name="enableMTOM">false</parameter>
+
+ <!--During a fault, stacktrace can be sent with the fault message. The following flag will control -->
+ <!--that behaviour.-->
+ <parameter name="sendStacktraceDetailsWithFaults">true</parameter>
+
+ <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+ <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+ <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+ <!--is set then, Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+ <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+ <!--This is the user name and password of admin console-->
+ <parameter name="userName">admin</parameter>
+ <parameter name="password">axis2</parameter>
+
+ <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+ <!--ServicesDirectory only works on the following cases-->
+ <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+ <!---When creating URL Based configurator with URL âfile://â -->
+ <!--- War based configurator with expanded case , -->
+
+ <!--All the other scenarios it will be ignored.-->
+ <!--<parameter name="ServicesDirectory">service</parameter>-->
+ <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+ <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+ <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+ <!--root which can configured using the following contextRoot parameter-->
+ <!--<parameter name="contextRoot">axis2</parameter>-->
+
+ <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguish those endpoints-->
+ <!--<parameter name="servicePath">services</parameter>-->
+ <!--<parameter name="restPath">rest</parameter>-->
+
+ <!-- Following parameter will completely disable REST handling in Axis2-->
+ <parameter name="disableREST" locked="true">false</parameter>
+
+ <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+ <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+
+ <!-- Following parameter will set the host name for the epr-->
+ <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+ <!-- ================================================= -->
+ <!-- Message Receivers -->
+ <!-- ================================================= -->
+ <!--This is the Default Message Receiver for the system , if you want to have MessageReceivers for -->
+ <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+ <!--any operation -->
+ <!--Note : You can override this for particular service by adding the same element with your requirement-->
+ <messageReceivers>
+ <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+ class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+ <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+ class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+ class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+ <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+ class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ </messageReceivers>
+
+ <!-- ================================================= -->
+ <!-- Message Formatter -->
+ <!-- ================================================= -->
+ <!--Following content type to message formatter mapping can be used to implement support for different message -->
+ <!--format serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+ <messageFormatters>
+ <messageFormatter contentType="application/x-www-form-urlencoded"
+ class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+ <messageFormatter contentType="multipart/form-data"
+ class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+ <messageFormatter contentType="application/xml"
+ class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+ </messageFormatters>
+
+ <!-- ================================================= -->
+ <!-- Message Builders -->
+ <!-- ================================================= -->
+ <!--Following content type to builder mapping can be used to implement support for different message -->
+ <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+ <messageBuilders>
+ <messageBuilder contentType="application/xml"
+ class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+ <messageBuilder contentType="application/x-www-form-urlencoded"
+ class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+ <!--Left commented because it adds the depandancy of servlet-api to other modules.
+ Please uncomment to Receive messages in multipart/form-data format-->
+ <!--<messageBuilder contentType="multipart/form-data"-->
+ <!--class="org.apache.axis2.builder.MultipartFormDataBuilder"/>-->
+ </messageBuilders>
+
+ <!-- ================================================= -->
+ <!-- Target Resolvers -->
+ <!-- ================================================= -->
+ <!-- Uncomment the following and specify the class name for your TargetResolver to add -->
+ <!-- a TargetResolver. TargetResolvers are used to process the To EPR for example to -->
+ <!-- choose a server in a cluster -->
+ <!--<targetResolvers>-->
+ <!--<targetResolver class="" />-->
+ <!--</targetResolvers>-->
+
+
+ <!-- ================================================= -->
+ <!-- Transport Ins -->
+ <!-- ================================================= -->
+ <transportReceiver name="http"
+ class="org.apache.axis2.transport.http.SimpleHTTPServer">
+ <parameter name="port">6060</parameter>
+ <!--If you want to give your own host address for EPR generation-->
+ <!--uncomment following parameter , and set as you required.-->
+ <!--<parameter name="hostname">http://myApp.com/ws</parameter>-->
+ </transportReceiver>
+
+ <transportReceiver name="tcp"
+ class="org.apache.axis2.transport.tcp.TCPServer">
+ <parameter name="port">6061</parameter>
+ <!--If you want to give your own host address for EPR generation-->
+ <!--uncomment following parameter , and set as you required.-->
+ <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+ </transportReceiver>
+
+ <!-- ================================================= -->
+ <!-- Transport Outs -->
+ <!-- ================================================= -->
+
+ <!--<transportSender name="jms"-->
+ <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+ <transportSender name="tcp"
+ class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+ <transportSender name="local"
+ class="org.apache.axis2.transport.local.LocalTransportSender"/>
+ <transportSender name="http"
+ class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL">HTTP/1.1</parameter>
+ <parameter name="Transfer-Encoding">chunked</parameter>
+ </transportSender>
+ <transportSender name="https"
+ class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL">HTTP/1.1</parameter>
+ <parameter name="Transfer-Encoding">chunked</parameter>
+ </transportSender>
+
+ <!-- ================================================= -->
+ <!-- Phases -->
+ <!-- ================================================= -->
+ <phaseOrder type="InFlow">
+ <!-- System pre-defined phases -->
+ <phase name="Transport">
+ <handler name="RequestURIBasedDispatcher"
+ class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+ <order phase="Transport"/>
+ </handler>
+ <handler name="SOAPActionBasedDispatcher"
+ class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+ <order phase="Transport"/>
+ </handler>
+ </phase>
+ <phase name="Security"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+ <handler name="RequestURIBasedDispatcher"
+ class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="SOAPActionBasedDispatcher"
+ class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="AddressingBasedDispatcher"
+ class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+ <handler name="RequestURIOperationDispatcher"
+ class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="SOAPMessageBodyBasedDispatcher"
+ class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="HTTPLocationBasedDispatcher"
+ class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="GenericProviderDispatcher"
+ class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="MustUnderstandValidationDispatcher"
+ class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+ </phase>
+ <phase name="RMPhase"/>
+ <!-- System pre defined phases -->
+ <!-- After Postdispatch phase module author or or service author can add any phase he want -->
+ <phase name="OperationInPhase">
+ <handler name="MustUnderstandChecker"
+ class="org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker">
+ <order phase="OperationInPhase"/>
+ </handler>
+ </phase>
+ </phaseOrder>
+ <phaseOrder type="OutFlow">
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationOutPhase"/>
+ <!--system predefined phase-->
+ <!--these phase will run irrespective of the service-->
+ <phase name="RMPhase"/>
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ <phase name="Security"/>
+ </phaseOrder>
+ <phaseOrder type="InFaultFlow">
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+ <handler name="RequestURIBasedDispatcher"
+ class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="SOAPActionBasedDispatcher"
+ class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="AddressingBasedDispatcher"
+ class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+ <handler name="RequestURIOperationDispatcher"
+ class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="SOAPMessageBodyBasedDispatcher"
+ class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="HTTPLocationBasedDispatcher"
+ class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="GenericProviderDispatcher"
+ class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+
+ <handler name="MustUnderstandValidationDispatcher"
+ class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher">
+ <order phase="Dispatch"/>
+ </handler>
+ </phase>
+ <phase name="RMPhase"/>
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationInPhase">
+ <handler name="MustUnderstandChecker"
+ class="org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker">
+ <order phase="OperationInPhase"/>
+ </handler>
+ </phase>
+ </phaseOrder>
+ <phaseOrder type="OutFaultFlow">
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationOutFaultPhase"/>
+ <phase name="RMPhase"/>
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ </phaseOrder>
+</axisconfig>
\ No newline at end of file
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2AbstractTestCase.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2AbstractTestCase.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2AbstractTestCase.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2AbstractTestCase.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,55 @@
+/*
+ * 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.openejb.server.axis2;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+public abstract class Axis2AbstractTestCase extends TestCase {
+ protected String testDir = "src/test/";
+ protected String sampleDir = "src/main/test/samples/";
+ protected String outDir = "target/generated/samples/";
+ protected String tempDir = "target/generated/temp";
+
+ /**
+ * Constructor.
+ */
+ public Axis2AbstractTestCase(String testName) {
+ super(testName);
+
+ testDir = new File(testDir).getAbsolutePath();
+ sampleDir = new File(sampleDir).getAbsolutePath();
+ outDir = new File(outDir).getAbsolutePath();
+ tempDir = new File(tempDir).getAbsolutePath();
+ }
+
+ /**
+ * Get test input file.
+ *
+ * @param path Path to test input file.
+ */
+ public String getTestFile(String path) {
+ return new File(path).getAbsolutePath();
+ }
+
+ public void testDummy() throws Exception {
+ //to allow commenting out all tests in a test case
+ }
+}
+
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Request.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Request.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Request.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Request.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,114 @@
+/**
+ * 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.openejb.server.axis2;
+
+import org.apache.openejb.server.httpd.HttpRequest;
+import org.apache.openejb.server.httpd.HttpSession;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.Map;
+
+class Axis2Request implements HttpRequest {
+ private int contentLength;
+
+ private String contentType;
+
+ private InputStream in;
+
+ private int method;
+
+ private Map<String,String> parameters;
+
+ private URI uri;
+
+ private Map<String,String> headers;
+
+ private Map<String,Object> attributes;
+
+ private String remoteAddress;
+
+ public Axis2Request(int contentLength, String contentType, InputStream in, int method, Map<String,String> parameters, URI uri, Map<String,String> headers, String remoteAddress) {
+ this.contentLength = contentLength;
+ this.contentType = contentType;
+ this.in = in;
+ this.method = method;
+ this.parameters = parameters;
+ this.uri = uri;
+ this.headers = headers;
+ this.attributes = new HashMap<String,Object>();
+ this.remoteAddress = remoteAddress;
+ }
+
+ public int getContentLength() {
+ return contentLength;
+ }
+
+ public String getContentType() {
+ return contentType;
+ }
+
+ public String getHeader(String name) {
+ return headers.get(name);
+ }
+
+ public InputStream getInputStream() throws IOException {
+ return in;
+ }
+
+ public int getMethod() {
+ return method;
+ }
+
+ public String getParameter(String name) {
+ return parameters.get(name);
+ }
+
+ public Map getParameters() {
+ return parameters;
+ }
+
+ public URI getURI() {
+ return uri;
+ }
+
+ public Object getAttribute(String name) {
+ return attributes.get(name);
+ }
+
+ public void setAttribute(String name, Object value) {
+ attributes.put(name, value);
+ }
+
+ public String getRemoteAddr() {
+ return remoteAddress;
+ }
+
+ public String getContextPath() {
+ return "/axis2";
+ }
+
+ public HttpSession getSession(boolean create) {
+ throw new UnsupportedOperationException();
+ }
+
+ public HttpSession getSession() {
+ throw new UnsupportedOperationException();
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Response.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Response.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Response.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2Response.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,171 @@
+/**
+ * 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.openejb.server.axis2;
+
+import org.apache.openejb.server.httpd.HttpResponse;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+class Axis2Response implements HttpResponse {
+ private int contentLength;
+
+ private String contentType;
+
+ private String host;
+
+ private OutputStream out;
+
+ private int method;
+
+ private Map<String,String> parameters;
+
+ private String path;
+
+ private URL uri;
+
+ private int port;
+
+ private Map<String,String> headers;
+
+ private int statusCode;
+
+ private String statusMessage;
+
+ public Axis2Response(String contentType, String host, String path, URL uri, int port, OutputStream out) {
+ this.contentType = contentType;
+ this.host = host;
+ this.parameters = new HashMap<String,String>();
+ this.path = path;
+ this.uri = uri;
+ this.port = port;
+ this.headers = new HashMap<String,String>();
+ this.out = out;
+ }
+
+ public int getContentLength() {
+ return contentLength;
+ }
+
+ public String getHeader(String name) {
+ return headers.get(name);
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public OutputStream getOutputStream() {
+ return out;
+ }
+
+ public int getMethod() {
+ return method;
+ }
+
+ public String getParameter(String name) {
+ return parameters.get(name);
+ }
+
+ public Map getParameters() {
+ return parameters;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public URL getURI() {
+ return uri;
+ }
+
+ public String getContentType() {
+ return contentType;
+ }
+
+ public URL getUri() {
+ return uri;
+ }
+
+ public void setContentLength(int i) {
+ contentLength = i;
+ }
+
+ public void setContentType(String string) {
+ contentType = string;
+ }
+
+ public void setHost(String string) {
+ host = string;
+ }
+
+ public void setMethod(int i) {
+ method = i;
+ }
+
+ public void setParameters(Map<String,String> map) {
+ parameters = map;
+ }
+
+ public void setPath(String string) {
+ path = string;
+ }
+
+ public void setPort(int i) {
+ port = i;
+ }
+
+ public void setUri(URL url) {
+ uri = url;
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public void setStatusCode(int code) {
+ statusCode = code;
+ }
+
+ public String getStatusMessage() {
+ return statusMessage;
+ }
+
+ public void setStatusMessage(String responseString) {
+ statusMessage = responseString;
+ }
+
+ public void flushBuffer() throws java.io.IOException {
+ }
+
+ public void setHeader(String name, String value) {
+ headers.put(name, value);
+ }
+
+ public PrintWriter getPrintWriter() throws IOException {
+ throw new UnsupportedOperationException();
+ }
+}
+
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2WsContainerTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2WsContainerTest.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2WsContainerTest.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/Axis2WsContainerTest.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,202 @@
+/*
+ * 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.openejb.server.axis2;
+
+import org.apache.openejb.core.webservices.PortData;
+import org.apache.openejb.server.axis2.pojo.PojoWsContainer;
+import org.apache.openejb.server.axis2.testdata.simple.HelloWorld;
+import org.apache.openejb.server.httpd.HttpRequest;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.NodeList;
+
+import java.io.ByteArrayOutputStream;
+import java.net.URI;
+import java.util.HashMap;
+
+public class Axis2WsContainerTest extends Axis2AbstractTestCase {
+ private final String RESOURCE_PATH = testDir+"/resources/";
+ public Axis2WsContainerTest(String testName) {
+ super(testName);
+ }
+
+ /*
+ public void testDocInvokeWithWSDL() throws Exception {
+ invokeWithWSDL("BareDocLitService", "org.apache.openejb.server.axis2.testdata.doclitbare.BareDocLitService",
+ "test_service_doclitbare.wsdl", "test_service_doclitbare_request.xml");
+ }
+ */
+
+ public void testRPCInvokeWithWSDL() throws Exception {
+ invokeWithWSDL("RpcLitService", "org.apache.openejb.server.axis2.testdata.rpclit.RpcLitService",
+ "test_service_rpclit.wsdl", "test_service_rpclit_request.xml");
+ }
+
+ public void XtestGetWSDL() throws Exception {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+
+ PortData port = new PortData();
+ port.setLocation("/axis2/HelloWorld");
+
+ Axis2Request req = new Axis2Request(504,
+ "text/xml; charset=utf-8",
+ null,
+ HttpRequest.GET,
+ new HashMap<String,String>(),
+ new URI("/axis2/HelloWorld?wsdl"),
+ new HashMap<String,String>(),
+ "127.0.0.1");
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ Axis2Response res = new Axis2Response("text/xml; charset=utf-8", "127.0.0.1", null, null, 8080, out);
+
+ PojoWsContainer container = new PojoWsContainer(port, HelloWorld.class, null, "/axis2");
+ container.start();
+ container.onMessage(req, res);
+ out.flush();
+
+ }
+
+ private void invokeWithWSDL(String serviceName, String endPointClassName, String wsdl, String requestFile ) throws Exception {
+// ClassLoader cl = Thread.currentThread().getContextClassLoader();
+// InputStream in = cl.getResourceAsStream(requestFile);
+//
+// //This will reduce number of requests files
+// DocumentBuilder documentBuilder = XmlUtil.newDocumentBuilderFactory().newDocumentBuilder();
+// Document doc = documentBuilder.parse(in);
+//
+// Element root = doc.getDocumentElement();
+// NodeList nodeList = root.getElementsByTagName("soap:Envelope");
+//
+// InputStream request;
+//
+// for(int i = 0; i < nodeList.getLength(); i++){
+// StringBuffer envelope = new StringBuffer("<soap:Envelope");
+// Element element = (Element)nodeList.item(i);
+// NamedNodeMap attributes = element.getAttributes();
+// if(attributes != null){
+// for(int k=0; k < attributes.getLength(); k++){
+// envelope.append(" "+attributes.item(k).getNodeName().trim());
+// envelope.append("=\""+attributes.item(k).getNodeValue().trim()+"\"");
+// }
+// String content = element.getTextContent();
+//
+// if(content != null && !content.equals("")){
+// envelope.append(">");
+//
+// NodeList children = element.getChildNodes();
+// if(children != null){
+// for(int j=0; j < children.getLength(); j++){
+// if(children.item(j).getNodeType() == org.w3c.dom.Node.ELEMENT_NODE){
+// Element child = (Element)children.item(j);
+// envelope.append(getElementContent(child).trim());
+// }else if(children.item(j).getNodeType() == org.w3c.dom.Node.TEXT_NODE){
+// envelope.append(children.item(j).getNodeValue().trim());
+// }
+// }
+// }
+// envelope.append("</soap:Envelope>");
+// }else {
+// envelope.append("/>");
+// }
+// }
+//
+// System.out.println(envelope.toString());
+//
+// request = new ByteArrayInputStream(envelope.toString().getBytes("UTF-8"));
+//
+// PortInfo portInfo = new PortInfo();
+// portInfo.location = "/axis2/" + serviceName;
+//
+// File wsdlFile = new File(RESOURCE_PATH + wsdl);
+// portInfo.wsdlFile = wsdlFile.toURL().toString();
+//
+// try {
+// Axis2Request req = new Axis2Request(504,
+// "text/xml; charset=utf-8",
+// request,
+// HttpRequest.POST,
+// new HashMap<String,String>(),
+// new URI("/axis2/"+serviceName),
+// new HashMap<String,String>(),
+// "127.0.0.1");
+//
+// ByteArrayOutputStream out = new ByteArrayOutputStream();
+// Axis2Response res = new Axis2Response("text/xml; charset=utf-8", "127.0.0.1", null, null, 8080, out);
+//
+// POJOWebServiceContainer container = new POJOWebServiceContainer(portInfo, endPointClassName, cl, null, null, Holder.EMPTY, "/axis2");
+// container.init();
+// container.onMessage(req, res);
+// System.out.println("Response "+out);
+// out.flush();
+//
+// } catch (Throwable ex) {
+// ex.printStackTrace();
+// throw new Exception(ex.toString());
+// } finally {
+// if (request != null) {
+// try {
+// request.close();
+// } catch (IOException ignore) {
+// // ignore
+// }
+// }
+// }
+// }
+ }
+
+ private String getElementContent(Element e){
+ StringBuffer content = new StringBuffer("<"+e.getNodeName());
+ NamedNodeMap attributes = e.getAttributes();
+
+ if(attributes != null){
+ for(int k=0; k < attributes.getLength(); k++){
+ content.append(" "+attributes.item(k).getNodeName()) ;
+ content.append("=\""+attributes.item(k).getNodeValue()+"\"") ;
+ }
+ }
+
+ String value = e.getTextContent();
+
+ if(value != null && !value.equals("")){
+ content.append(">");
+
+ NodeList children = e.getChildNodes();
+ if(children != null){
+ for(int j=0; j < children.getLength(); j++){
+ if(children.item(j).getNodeType() == org.w3c.dom.Node.ELEMENT_NODE){
+ Element child = (Element)children.item(j);
+ content.append(getElementContent(child).trim());
+ }else if(children.item(j).getNodeType() == org.w3c.dom.Node.TEXT_NODE){
+ content.append(children.item(j).getNodeValue().trim());
+ }
+ }
+ }
+ content.append("</"+e.getNodeName()+">");
+ }else {
+ content.append("/>");
+ }
+
+ return content.toString();
+ }
+
+ protected void setUp() throws Exception {
+ }
+
+ protected void tearDown() throws Exception {
+ }
+
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/doclitbare/BareDocLitService.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/doclitbare/BareDocLitService.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/doclitbare/BareDocLitService.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/doclitbare/BareDocLitService.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,44 @@
+/*
+ * 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.openejb.server.axis2.testdata.doclitbare;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(serviceName="BareDocLitService",
+ portName="BareDocLitPort",
+ targetNamespace = "http://doclitbare.axis2.geronimo.apache.org")
+@SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
+ use=SOAPBinding.Use.LITERAL,
+ parameterStyle=SOAPBinding.ParameterStyle.BARE)
+public class BareDocLitService {
+
+ @WebMethod
+ public void oneWayEmpty(){
+ }
+
+ @WebMethod
+ public void oneWay(String param){
+ }
+
+ @WebMethod
+ public String twoWaySimple(int param){
+ return String.valueOf(param);
+ }
+
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/rpclit/RpcLitService.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/rpclit/RpcLitService.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/rpclit/RpcLitService.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/rpclit/RpcLitService.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,40 @@
+/*
+ * 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.openejb.server.axis2.testdata.rpclit;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name="RpcLit",
+ portName="RpcLit",
+ serviceName="RpcLitService",
+ targetNamespace = "http://org/apache/geronimo/axis2/rpclit")
+@SOAPBinding(style=SOAPBinding.Style.RPC,
+ use=SOAPBinding.Use.LITERAL)
+public class RpcLitService {
+
+ @WebMethod
+ public String testSimple(String in){
+ return "Hello "+in;
+ }
+
+ @WebMethod
+ public String testSimple2(String simple2In1, String simple2In2) {
+ return simple2In1 + simple2In2;
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/simple/HelloWorld.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/simple/HelloWorld.java?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/simple/HelloWorld.java (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/java/org/apache/openejb/server/axis2/testdata/simple/HelloWorld.java Sun Nov 4 14:41:49 2007
@@ -0,0 +1,30 @@
+/*
+ * 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.openejb.server.axis2.testdata.simple;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService(name="HelloWorld", targetNamespace = "http://simple.axis2.geronimo.apache.org",
+ wsdlLocation="test_service_simple.wsdl", serviceName="HelloService", portName="HelloPort")
+public class HelloWorld {
+
+ @WebMethod
+ public String sayHello(String me){
+ return "Hello "+me;
+ }
+}
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare.wsdl
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare.wsdl?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare.wsdl (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare.wsdl Sun Nov 4 14:41:49 2007
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+
+<!-- $Rev: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $ -->
+
+<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://doclitbare.axis2.geronimo.apache.org"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="DoclitBare"
+ targetNamespace="http://doclitbare.axis2.geronimo.apache.org">
+
+ <wsdl:types>
+ <xsd:schema
+ targetNamespace="http://doclitbare.axis2.geronimo.apache.org"
+ xmlns:tns="http://doclitbare.axis2.geronimo.apache.org"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="String" type="xsd:string" />
+ <xsd:element name="Integer" type="xsd:int" />
+
+ <xsd:element name="Composite">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="myElement" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- basic fault test, this should be mapped into message part
+ of the generated faultBean
+ -->
+ <xsd:element name="MyFault" type="xsd:string" />
+
+ <!-- wrapper exception and polymorphic fault test
+ This bean should have an associated exception
+ -->
+ <xsd:element name="MyBaseFaultBean" type="tns:BaseFault" />
+
+ <xsd:complexType name="BaseFault">
+ <xsd:sequence>
+ <xsd:element name="message" type="xsd:string" />
+ <xsd:element name="error_code" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="ExtendedFault">
+ <xsd:complexContent>
+ <xsd:extension base="tns:BaseFault">
+ <xsd:sequence>
+ <xsd:element name="another_message" type="xsd:string" />
+ <xsd:element name="another_error_code" type="xsd:int" />
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="NoParam" />
+
+ <wsdl:message name="SingleParam">
+ <wsdl:part name="allByMyself" element="tns:String" />
+ </wsdl:message>
+
+ <wsdl:message name="SingleParamInt">
+ <wsdl:part name="allByMyself" element="tns:Integer" />
+ </wsdl:message>
+
+ <wsdl:message name="SingleParamOther">
+ <wsdl:part name="allByMyself" element="tns:Composite" />
+ </wsdl:message>
+
+ <wsdl:message name="SimpleFault">
+ <wsdl:part name="description" element="tns:MyFault" />
+ </wsdl:message>
+
+ <wsdl:message name="FaultBeanWithWrapper">
+ <wsdl:part name="description" element="tns:MyBaseFaultBean" />
+ </wsdl:message>
+
+ <wsdl:portType name="DocLitBarePortType">
+
+ <wsdl:operation name="oneWayEmpty">
+ <wsdl:input message="tns:NoParam" />
+ </wsdl:operation>
+
+ <wsdl:operation name="oneWay">
+ <wsdl:input message="tns:SingleParam" />
+ </wsdl:operation>
+
+ <wsdl:operation name="twoWaySimple">
+ <wsdl:input message="tns:SingleParamInt" />
+ <wsdl:output message="tns:SingleParam" />
+ </wsdl:operation>
+
+ <wsdl:operation name="twoWayHolder">
+ <wsdl:input message="tns:SingleParamOther" />
+ <wsdl:output message="tns:SingleParamOther" />
+ <wsdl:fault message="tns:SimpleFault" name="twoWayFault"/>
+ <wsdl:fault message="tns:FaultBeanWithWrapper" name="wrapperFault"/>
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="DocLitBare" type="tns:DocLitBarePortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+
+ <wsdl:operation name="oneWayEmpty">
+ <soap:operation soapAction="http://doclitbare.axis2.geronimo.apache.org/oneWayEmpty" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ </wsdl:operation>
+
+ <wsdl:operation name="oneWay">
+ <soap:operation soapAction="http://doclitbare.axis2.geronimo.apache.org/oneWay" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ </wsdl:operation>
+
+ <wsdl:operation name="twoWaySimple">
+ <soap:operation soapAction="twoWaySimple" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="twoWayHolder">
+ <soap:operation soapAction="http://doclitbare.axis2.geronimo.apache.org/twoWayReturn" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ <wsdl:fault name="twoWayFault">
+ <soap:fault use="literal" name="twoWayFault" />
+ </wsdl:fault>
+ <wsdl:fault name="wrapperFault">
+ <soap:fault use="literal" name="wrapperFault" />
+ </wsdl:fault>
+ </wsdl:operation>
+
+
+ </wsdl:binding>
+
+ <wsdl:service name="BareDocLitService">
+ <wsdl:port binding="tns:DocLitBare" name="BareDocLitPort">
+ <soap:address location="http://localhost:8080/axis2/services/BareDocLitService" />
+ </wsdl:port>
+ </wsdl:service>
+
+</wsdl:definitions>
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare_request.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare_request.xml?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare_request.xml (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_doclitbare_request.xml Sun Nov 4 14:41:49 2007
@@ -0,0 +1,43 @@
+<?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.
+-->
+
+<!-- $Rev: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $ -->
+
+<ServiceRequest>
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <oneWayEmpty xmlns="http://doclitbare.axis2.geronimo.apache.org">
+ <NoParam/>
+ </oneWayEmpty>
+ </soap:Body>
+ </soap:Envelope>
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <twoWaySimple xmlns="http://doclitbare.axis2.geronimo.apache.org">
+ <SingleParamInt>25</SingleParamInt>
+ </twoWaySimple>
+ </soap:Body>
+ </soap:Envelope>
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <oneWay xmlns="http://doclitbare.axis2.geronimo.apache.org">
+ <SingleParam>Hello World</SingleParam>
+ </oneWay>
+ </soap:Body>
+ </soap:Envelope>
+</ServiceRequest>
\ No newline at end of file
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit.wsdl
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit.wsdl?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit.wsdl (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit.wsdl Sun Nov 4 14:41:49 2007
@@ -0,0 +1,96 @@
+<?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.
+-->
+
+<!-- $Rev: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $ -->
+
+<wsdl:definitions targetNamespace="http://org/apache/geronimo/axis2/rpclit" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://org/apache/geronimo/axis2/rpclit" xmlns:intf="http://org/apache/geronimo/axis2/rpclit" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <wsdl:message name="testSimpleRequest">
+ <wsdl:part name="simpleIn" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:message name="testSimpleResponse">
+ <wsdl:part name="simpleOut" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:message name="testSimple2Request">
+ <wsdl:part name="simple2In1" type="xsd:string"/>
+ <wsdl:part name="simple2In1" type="xsd:string"/>
+ </wsdl:message>
+
+ <wsdl:message name="testSimple2Response">
+ <wsdl:part name="simple2Out" type="xsd:string"/>
+ </wsdl:message>
+
+
+ <wsdl:portType name="RpcLit">
+
+ <wsdl:operation name="testSimple" parameterOrder="simpleIn">
+ <wsdl:input message="impl:testSimpleRequest" name="testSimpleRequest"/>
+ <wsdl:output message="impl:testSimpleResponse" name="testSimpleResponse"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="testSimple2" parameterOrder="simple2In1 simple2In2">
+ <wsdl:input message="impl:testSimple2Request" name="testSimple2Request"/>
+ <wsdl:output message="impl:testSimple2Response" name="testSimple2Response"/>
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="RpcLitSoapBinding" type="impl:RpcLit">
+
+ <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="testSimple">
+
+ <wsdl:input name="testSimpleRequest">
+ <wsdlsoap:body namespace="http://org/apache/geronimo/axis2/rpclit" use="literal"/>
+ </wsdl:input>
+
+ <wsdl:output name="testSimpleResponse">
+ <wsdlsoap:body namespace="http://org/apache/geronimo/axis2/rpclit" use="literal"/>
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="testSimple2">
+
+ <wsdl:input name="testSimple2Request">
+ <wsdlsoap:body namespace="http://org/apache/geronimo/axis2/rpclit" use="literal"/>
+ </wsdl:input>
+
+ <wsdl:output name="testSimple2Response">
+ <wsdlsoap:body namespace="http://org/apache/geronimo/axis2/rpclit" use="literal"/>
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="RpcLitService">
+
+ <wsdl:port binding="impl:RpcLitSoapBinding" name="RpcLit">
+
+ <wsdlsoap:address location="http://localhost:9080/axis2/services/RpcLitService"/>
+
+ </wsdl:port>
+
+ </wsdl:service>
+
+</wsdl:definitions>
+
Added: openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit_request.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit_request.xml?rev=591858&view=auto
==============================================================================
--- openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit_request.xml (added)
+++ openejb/trunk/openejb3/server/openejb-axis2/src/test/resources/test_service_rpclit_request.xml Sun Nov 4 14:41:49 2007
@@ -0,0 +1,39 @@
+<?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.
+-->
+
+<!-- $Rev: 482336 $ $Date: 2006-12-04 15:12:19 -0500 (Mon, 04 Dec 2006) $ -->
+
+<ServiceRequest>
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <testSimple xmlns="http://org/apache/geronimo/axis2/rpclit">
+ <simpleIn>A</simpleIn>
+ </testSimple>
+ </soap:Body>
+ </soap:Envelope>
+
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
+ <soap:Body>
+ <testSimple2 xmlns="http://org/apache/geronimo/axis2/rpclit">
+ <simple2In1>A</simple2In1>
+ <simple2In1>B</simple2In1>
+ </testSimple2>
+ </soap:Body>
+ </soap:Envelope>
+
+</ServiceRequest>
\ No newline at end of file