Author: ningjiang
Date: Tue Mar 6 20:09:33 2007
New Revision: 515443
URL: http://svn.apache.org/viewvc?view=rev&rev=515443
Log:
[CXF-446] Applied Jarek's patch for creating service from implementation bean
which does not implement the SEI
NOTE for skipping the tests of ClientServerGreeterBaseNoWsdlTest and
ClientServerGreeterNoWsdlTest
Current CXF's code first approach is implemented by simple front end's
ReflectionServiceFactoryBean.
It work for turning the POJO style Java code into a service model.
It does not consume the Jaxws annotation and take the response message target
namespace as the operation namespace
{http://cxf.apache.org/greeter_control}.And the response message target
namespace actually should be {http://cxf.apache.org/greeter_control/types}.
To fix this issue, we need to implement the creation of service model from
class which is annotated with the Jaxws annotation without WSDL location.
Added:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodDispatcher.java
(with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseNoWsdlTest.java
(with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseTest.java
(with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
(with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBase.java
(with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBaseNoWsdl.java
(with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java
(with props)
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBase.java
(with props)
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBaseNoWsdl.java
(with props)
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplNoWsdl.java
(with props)
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterNoWsdl.java
(with props)
Modified:
incubator/cxf/trunk/parent/pom.xml
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/Messages.properties
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Modified: incubator/cxf/trunk/parent/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/parent/pom.xml?view=diff&rev=515443&r1=515442&r2=515443
==============================================================================
--- incubator/cxf/trunk/parent/pom.xml (original)
+++ incubator/cxf/trunk/parent/pom.xml Tue Mar 6 20:09:33 2007
@@ -190,6 +190,8 @@
<excludes>
<exclude>**/*$*</exclude>
<exclude>**/AbstractServletTest.java</exclude>
+
<exclude>**/ClientServerGreeterBaseNoWsdlTest.java</exclude>
+
<exclude>**/ClientServerGreeterBaseNoWsdlTest.java</exclude>
</excludes>
<reportFormat>${surefire.format}</reportFormat>
<useFile>${surefire.usefile}</useFile>
Added:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodDispatcher.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodDispatcher.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodDispatcher.java
(added)
+++
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodDispatcher.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,83 @@
+/**
+ * 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.jaxws;
+
+import java.lang.reflect.Method;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.frontend.SimpleMethodDispatcher;
+import org.apache.cxf.jaxws.support.JaxWsImplementorInfo;
+import org.apache.cxf.service.factory.ServiceConstructionException;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.OperationInfo;
+
+public class JAXWSMethodDispatcher extends SimpleMethodDispatcher {
+
+ private static final Logger LOG =
LogUtils.getL7dLogger(JAXWSMethodDispatcher.class);
+
+ private JaxWsImplementorInfo implInfo;
+
+ public JAXWSMethodDispatcher(JaxWsImplementorInfo implInfo) {
+ this.implInfo = implInfo;
+ }
+
+ public void bind(OperationInfo o, Method... methods) {
+ Method [] newMethods = new Method[methods.length];
+ int i = 0;
+ for (Method m : methods) {
+ try {
+ newMethods[i++] = getImplementationMethod(m);
+ } catch (NoSuchMethodException e) {
+ Class endpointClass = implInfo.getImplementorClass();
+ Message msg = new Message("SEI_METHOD_NOT_FOUND", LOG,
+ m.getName(),
endpointClass.getName());
+ throw new ServiceConstructionException(msg, e);
+ }
+ }
+ super.bind(o, newMethods);
+ }
+
+ public BindingOperationInfo getBindingOperation(Method method, Endpoint
endpoint) {
+ try {
+ method = getImplementationMethod(method);
+ } catch (NoSuchMethodException e) {
+ // ignore
+ }
+ return super.getBindingOperation(method, endpoint);
+ }
+
+ public Method getImplementationMethod(Method method) throws
NoSuchMethodException {
+ Class<?> endpointClass = implInfo.getImplementorClass();
+
+ if (!endpointClass.isAssignableFrom(method.getDeclaringClass())) {
+ try {
+ method = endpointClass.getMethod(method.getName(),
+
(Class[])method.getParameterTypes());
+ } catch (SecurityException e) {
+ throw new ServiceConstructionException(e);
+ }
+ }
+ return method;
+ }
+
+}
Propchange:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodDispatcher.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodDispatcher.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/Messages.properties
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/Messages.properties?view=diff&rev=515443&r1=515442&r2=515443
==============================================================================
---
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/Messages.properties
(original)
+++
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/Messages.properties
Tue Mar 6 20:09:33 2007
@@ -44,3 +44,5 @@
FAILED_TO_PUBLISH_ENDPOINT_EXC = Failed to publish endpoint.
FAILED_TO_INITIALIZE_JAXBCONTEXT = Failed to initialize JAXB context for types
used by {0}.
ASYNC_HANDLER_TIMEDOUT_EXC = AsynHandler did not complete time.
+
+SEI_METHOD_NOT_FOUND= Service class {1} does not implement {0} method.
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?view=diff&rev=515443&r1=515442&r2=515443
==============================================================================
---
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
(original)
+++
incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Tue Mar 6 20:09:33 2007
@@ -38,7 +38,9 @@
import org.apache.cxf.databinding.source.SourceDataBinding;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.endpoint.EndpointException;
+import org.apache.cxf.frontend.SimpleMethodDispatcher;
import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.jaxws.JAXWSMethodDispatcher;
import org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor;
import org.apache.cxf.jaxws.interceptors.ProviderInDatabindingInterceptor;
import org.apache.cxf.jaxws.interceptors.ProviderOutDatabindingInterceptor;
@@ -63,11 +65,13 @@
* @see org.apache.cxf.jaxws.JaxWsServerFactoryBean
*/
public class JaxWsServiceFactoryBean extends AbstractJaxWsServiceFactoryBean {
-
+
private AbstractServiceConfiguration jaxWsConfiguration;
private JaxWsImplementorInfo implInfo;
+ private JAXWSMethodDispatcher methodDispatcher;
+
public JaxWsServiceFactoryBean() {
getIgnoredClasses().add(Service.class.getName());
}
@@ -79,6 +83,10 @@
this.serviceClass = implInfo.getEndpointClass();
}
+ protected SimpleMethodDispatcher getMethodDispatcher() {
+ return methodDispatcher;
+ }
+
@Override
public void setServiceClass(Class<?> serviceClass) {
if (getJaxWsImplementorInfo() == null) {
@@ -169,7 +177,8 @@
super.initializeWSDLOperations();
}
}
-
+
+
protected void initializeWSDLOperationsForProvider() {
Type[] genericInterfaces = getServiceClass().getGenericInterfaces();
ParameterizedType pt = (ParameterizedType)genericInterfaces[0];
@@ -291,13 +300,13 @@
if (isWrapped(method)) {
if (o.hasInput()) {
MessageInfo input = o.getInput();
- MessagePartInfo part = input.getMessageParts().get(0);
+ MessagePartInfo part = input.getMessageParts().get(0);
part.setTypeClass(getRequestWrapper(method));
}
if (o.hasOutput()) {
MessageInfo input = o.getOutput();
- MessagePartInfo part = input.getMessageParts().get(0);
+ MessagePartInfo part = input.getMessageParts().get(0);
part.setTypeClass(getResponseWrapper(method));
part.setIndex(-1);
}
@@ -386,5 +395,6 @@
jaxWsConfiguration = new JaxWsServiceConfiguration();
getServiceConfigurations().add(0, jaxWsConfiguration);
}
+ methodDispatcher = new JAXWSMethodDispatcher(implInfo);
}
}
Modified:
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java?view=diff&rev=515443&r1=515442&r2=515443
==============================================================================
---
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java
(original)
+++
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/SimpleMethodDispatcher.java
Tue Mar 6 20:09:33 2007
@@ -40,7 +40,7 @@
public void bind(OperationInfo o, Method... methods) {
Method primary = methods[0];
for (Method m : methods) {
- methodToOp.put(m, o);
+ methodToOp.put(m, o);
Map<BindingInfo, BindingOperationInfo> biToBop = new
HashMap<BindingInfo, BindingOperationInfo>();
infoMap.put(m, biToBop);
Modified:
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=515443&r1=515442&r2=515443
==============================================================================
---
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++
incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue Mar 6 20:09:33 2007
@@ -201,7 +201,7 @@
service.putAll(properties);
}
- service.put(MethodDispatcher.class.getName(), methodDispatcher);
+ service.put(MethodDispatcher.class.getName(), getMethodDispatcher());
serviceInfo.setName(getServiceQName());
serviceInfo.setTargetNamespace(serviceInfo.getName().getNamespaceURI());
@@ -335,7 +335,8 @@
createMessageParts(intf, op, m);
}
- methodDispatcher.bind(op, m);
+ getMethodDispatcher().bind(op, m);
+
return op;
}
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseNoWsdlTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseNoWsdlTest.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseNoWsdlTest.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseNoWsdlTest.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,61 @@
+/**
+ * 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.jaxws;
+
+import java.lang.reflect.UndeclaredThrowableException;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.GreeterService;
+import org.apache.cxf.systest.common.ClientServerSetupBase;
+
+public class ClientServerGreeterBaseNoWsdlTest extends TestCase {
+
+ public static Test suite() throws Exception {
+ TestSuite suite = new
TestSuite(ClientServerGreeterBaseNoWsdlTest.class);
+ return new ClientServerSetupBase(suite) {
+ public void startServers() throws Exception {
+ assertTrue("server did not launch correctly",
+ launchServer(ServerGreeterBaseNoWsdl.class));
+ }
+ };
+ }
+
+ public void testInvocation() throws Exception {
+
+ GreeterService service = new GreeterService();
+ assertNotNull(service);
+
+ try {
+ Greeter greeter = service.getGreeterPort();
+
+ String greeting = greeter.greetMe("Bonjour");
+ assertNotNull("no response received from service", greeting);
+ assertEquals("Hello Bonjour", greeting);
+
+ } catch (UndeclaredThrowableException ex) {
+ throw (Exception)ex.getCause();
+ }
+ }
+
+}
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseNoWsdlTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseNoWsdlTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseTest.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseTest.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseTest.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,61 @@
+/**
+ * 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.jaxws;
+
+import java.lang.reflect.UndeclaredThrowableException;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.GreeterService;
+import org.apache.cxf.systest.common.ClientServerSetupBase;
+
+public class ClientServerGreeterBaseTest extends TestCase {
+
+ public static Test suite() throws Exception {
+ TestSuite suite = new TestSuite(ClientServerGreeterBaseTest.class);
+ return new ClientServerSetupBase(suite) {
+ public void startServers() throws Exception {
+ assertTrue("server did not launch correctly",
+ launchServer(ServerGreeterBase.class));
+ }
+ };
+ }
+
+ public void testInvocation() throws Exception {
+
+ GreeterService service = new GreeterService();
+ assertNotNull(service);
+
+ try {
+ Greeter greeter = service.getGreeterPort();
+
+ String greeting = greeter.greetMe("Bonjour");
+ assertNotNull("no response received from service", greeting);
+ assertEquals("Hello Bonjour", greeting);
+
+ } catch (UndeclaredThrowableException ex) {
+ throw (Exception)ex.getCause();
+ }
+ }
+
+}
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterBaseTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,61 @@
+/**
+ * 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.jaxws;
+
+import java.lang.reflect.UndeclaredThrowableException;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.cxf.greeter_control.Greeter;
+import org.apache.cxf.greeter_control.GreeterService;
+import org.apache.cxf.systest.common.ClientServerSetupBase;
+
+public class ClientServerGreeterNoWsdlTest extends TestCase {
+
+ public static Test suite() throws Exception {
+ TestSuite suite = new TestSuite(ClientServerGreeterNoWsdlTest.class);
+ return new ClientServerSetupBase(suite) {
+ public void startServers() throws Exception {
+ assertTrue("server did not launch correctly",
+ launchServer(ServerGreeterNoWsdl.class));
+ }
+ };
+ }
+
+ public void testInvocation() throws Exception {
+
+ GreeterService service = new GreeterService();
+ assertNotNull(service);
+
+ try {
+ Greeter greeter = service.getGreeterPort();
+
+ String greeting = greeter.greetMe("Bonjour");
+ assertNotNull("no response received from service", greeting);
+ assertEquals("Hello Bonjour", greeting);
+
+ } catch (UndeclaredThrowableException ex) {
+ throw (Exception)ex.getCause();
+ }
+ }
+
+}
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerGreeterNoWsdlTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBase.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBase.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBase.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBase.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,46 @@
+/**
+ * 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.jaxws;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.greeter_control.GreeterImplBase;
+import org.apache.cxf.systest.common.TestServerBase;
+
+public class ServerGreeterBase extends TestServerBase {
+
+ protected void run() {
+ Object implementor = new GreeterImplBase();
+ String address = "http://localhost:9020/SoapContext/GreeterPort";
+ Endpoint.publish(address, implementor);
+ }
+
+ public static void main(String[] args) {
+ try {
+ ServerGreeterBase s = new ServerGreeterBase();
+ 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/jaxws/ServerGreeterBase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBaseNoWsdl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBaseNoWsdl.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBaseNoWsdl.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBaseNoWsdl.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,46 @@
+/**
+ * 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.jaxws;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.greeter_control.GreeterImplBaseNoWsdl;
+import org.apache.cxf.systest.common.TestServerBase;
+
+public class ServerGreeterBaseNoWsdl extends TestServerBase {
+
+ protected void run() {
+ Object implementor = new GreeterImplBaseNoWsdl();
+ String address = "http://localhost:9020/SoapContext/GreeterPort";
+ Endpoint.publish(address, implementor);
+ }
+
+ public static void main(String[] args) {
+ try {
+ ServerGreeterBaseNoWsdl s = new ServerGreeterBaseNoWsdl();
+ 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/jaxws/ServerGreeterBaseNoWsdl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterBaseNoWsdl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java
(added)
+++
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,46 @@
+/**
+ * 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.jaxws;
+
+import javax.xml.ws.Endpoint;
+
+import org.apache.cxf.greeter_control.GreeterImplNoWsdl;
+import org.apache.cxf.systest.common.TestServerBase;
+
+public class ServerGreeterNoWsdl extends TestServerBase {
+
+ protected void run() {
+ Object implementor = new GreeterImplNoWsdl();
+ String address = "http://localhost:9020/SoapContext/GreeterPort";
+ Endpoint.publish(address, implementor);
+ }
+
+ public static void main(String[] args) {
+ try {
+ ServerGreeterNoWsdl s = new ServerGreeterNoWsdl();
+ 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/jaxws/ServerGreeterNoWsdl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServerGreeterNoWsdl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBase.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBase.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBase.java
(added)
+++
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBase.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,82 @@
+/**
+ * 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.greeter_control;
+
+import java.util.concurrent.Future;
+
+import javax.jws.WebService;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+
+import org.apache.cxf.greeter_control.types.GreetMeResponse;
+import org.apache.cxf.greeter_control.types.PingMeResponse;
+import org.apache.cxf.greeter_control.types.SayHiResponse;
+
[EMAIL PROTECTED](serviceName = "GreeterService",
+ portName = "GreeterPort",
+ endpointInterface = "org.apache.cxf.greeter_control.Greeter",
+ targetNamespace = "http://cxf.apache.org/greeter_control")
+/* This class does not implement the SEI */
+public class GreeterImplBase {
+
+ public String greetMe(String me) {
+ return "Hello " + me;
+ }
+
+ public String sayHi() {
+ return "Bonjour";
+ }
+
+ public void greetMeOneWay(String requestType) {
+ System.out.println("********* greetMeOneWay: " + requestType);
+ }
+
+ public void pingMe() throws PingMeFault {
+ }
+
+ public Future<?> greetMeAsync(String requestType,
AsyncHandler<GreetMeResponse> asyncHandler) {
+ return null;
+ /*not called */
+ }
+
+ public Response<GreetMeResponse> greetMeAsync(String requestType) {
+ return null;
+ /*not called */
+ }
+
+ public Future<?> sayHiAsync(AsyncHandler<SayHiResponse> asyncHandler) {
+ return null;
+ /*not called */
+ }
+
+ public Response<SayHiResponse> sayHiAsync() {
+ return null;
+ /*not called */
+ }
+
+ public Response<PingMeResponse> pingMeAsync() {
+ return null;
+ }
+
+ public Future<?> pingMeAsync(AsyncHandler<PingMeResponse> asyncHandler) {
+ return null;
+ }
+
+}
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBaseNoWsdl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBaseNoWsdl.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBaseNoWsdl.java
(added)
+++
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBaseNoWsdl.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,31 @@
+/**
+ * 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.greeter_control;
+
+import javax.jws.WebService;
+
[EMAIL PROTECTED](serviceName = "GreeterService",
+ portName = "GreeterPort",
+ endpointInterface = "org.apache.cxf.greeter_control.GreeterNoWsdl",
+ targetNamespace = "http://cxf.apache.org/greeter_control")
+/* This class does not implement the SEI and SEI does not specify wsdlLocation
*/
+public class GreeterImplBaseNoWsdl extends GreeterImplBase {
+
+}
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBaseNoWsdl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplBaseNoWsdl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplNoWsdl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplNoWsdl.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplNoWsdl.java
(added)
+++
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplNoWsdl.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,31 @@
+/**
+ * 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.greeter_control;
+
+import javax.jws.WebService;
+
[EMAIL PROTECTED](serviceName = "GreeterService",
+ portName = "GreeterPort",
+ endpointInterface = "org.apache.cxf.greeter_control.GreeterNoWsdl",
+ targetNamespace = "http://cxf.apache.org/greeter_control")
+/* This class implments the SEI but SEI does not specify wsdlLocation */
+public class GreeterImplNoWsdl extends GreeterImplBase implements
GreeterNoWsdl {
+
+}
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplNoWsdl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterImplNoWsdl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterNoWsdl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterNoWsdl.java?view=auto&rev=515443
==============================================================================
---
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterNoWsdl.java
(added)
+++
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterNoWsdl.java
Tue Mar 6 20:09:33 2007
@@ -0,0 +1,82 @@
+/**
+ * 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.greeter_control;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+/**
+ * This class was generated by the CXF 2.0-incubator-RC-SNAPSHOT
+ * Fri Mar 02 15:33:36 EST 2007
+ * Generated source version: 2.0-incubator-RC-SNAPSHOT
+ *
+ */
+
[EMAIL PROTECTED](targetNamespace = "http://cxf.apache.org/greeter_control",
name = "Greeter")
+
+public interface GreeterNoWsdl {
+
+ @ResponseWrapper(targetNamespace =
"http://cxf.apache.org/greeter_control/types",
+ className =
"org.apache.cxf.greeter_control.types.SayHiResponse",
+ localName = "sayHiResponse")
+ @RequestWrapper(targetNamespace =
"http://cxf.apache.org/greeter_control/types",
+ className = "org.apache.cxf.greeter_control.types.SayHi",
+ localName = "sayHi")
+ @WebResult(targetNamespace =
"http://cxf.apache.org/greeter_control/types", name = "responseType")
+ @WebMethod(operationName = "sayHi")
+ java.lang.String sayHi();
+
+ @ResponseWrapper(targetNamespace =
"http://cxf.apache.org/greeter_control/types",
+ className =
"org.apache.cxf.greeter_control.types.GreetMeResponse",
+ localName = "greetMeResponse")
+ @RequestWrapper(targetNamespace =
"http://cxf.apache.org/greeter_control/types",
+ className =
"org.apache.cxf.greeter_control.types.GreetMe",
+ localName = "greetMe")
+ @WebResult(targetNamespace =
"http://cxf.apache.org/greeter_control/types", name = "responseType")
+ @WebMethod(operationName = "greetMe")
+ java.lang.String greetMe(
+ @WebParam(targetNamespace =
"http://cxf.apache.org/greeter_control/types", name = "requestType")
+ java.lang.String requestType
+ );
+
+ @Oneway
+ @RequestWrapper(targetNamespace =
"http://cxf.apache.org/greeter_control/types",
+ className =
"org.apache.cxf.greeter_control.types.GreetMeOneWay",
+ localName = "greetMeOneWay")
+ @WebMethod(operationName = "greetMeOneWay")
+ void greetMeOneWay(
+ @WebParam(targetNamespace =
"http://cxf.apache.org/greeter_control/types", name = "requestType")
+ java.lang.String requestType
+ );
+
+ @ResponseWrapper(targetNamespace =
"http://cxf.apache.org/greeter_control/types",
+ className =
"org.apache.cxf.greeter_control.types.PingMeResponse",
+ localName = "pingMeResponse")
+ @RequestWrapper(targetNamespace =
"http://cxf.apache.org/greeter_control/types",
+ className = "org.apache.cxf.greeter_control.types.PingMe",
+ localName = "pingMe")
+ @WebMethod(operationName = "pingMe")
+ void pingMe() throws PingMeFault;
+}
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterNoWsdl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/greeter_control/GreeterNoWsdl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date