You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2009/06/09 12:51:47 UTC
svn commit: r782951 - in
/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr: ./
src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/
src/test/java/org/apache/servicemix/cxf/binding/nmr/ src/test/resources/
Author: ffang
Date: Tue Jun 9 10:51:47 2009
New Revision: 782951
URL: http://svn.apache.org/viewvc?rev=782951&view=rev
Log:
[SMX4-291]Improve test coverage :: SMX4 :: cxf-binding-nmr
Added:
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/GreeterImpl.java (with props)
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/HackOperationInterceptor.java (with props)
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/NMRClientServerTest.java (with props)
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/Server.java (with props)
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/cxf-binding-nmr.xml (with props)
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/hello_world_nmr.wsdl (with props)
Modified:
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/pom.xml
servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java
Modified: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/pom.xml?rev=782951&r1=782950&r2=782951&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/pom.xml (original)
+++ servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/pom.xml Tue Jun 9 10:51:47 2009
@@ -39,11 +39,23 @@
<version>${servicemix.nmr.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.servicemix.nmr</groupId>
+ <artifactId>org.apache.servicemix.nmr.core</artifactId>
+ <version>${servicemix.nmr.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-testutils</artifactId>
+ <version>${cxf.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
<version>${geronimo.wsmetadata.version}</version>
@@ -140,6 +152,32 @@
</systemProperties>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-codegen-plugin</artifactId>
+ <version>${cxf.version}</version>
+ <executions>
+ <execution>
+ <id>generate-test-sources</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <sourceRoot>${basedir}/target/generated</sourceRoot>
+ <wsdlOptions>
+ <wsdlOption>
+ <wsdl>${basedir}/src/test/resources/hello_world_nmr.wsdl</wsdl>
+ <extraargs>
+ <extraarg>-verbose</extraarg>
+ </extraargs>
+ </wsdlOption>
+ </wsdlOptions>
+ </configuration>
+ <goals>
+ <goal>wsdl2java</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
Modified: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java?rev=782951&r1=782950&r2=782951&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java (original)
+++ servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/main/java/org/apache/servicemix/cxf/binding/nmr/interceptors/NMROperationInInterceptor.java Tue Jun 9 10:51:47 2009
@@ -50,7 +50,8 @@
Exchange ex = message.getExchange();
Endpoint ep = ex.get(Endpoint.class);
BindingOperationInfo boi = ex.get(BindingOperationInfo.class);
- if (boi == null && message.getNmrExchange().getOperation() != null) {
+ if (boi == null && message.getNmrExchange()!= null
+ && message.getNmrExchange().getOperation() != null) {
BindingInfo service = ep.getEndpointInfo().getBinding();
boi = getBindingOperationInfo(service, message.getNmrExchange().getOperation());
if (boi == null) {
Added: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/GreeterImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/GreeterImpl.java?rev=782951&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/GreeterImpl.java (added)
+++ servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/GreeterImpl.java Tue Jun 9 10:51:47 2009
@@ -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.servicemix.cxf.binding.nmr;
+
+import javax.jws.WebService;
+
+import org.apache.hello_world.nmr.Greeter;
+import org.apache.hello_world.nmr.PingMeFault;
+import org.apache.hello_world.types.nmr.FaultDetail;
+
+
+@WebService(serviceName = "HelloWorldService",
+ portName = "SoapPort",
+ endpointInterface = "org.apache.hello_world.nmr.Greeter",
+ targetNamespace = "http://apache.org/hello_world/nmr"
+ )
+public class GreeterImpl implements Greeter {
+
+ public String sayHi() {
+ return "Bonjour";
+ }
+
+ public String greetMe(String requestType) {
+ return "Hello " + requestType;
+ }
+
+ public void greetMeOneWay(String requestType) {
+ System.out.println("OneWay get invoked");
+ }
+
+ public void pingMe() throws PingMeFault {
+ FaultDetail faultDetail = new FaultDetail();
+ faultDetail.setMajor((short)2);
+ faultDetail.setMinor((short)1);
+ throw new PingMeFault("PingMeFault raised by server", faultDetail);
+
+ }
+
+}
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/GreeterImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/GreeterImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/HackOperationInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/HackOperationInterceptor.java?rev=782951&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/HackOperationInterceptor.java (added)
+++ servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/HackOperationInterceptor.java Tue Jun 9 10:51:47 2009
@@ -0,0 +1,37 @@
+package org.apache.servicemix.cxf.binding.nmr;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.AbstractPhaseInterceptor;
+import org.apache.cxf.phase.Phase;
+import org.apache.servicemix.cxf.binding.nmr.interceptors.NMROperationInInterceptor;
+import org.apache.servicemix.nmr.api.Exchange;
+import org.apache.servicemix.nmr.api.Pattern;
+import org.apache.servicemix.nmr.core.ExchangeImpl;
+
+public class HackOperationInterceptor extends AbstractPhaseInterceptor<NMRMessage> {
+
+ private int index = 1;
+
+ public HackOperationInterceptor() {
+ super(Phase.PRE_PROTOCOL);
+ addBefore(NMROperationInInterceptor.class.getName());
+ }
+
+ public void handleMessage(NMRMessage message) throws Fault {
+ ExchangeImpl exchange = new ExchangeImpl(Pattern.InOut);
+
+ if (index == 1) {
+ exchange.setOperation(new QName("http://apache.org/hello_world/nmr", "greetMe"));
+ index++;
+ } else if (index == 2) {
+ exchange.setOperation(new QName("http://apache.org/hello_world/nmr", "sayHi"));
+ index++;
+ } else if (index == 3) {
+ exchange.setOperation(new QName("http://apache.org/hello_world/nmr", "pingMe"));
+ index++;
+ }
+ message.put(Exchange.class, exchange);
+ }
+}
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/HackOperationInterceptor.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/HackOperationInterceptor.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/NMRClientServerTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/NMRClientServerTest.java?rev=782951&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/NMRClientServerTest.java (added)
+++ servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/NMRClientServerTest.java Tue Jun 9 10:51:47 2009
@@ -0,0 +1,81 @@
+/**
+ * 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.servicemix.cxf.binding.nmr;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.configuration.spring.ConfigurerImpl;
+import org.apache.cxf.test.TestApplicationContext;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
+import org.apache.hello_world.nmr.Greeter;
+import org.apache.hello_world.nmr.HelloWorldService;
+import org.apache.hello_world.nmr.PingMeFault;
+import org.apache.servicemix.cxf.binding.nmr.interceptors.NMROperationInInterceptorTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class NMRClientServerTest extends AbstractClientServerTestBase {
+ private final QName serviceName = new QName(
+ "http://apache.org/hello_world/nmr",
+ "HelloWorldService");
+ private static final String S1 =
+ NMROperationInInterceptorTest.class.getResource("/META-INF/cxf/cxf.xml").toString();
+ private static final String S2 =
+ NMROperationInInterceptorTest.class.getClassLoader().getResource("cxf-binding-nmr.xml").toString();
+
+ @BeforeClass
+ public static void startServers() throws Exception {
+ assertTrue("server did not launch correctly", launchServer(Server.class, true));
+ }
+
+
+ @Test
+ public void testNMRBinding() throws Exception {
+ URL wsdl = getClass().getClassLoader().getResource("./hello_world_nmr.wsdl");
+ assertNotNull(wsdl);
+
+ TestApplicationContext ctx = new TestApplicationContext(new String[] {
+ S1, S2 });
+ ConfigurerImpl cfg = new ConfigurerImpl(ctx);
+ Bus bus = (Bus) ctx.getBean(Bus.DEFAULT_BUS_ID);
+ bus.setExtension(cfg, Configurer.class);
+
+ HelloWorldService ss = new HelloWorldService(wsdl, serviceName);
+ QName portName = new QName("http://apache.org/hello_world/nmr", "SoapPort");
+ ss.addPort(portName, NMRConstants.NS_NMR_BINDING, "local://nmrendpoint");
+
+ Greeter port = ss.getPort(portName, Greeter.class);
+
+ String rep = port.greetMe("ffang");
+ assertEquals(rep, "Hello ffang");
+ rep = port.sayHi();
+ assertEquals(rep, "Bonjour");
+ try {
+ port.pingMe();
+ fail();
+ } catch (PingMeFault ex) {
+ assertEquals(ex.getFaultInfo().getMajor(), (short)2);
+ assertEquals(ex.getFaultInfo().getMinor(), (short)1);
+ }
+ }
+}
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/NMRClientServerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/NMRClientServerTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/Server.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/Server.java?rev=782951&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/Server.java (added)
+++ servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/Server.java Tue Jun 9 10:51:47 2009
@@ -0,0 +1,66 @@
+/**
+ * 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.servicemix.cxf.binding.nmr;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.configuration.spring.ConfigurerImpl;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.test.TestApplicationContext;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.apache.servicemix.cxf.binding.nmr.interceptors.NMROperationInInterceptorTest;
+
+public class Server extends AbstractBusTestServerBase {
+ private static final String S1 =
+ NMROperationInInterceptorTest.class.getResource("/META-INF/cxf/cxf.xml").toString();
+ private static final String S2 =
+ NMROperationInInterceptorTest.class.getClassLoader().getResource("cxf-binding-nmr.xml").toString();
+
+ protected void run() {
+ TestApplicationContext ctx = new TestApplicationContext(new String[] {
+ S1, S2 });
+ ConfigurerImpl cfg = new ConfigurerImpl(ctx);
+ Bus bus = (Bus) ctx.getBean(Bus.DEFAULT_BUS_ID);
+ bus.setExtension(cfg, Configurer.class);
+
+
+ Object implementor = new GreeterImpl();
+ String address = "local://nmrendpoint";
+ //EndpointImpl e = (EndpointImpl)Endpoint.publish(address, implementor);
+ EndpointImpl e = new EndpointImpl(bus, implementor, NMRConstants.NS_NMR_BINDING);
+ e.publish(address);
+ e.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor());
+ e.getServer().getEndpoint().getInInterceptors().add(new HackOperationInterceptor());
+ e.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
+ }
+
+ public static void main(String args[]) {
+ try {
+ Server s = new Server();
+ s.start();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ System.exit(-1);
+ } finally {
+ System.out.println("done!");
+ }
+ }
+}
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/Server.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/java/org/apache/servicemix/cxf/binding/nmr/Server.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/cxf-binding-nmr.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/cxf-binding-nmr.xml?rev=782951&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/cxf-binding-nmr.xml (added)
+++ servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/cxf-binding-nmr.xml Tue Jun 9 10:51:47 2009
@@ -0,0 +1,49 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <bean class="org.apache.servicemix.cxf.binding.nmr.NMRBindingFactory"
+ id="org.apache.servicemix.cxf.binding.nmr.NMRBindingFactory"
+ lazy-init="true">
+ <property name="bus" ref="cxf"/>
+ <property name="activationNamespaces">
+ <set>
+ <value>http://cxf.apache.org/bindings/nmr</value>
+ <value>http://schemas.xmlsoap.org/wsdl/soap/</value>
+ <value>http://schemas.xmlsoap.org/wsdl/http/</value>
+ </set>
+ </property>
+ </bean>
+ <bean class="org.apache.cxf.transport.local.LocalTransportFactory"
+ id="org.apache.cxf.transport.local.LocalTransportFactory"
+ lazy-init="true">
+ <property name="bus" ref="cxf"/>
+ <property name="transportIds">
+ <list>
+ <value>http://schemas.xmlsoap.org/wsdl/soap/</value>
+ <value>http://schemas.xmlsoap.org/wsdl/http/</value>
+ </list>
+ </property>
+ </bean>
+
+</beans>
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/cxf-binding-nmr.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/cxf-binding-nmr.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/cxf-binding-nmr.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/hello_world_nmr.wsdl
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/hello_world_nmr.wsdl?rev=782951&view=auto
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/hello_world_nmr.wsdl (added)
+++ servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/hello_world_nmr.wsdl Tue Jun 9 10:51:47 2009
@@ -0,0 +1,165 @@
+<?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.
+-->
+<wsdl:definitions name="HelloWorld" targetNamespace="http://apache.org/hello_world/nmr"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://apache.org/hello_world/nmr"
+ xmlns:x1="http://apache.org/hello_world/types/nmr"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xformat="http://cxf.apache.org/bindings/xformat"
+ xmlns:nmrFormat="http://cxf.apache.org/bindings/nmr">
+
+ <wsdl:types>
+ <schema targetNamespace="http://apache.org/hello_world/types/nmr"
+ xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://apache.org/hello_world/types/nmr"
+ elementFormDefault="qualified">
+ <simpleType name="MyStringType">
+ <restriction base="string">
+ <maxLength value="30" />
+ </restriction>
+ </simpleType>
+
+ <element name="sayHi">
+ <complexType/>
+ </element>
+ <element name="sayHiResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMe">
+ <complexType>
+ <sequence>
+ <element name="requestType" type="tns:MyStringType"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeResponse">
+ <complexType>
+ <sequence>
+ <element name="responseType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeOneWay">
+ <complexType>
+ <sequence>
+ <element name="requestType" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="pingMe">
+ <complexType/>
+ </element>
+ <element name="pingMeResponse">
+ <complexType/>
+ </element>
+ <element name="faultDetail">
+ <complexType>
+ <sequence>
+ <element name="minor" type="short"/>
+ <element name="major" type="short"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+ <wsdl:message name="sayHiRequest">
+ <wsdl:part element="x1:sayHi" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="sayHiResponse">
+ <wsdl:part element="x1:sayHiResponse" name="out"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeRequest">
+ <wsdl:part element="x1:greetMe" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeResponse">
+ <wsdl:part element="x1:greetMeResponse" name="out"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeOneWayRequest">
+ <wsdl:part element="x1:greetMeOneWay" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeRequest">
+ <wsdl:part name="in" element="x1:pingMe"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeResponse">
+ <wsdl:part name="out" element="x1:pingMeResponse"/>
+ </wsdl:message>
+ <wsdl:message name="pingMeFault">
+ <wsdl:part name="faultDetail" element="x1:faultDetail"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Greeter">
+ <wsdl:operation name="sayHi">
+ <wsdl:input message="tns:sayHiRequest" name="sayHiRequest"/>
+ <wsdl:output message="tns:sayHiResponse" name="sayHiResponse"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMe">
+ <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+ <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMeOneWay">
+ <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+ </wsdl:operation>
+
+ <wsdl:operation name="pingMe">
+ <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+ <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+ <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+ <nmrFormat:binding />
+
+ <wsdl:operation name="sayHi">
+ <wsdl:input name="sayHiRequest" />
+ <wsdl:output name="sayHiResponse" />
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMe">
+ <wsdl:input name="greetMeRequest" />
+ <wsdl:output name="greetMeResponse" />
+ </wsdl:operation>
+
+ <wsdl:operation name="greetMeOneWay">
+ <wsdl:input name="greetMeOneWayRequest" />
+ </wsdl:operation>
+
+ <wsdl:operation name="pingMe">
+ <wsdl:input />
+ <wsdl:output />
+ <wsdl:fault name="pingMeFault" />
+ </wsdl:operation>
+
+
+ </wsdl:binding>
+ <wsdl:service name="HelloWorldService">
+ <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+ <soap:address location="local://nmrendpoint"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
+
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/hello_world_nmr.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/hello_world_nmr.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: servicemix/smx4/features/trunk/cxf/cxf-binding-nmr/src/test/resources/hello_world_nmr.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml