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 2010/10/09 09:08:15 UTC
svn commit: r1006112 - in
/servicemix/components/engines/servicemix-cxf-se/trunk/src/test:
java/org/apache/servicemix/cxfse/ resources/META-INF/ resources/schemas/
resources/schemas/wsdl/
Author: ffang
Date: Sat Oct 9 07:08:14 2010
New Revision: 1006112
URL: http://svn.apache.org/viewvc?rev=1006112&view=rev
Log:
[SMXCOMP-809]A testcase to demonstrate that jax-ws-catalog.xml could be pick up in cxfse endpoint
Added:
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/AddRequest.java
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/META-INF/
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/META-INF/jax-ws-catalog.xml
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/schemas/
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/schemas/wsdl/
servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/schemas/wsdl/ws-addr.xsd
Modified:
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/Greeter2.java
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/AddRequest.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/AddRequest.java?rev=1006112&view=auto
==============================================================================
--- servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/AddRequest.java (added)
+++ servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/AddRequest.java Sat Oct 9 07:08:14 2010
@@ -0,0 +1,132 @@
+/*
+ * 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.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+
+
+/**
+ * <p>Java class for addRequest complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="addRequest">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="nb1" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ * <element name="nb2" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ * <element name="publisherReference" type="{http://www.w3.org/2005/08/addressing}EndpointReferenceType"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "addRequest", propOrder = {
+ "nb1",
+ "nb2",
+ "publisherReference"
+})
+public class AddRequest {
+
+ protected Integer nb1;
+ protected Integer nb2;
+ protected W3CEndpointReference publisherReference;
+
+ /**
+ * Gets the value of the nb1 property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getNb1() {
+ return nb1;
+ }
+
+ /**
+ * Sets the value of the nb1 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setNb1(Integer value) {
+ this.nb1 = value;
+ }
+
+ /**
+ * Gets the value of the nb2 property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getNb2() {
+ return nb2;
+ }
+
+ /**
+ * Sets the value of the nb2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setNb2(Integer value) {
+ this.nb2 = value;
+ }
+
+ /**
+ * Gets the value of the publisherReference property.
+ *
+ * @return
+ * possible object is
+ * {@link W3CEndpointReference }
+ *
+ */
+ public W3CEndpointReference getPublisherReference() {
+ return publisherReference;
+ }
+
+ /**
+ * Sets the value of the publisherReference property.
+ *
+ * @param value
+ * allowed object is
+ * {@link W3CEndpointReference }
+ *
+ */
+ public void setPublisherReference(W3CEndpointReference value) {
+ this.publisherReference = value;
+ }
+
+}
+
Modified: 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=1006112&r1=1006111&r2=1006112&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeMultipleOperationsTest.java (original)
+++ servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/CxfSeMultipleOperationsTest.java Sat Oct 9 07:08:14 2010
@@ -39,7 +39,7 @@ public class CxfSeMultipleOperationsTest
super.tearDown();
}
- public void testMtom() throws Exception {
+ public void testMultipleOperations() throws Exception {
io = client.createInOutExchange();
io.setService(new QName("http://org.apache.servicemix.cxfse", "Greeter"));
Modified: 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=1006112&r1=1006111&r2=1006112&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2.java (original)
+++ servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2.java Sat Oct 9 07:08:14 2010
@@ -25,4 +25,6 @@ public interface Greeter2 {
Holder<String> name,
@WebParam(mode = WebParam.Mode.OUT, name = "msg")
Holder<String> msg);
+
+ public int add(AddRequest parameters);
}
Modified: 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=1006112&r1=1006111&r2=1006112&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2Impl.java (original)
+++ servicemix/components/engines/servicemix-cxf-se/trunk/src/test/java/org/apache/servicemix/cxfse/Greeter2Impl.java Sat Oct 9 07:08:14 2010
@@ -30,4 +30,15 @@ public class Greeter2Impl implements Gre
public void greetMe(Holder<String> name, Holder<String> msg) {
msg.value = "Hello " + name.value;
}
+
+ public int add(AddRequest parameters) {
+ System.out.println(parameters);
+ try {
+ int _return = parameters.nb1 + parameters.nb2;
+ return _return;
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ throw new RuntimeException(ex);
+ }
+ }
}
Added: servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/META-INF/jax-ws-catalog.xml
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/META-INF/jax-ws-catalog.xml?rev=1006112&view=auto
==============================================================================
--- servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/META-INF/jax-ws-catalog.xml (added)
+++ servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/META-INF/jax-ws-catalog.xml Sat Oct 9 07:08:14 2010
@@ -0,0 +1,23 @@
+<?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.
+-->
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
+ <rewriteSystem systemIdStartString="http://www.w3.org/2005/08/addressing" rewritePrefix="classpath:/schemas/wsdl"/>
+ <rewriteSystem systemIdStartString="http://www.w3.org/2006/03/addressing" rewritePrefix="classpath:/schemas/wsdl"/>
+</catalog>
Added: servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/schemas/wsdl/ws-addr.xsd
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/schemas/wsdl/ws-addr.xsd?rev=1006112&view=auto
==============================================================================
--- servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/schemas/wsdl/ws-addr.xsd (added)
+++ servicemix/components/engines/servicemix-cxf-se/trunk/src/test/resources/schemas/wsdl/ws-addr.xsd Sat Oct 9 07:08:14 2010
@@ -0,0 +1,146 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!--
+ W3C XML Schema defined in the Web Services Addressing 1.0 specification
+ http://www.w3.org/TR/ws-addr-core
+
+ Copyright ?? 2005 World Wide Web Consortium,
+
+ (Massachusetts Institute of Technology, European Research Consortium for
+ Informatics and Mathematics, Keio University). All Rights Reserved. This
+ work is distributed under the W3C?? Software License [1] in the hope that
+ it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+ warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://www.w3.org/2005/08/addressing"
+ targetNamespace="http://www.w3.org/2005/08/addressing" blockDefault="#all"
+ elementFormDefault="qualified">
+
+ <!-- Constructs from the WS-Addressing Core -->
+
+ <xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
+ <xs:complexType name="EndpointReferenceType">
+ <xs:sequence>
+ <xs:element name="Address" type="tns:AttributedURIType"/>
+ <xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
+ <xs:element ref="tns:Metadata" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="ReferenceParametersType">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="Metadata" type="tns:MetadataType"/>
+ <xs:complexType name="MetadataType">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="MessageID" type="tns:AttributedURIType"/>
+ <xs:element name="RelatesTo" type="tns:RelatesToType"/>
+ <xs:complexType name="RelatesToType">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum"
+ use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:simpleType name="RelationshipTypeOpenEnum">
+ <xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="RelationshipType">
+ <xs:restriction base="xs:anyURI">
+ <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="From" type="tns:EndpointReferenceType"/>
+ <xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
+ <xs:element name="To" type="tns:AttributedURIType"/>
+ <xs:element name="Action" type="tns:AttributedURIType"/>
+
+ <xs:complexType name="AttributedURIType">
+ <xs:simpleContent>
+ <xs:extension base="xs:anyURI">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <!-- Constructs from the WS-Addressing SOAP binding -->
+
+ <xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
+
+ <xs:simpleType name="FaultCodesOpenEnumType">
+ <xs:union memberTypes="tns:FaultCodesType xs:QName"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="FaultCodesType">
+ <xs:restriction base="xs:QName">
+ <xs:enumeration value="tns:InvalidAddressingHeader"/>
+ <xs:enumeration value="tns:InvalidAddress"/>
+ <xs:enumeration value="tns:InvalidEPR"/>
+ <xs:enumeration value="tns:InvalidCardinality"/>
+ <xs:enumeration value="tns:MissingAddressInEPR"/>
+ <xs:enumeration value="tns:DuplicateMessageID"/>
+ <xs:enumeration value="tns:ActionMismatch"/>
+ <xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
+ <xs:enumeration value="tns:DestinationUnreachable"/>
+ <xs:enumeration value="tns:ActionNotSupported"/>
+ <xs:enumeration value="tns:EndpointUnavailable"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
+ <xs:complexType name="AttributedUnsignedLongType">
+ <xs:simpleContent>
+ <xs:extension base="xs:unsignedLong">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
+ <xs:complexType name="AttributedQNameType">
+ <xs:simpleContent>
+ <xs:extension base="xs:QName">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
+ <xs:complexType name="AttributedAnyType">
+ <xs:sequence>
+ <xs:any namespace="##any" processContents="lax"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
+
+ <xs:element name="ProblemAction" type="tns:ProblemActionType"/>
+ <xs:complexType name="ProblemActionType">
+ <xs:sequence>
+ <xs:element ref="tns:Action" minOccurs="0"/>
+ <xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+
+</xs:schema>