Author: ffang
Date: Thu Sep  9 12:55:31 2010
New Revision: 995410

URL: http://svn.apache.org/viewvc?rev=995410&view=rev
Log:
[smxcomp-8...@webmethod annotation doesn't take into account

Added:
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeMultipleOperationsTest.java
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeRequest.java
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2.java
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2Impl.java
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiRequest.java
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/org/apache/servicemix/cxfse/xbean_multiple-operations.xml
Modified:
    
servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java

Modified: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java?rev=995410&r1=995409&r2=995410&view=diff
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java
 (original)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/main/java/org/apache/servicemix/cxfse/CxfSeEndpoint.java
 Thu Sep  9 12:55:31 2010
@@ -425,7 +425,12 @@ public class CxfSeEndpoint extends Provi
                 } else {
                     NormalizedMessage nm = exchange.getMessage("in");
                     if (soapBindingServer == null) {
-                        ServerFactoryBean sfForSoapBinding = new 
ServerFactoryBean();
+                        ServerFactoryBean sfForSoapBinding = null;
+                        if (isUseAegis()) {
+                            sfForSoapBinding = new ServerFactoryBean();
+                        } else {
+                            sfForSoapBinding = new JaxWsServerFactoryBean();
+                        }
                         sfForSoapBinding.setServiceBean(getPojo());
                         //sfForSoapBinding.setAddress("http://dummyaddress";);
                         
sfForSoapBinding.getServiceFactory().setPopulateFromClass(true);

Added: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeMultipleOperationsTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeMultipleOperationsTest.java?rev=995410&view=auto
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeMultipleOperationsTest.java
 (added)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeMultipleOperationsTest.java
 Thu Sep  9 12:55:31 2010
@@ -0,0 +1,87 @@
+/*
+ * 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.cxfse;
+
+import javax.jbi.messaging.InOut;
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.client.DefaultServiceMixClient;
+import org.apache.servicemix.jbi.jaxp.SourceTransformer;
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+
+public class CxfSeMultipleOperationsTest extends CxfSeSpringTestSupport {
+
+    private DefaultServiceMixClient client;
+    private InOut io;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        client = new DefaultServiceMixClient(jbi);
+
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+
+    public void testMtom() throws Exception {
+        io = client.createInOutExchange();
+        io.setService(new QName("http://org.apache.servicemix.cxfse";, 
"Greeter"));
+
+        io.getMessage("in").setContent(new StringSource(
+                "<jbi:message 
xmlns:jbi='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
+              + "<jbi:part> "
+              + "<gr:GreetMe xmlns:gr='http://org.apache.servicemix.cxfse'>"
+              + "<name>"
+              + "Eugene"
+              + "</name>"
+              +        "</gr:GreetMe>"
+              + "</jbi:part> "
+              + "</jbi:message>"));
+
+        client.sendSync(io);
+        assertTrue(new SourceTransformer().contentToString(
+                io.getOutMessage()).indexOf("<msg>Hello Eugene</msg>") >= 0);
+
+        client.done(io);
+
+
+        io = client.createInOutExchange();
+        io.setService(new QName("http://org.apache.servicemix.cxfse";, 
"Greeter"));
+
+        io.getMessage("in").setContent(new StringSource(
+                "<jbi:message 
xmlns:jbi='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
+              + "<jbi:part> "
+              + "<gr:SayHi xmlns:gr='http://org.apache.servicemix.cxfse'/>"
+              + "</jbi:part> "
+              + "</jbi:message>"));
+
+        client.sendSync(io);
+        assertTrue(new SourceTransformer().contentToString(
+                io.getOutMessage()).indexOf("<msg>Hi</msg>") >= 0);
+
+        client.done(io);
+    }
+
+
+    @Override
+    protected AbstractXmlApplicationContext createBeanFactory() {
+        return new 
ClassPathXmlApplicationContext("org/apache/servicemix/cxfse/xbean_multiple-operations.xml");
+    }
+
+}

Added: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeRequest.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeRequest.java?rev=995410&view=auto
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeRequest.java
 (added)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeRequest.java
 Thu Sep  9 12:55:31 2010
@@ -0,0 +1,34 @@
+package org.apache.servicemix.cxfse;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+...@xmlrootelement(name = "GreetMeRequest")
+...@xmlaccessortype(XmlAccessType.FIELD)
+...@xmltype(propOrder = {
+    "name"
+})
+public class GreetMeRequest {
+
+       @XmlElement(name = "name", required = true)
+       private String name;
+
+       /**
+        * Gets the value of the name property.
+        * @return
+        */
+       public String getName() {
+               return name;
+       }
+
+       /**
+        * Sets the value of the name property.
+        * @param kbId
+        */
+       public void setName(String name) {
+               this.name = name;
+       }
+}

Added: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java?rev=995410&view=auto
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java
 (added)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/GreetMeResponse.java
 Thu Sep  9 12:55:31 2010
@@ -0,0 +1,34 @@
+package org.apache.servicemix.cxfse;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+...@xmlrootelement(name = "GreetMeResponse")
+...@xmlaccessortype(XmlAccessType.FIELD)
+...@xmltype(propOrder = {
+       "msg"
+})
+public class GreetMeResponse {
+
+       @XmlElement(name = "msg", required = true)
+       private String msg;
+
+       /**
+        * Gets the value of the msg property.
+        * @return
+        */
+       public String getMsg() {
+               return msg;
+       }
+
+       /**
+        * Sets the value of the msg property.
+        * @param msg
+        */
+       public void setMsg(String msg) {
+               this.msg = msg;
+       }
+}
\ No newline at end of file

Added: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2.java?rev=995410&view=auto
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2.java
 (added)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2.java
 Thu Sep  9 12:55:31 2010
@@ -0,0 +1,28 @@
+package org.apache.servicemix.cxfse;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+...@webservice
+public interface Greeter2 {
+
+       @RequestWrapper(className = "org.apache.servicemix.cxfse.SayHiRequest")
+    @ResponseWrapper(className = "org.apache.servicemix.cxfse.SayHiResponse")
+    @WebMethod(operationName = "SayHi")
+       public void sayHi(
+                       @WebParam(mode = WebParam.Mode.OUT, name = "msg")
+                       Holder<String> msg);
+
+       @RequestWrapper(className = 
"org.apache.servicemix.cxfse.GreetMeRequest")
+    @ResponseWrapper(className = "org.apache.servicemix.cxfse.GreetMeResponse")
+    @WebMethod(operationName = "GreetMe")
+       public void greetMe(
+                       @WebParam(mode = WebParam.Mode.IN, name = "name")
+                       Holder<String> name,
+                       @WebParam(mode = WebParam.Mode.OUT, name = "msg")
+                       Holder<String> msg);
+}

Added: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2Impl.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2Impl.java?rev=995410&view=auto
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2Impl.java
 (added)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2Impl.java
 Thu Sep  9 12:55:31 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.cxfse;
+
+
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+...@webservice(serviceName = "Greeter2", endpointInterface = 
"org.apache.servicemix.cxfse.Greeter2")
+public class Greeter2Impl implements Greeter2 {
+
+    public void sayHi(Holder<String> msg) {
+       msg.value = "Hi";
+       }
+
+       public void greetMe(Holder<String> name, Holder<String> msg) {
+               msg.value = "Hello " + name.value;
+       }
+}

Added: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiRequest.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiRequest.java?rev=995410&view=auto
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiRequest.java
 (added)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiRequest.java
 Thu Sep  9 12:55:31 2010
@@ -0,0 +1,14 @@
+package org.apache.servicemix.cxfse;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+...@xmlrootelement(name = "SayHiRequest")
+...@xmlaccessortype(XmlAccessType.FIELD)
+...@xmltype(propOrder = {
+})
+public class SayHiRequest {
+
+}

Added: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java?rev=995410&view=auto
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java
 (added)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/SayHiResponse.java
 Thu Sep  9 12:55:31 2010
@@ -0,0 +1,34 @@
+package org.apache.servicemix.cxfse;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+...@xmlrootelement(name = "SayHiResponse")
+...@xmlaccessortype(XmlAccessType.FIELD)
+...@xmltype(propOrder = {
+       "msg"
+})
+public class SayHiResponse {
+
+       @XmlElement(name = "msg", required = true)
+       private String msg;
+
+       /**
+        * Gets the value of the msg property.
+        * @return
+        */
+       public String getMsg() {
+               return msg;
+       }
+
+       /**
+        * Sets the value of the msg property.
+        * @param msg
+        */
+       public void setMsg(String msg) {
+               this.msg = msg;
+       }
+}
\ No newline at end of file

Added: 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/org/apache/servicemix/cxfse/xbean_multiple-operations.xml
URL: 
http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/org/apache/servicemix/cxfse/xbean_multiple-operations.xml?rev=995410&view=auto
==============================================================================
--- 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/org/apache/servicemix/cxfse/xbean_multiple-operations.xml
 (added)
+++ 
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/org/apache/servicemix/cxfse/xbean_multiple-operations.xml
 Thu Sep  9 12:55:31 2010
@@ -0,0 +1,54 @@
+<?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:sm="http://servicemix.apache.org/config/1.0";
+       xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0";
+       xmlns:greeter="http://org.apache.servicemix.cxfse";
+       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-2.0.xsd
+        http://servicemix.apache.org/config/1.0 
http://servicemix.apache.org/schema/servicemix-core-${servicemix-version}.xsd
+        http://servicemix.apache.org/cxfse/1.0 
http://servicemix.apache.org/schema/servicemix-cxf-se-${project.version}.xsd";>
+   
+    <sm:container id="jbi" embedded="true">
+   
+    <sm:endpoints>
+
+      <cxfse:endpoint service="greeter:Greeter" endpoint="endpoint">
+        <cxfse:pojo>
+          <bean class="org.apache.servicemix.cxfse.Greeter2Impl" />
+        </cxfse:pojo>
+        <cxfse:inInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfse:inInterceptors>
+        <cxfse:outInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfse:outInterceptors>
+        <cxfse:inFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
+        </cxfse:inFaultInterceptors>
+        <cxfse:outFaultInterceptors>
+          <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
+        </cxfse:outFaultInterceptors>
+      </cxfse:endpoint>
+        </sm:endpoints>
+
+  </sm:container>
+</beans>


Reply via email to