You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/05/25 14:24:04 UTC

svn commit: r409375 - in /incubator/servicemix/branches/java5/servicemix-wsn2005: ./ src/main/java/org/apache/servicemix/wsn/jaxb2/ src/main/java/org/oasis_open/ src/main/java/org/oasis_open/docs/ src/main/java/org/oasis_open/docs/wsn/ src/main/java/or...

Author: gnodet
Date: Thu May 25 05:24:03 2006
New Revision: 409375

URL: http://svn.apache.org/viewvc?rev=409375&view=rev
Log:
Allow running ws-notification on jdk 1.4 with retrotranslator.
This will require XFire 1.1.1

Added:
    incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/jaxb2/
    incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/jaxb2/QNameListAdapter.java
    incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/
    incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/docs/
    incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/docs/wsn/
    incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/docs/wsn/t_1/
    incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/docs/wsn/t_1/TopicType.java
Modified:
    incubator/servicemix/branches/java5/servicemix-wsn2005/pom.xml
    incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/resources/org/apache/servicemix/wsn/wsn.wsdl

Modified: incubator/servicemix/branches/java5/servicemix-wsn2005/pom.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/java5/servicemix-wsn2005/pom.xml?rev=409375&r1=409374&r2=409375&view=diff
==============================================================================
--- incubator/servicemix/branches/java5/servicemix-wsn2005/pom.xml (original)
+++ incubator/servicemix/branches/java5/servicemix-wsn2005/pom.xml Thu May 25 05:24:03 2006
@@ -66,12 +66,25 @@
           <groupId>javax.jws</groupId>
           <artifactId>jsr181-api</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>com.sun.xml</groupId>
+          <artifactId>jaxb-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.sun.xml</groupId>
+          <artifactId>jaxb-impl</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
       <groupId>xfire</groupId>
       <artifactId>xfire-jsr181-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>javax.xml</groupId>
+      <artifactId>jaxb-impl</artifactId>
+      <version>2.0</version>
+    </dependency>
   </dependencies>
 
   <build>
@@ -108,6 +121,7 @@
           </execution>
         </executions>
       </plugin>
+      <!--
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>jaxws-maven-plugin</artifactId>
@@ -123,6 +137,52 @@
           <wsdlDirectory>${basedir}/src/main/resources/org/apache/servicemix/wsn</wsdlDirectory>
           <wsdlFiles>wsn.wsdl</wsdlFiles>
         </configuration>
+      </plugin>
+      -->
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <configuration>
+              <tasks>
+                <taskdef classname="org.codehaus.xfire.gen.WsGenTask" name="wsgen">
+                  <classpath>
+                    <pathelement path="${basedir}/target/classes" />
+                    <path refid="maven.test.classpath" />
+                  </classpath>
+                </taskdef>
+                <wsgen 
+                  wsdl="${basedir}/src/main/resources/org/apache/servicemix/wsn/wsn.wsdl"
+                  outputDirectory="${basedir}/target/jaxws" 
+                  profile="org.codehaus.xfire.jaxws.gen.JAXWSProfile"
+                  explicitAnnotation="true" />
+                <delete file="${basedir}/target/jaxws/org/oasis_open/docs/wsn/t_1/TopicType.java" />
+              </tasks>
+              <sourceRoot>${basedir}/target/jaxws</sourceRoot>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.xfire</groupId>
+            <artifactId>xfire-generator</artifactId>
+            <version>1.1</version>
+          </dependency>
+          <dependency>
+            <groupId>org.codehaus.xfire</groupId>
+            <artifactId>xfire-jaxws</artifactId>
+            <version>1.1</version>
+          </dependency>
+          <dependency>
+            <groupId>javax.xml</groupId>
+            <artifactId>jaxb-xjc</artifactId>
+            <version>2.0</version>
+          </dependency>
+        </dependencies>
       </plugin>
     </plugins>
   </build>

Added: incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/jaxb2/QNameListAdapter.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/jaxb2/QNameListAdapter.java?rev=409375&view=auto
==============================================================================
--- incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/jaxb2/QNameListAdapter.java (added)
+++ incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/jaxb2/QNameListAdapter.java Thu May 25 05:24:03 2006
@@ -0,0 +1,30 @@
+package org.apache.servicemix.wsn.jaxb2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.DatatypeConverter;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import javax.xml.namespace.QName;
+
+import com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext;
+
+public class QNameListAdapter extends XmlAdapter<String, List<QName>>{
+
+	@Override
+	public String marshal(List<QName> v) throws Exception {
+		throw new UnsupportedOperationException();
+	}
+
+	@Override
+	public List<QName> unmarshal(String v) throws Exception {
+		UnmarshallingContext context = UnmarshallingContext.getInstance();
+		String[] tokens = v.split(" ");
+		List<QName> results = new ArrayList<QName>();
+		for (int i = 0; i < tokens.length; i++) {
+			results.add(DatatypeConverter.parseQName(tokens[i], context));
+		}
+		return results;
+	}
+
+}

Added: incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/docs/wsn/t_1/TopicType.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/docs/wsn/t_1/TopicType.java?rev=409375&view=auto
==============================================================================
--- incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/docs/wsn/t_1/TopicType.java (added)
+++ incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/java/org/oasis_open/docs/wsn/t_1/TopicType.java Thu May 25 05:24:03 2006
@@ -0,0 +1,235 @@
+
+package org.oasis_open.docs.wsn.t_1;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.wsn.jaxb2.QNameListAdapter;
+
+
+/**
+ * <p>Java class for TopicType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="TopicType">
+ *   &lt;complexContent>
+ *     &lt;extension base="{http://docs.oasis-open.org/wsn/t-1}ExtensibleDocumented">
+ *       &lt;sequence>
+ *         &lt;element name="MessagePattern" type="{http://docs.oasis-open.org/wsn/t-1}QueryExpressionType" minOccurs="0"/>
+ *         &lt;element name="Topic" type="{http://docs.oasis-open.org/wsn/t-1}TopicType" maxOccurs="unbounded" minOccurs="0"/>
+ *         &lt;any/>
+ *       &lt;/sequence>
+ *       &lt;attribute name="final" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *       &lt;attribute name="messageTypes">
+ *         &lt;simpleType>
+ *           &lt;list itemType="{http://www.w3.org/2001/XMLSchema}QName" />
+ *         &lt;/simpleType>
+ *       &lt;/attribute>
+ *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}NCName" />
+ *     &lt;/extension>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "TopicType", propOrder = {
+    "messagePattern",
+    "topic",
+    "any"
+})
+public class TopicType
+    extends ExtensibleDocumented
+{
+
+    @XmlElement(name = "MessagePattern", namespace = "http://docs.oasis-open.org/wsn/t-1")
+    protected QueryExpressionType messagePattern;
+    @XmlElement(name = "Topic", namespace = "http://docs.oasis-open.org/wsn/t-1", required = true, type = TopicType.class)
+    protected List<TopicType> topic;
+    @XmlAnyElement(lax = true)
+    protected List<Object> any;
+    @XmlAttribute(name = "final")
+    protected Boolean _final;
+    @XmlAttribute
+    @XmlJavaTypeAdapter(QNameListAdapter.class)
+    protected List<QName> messageTypes;
+    @XmlAttribute(required = true)
+    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+    protected String name;
+
+    /**
+     * Gets the value of the messagePattern property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link QueryExpressionType }
+     *     
+     */
+    public QueryExpressionType getMessagePattern() {
+        return messagePattern;
+    }
+
+    /**
+     * Sets the value of the messagePattern property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link QueryExpressionType }
+     *     
+     */
+    public void setMessagePattern(QueryExpressionType value) {
+        this.messagePattern = value;
+    }
+
+    /**
+     * Gets the value of the topic property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the topic property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getTopic().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link TopicType }
+     * 
+     * 
+     */
+    public List<TopicType> getTopic() {
+        if (topic == null) {
+            topic = new ArrayList<TopicType>();
+        }
+        return this.topic;
+    }
+
+    /**
+     * Gets the value of the any property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the any property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getAny().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link Object }
+     * 
+     * 
+     */
+    public List<Object> getAny() {
+        if (any == null) {
+            any = new ArrayList<Object>();
+        }
+        return this.any;
+    }
+
+    /**
+     * Gets the value of the final property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public boolean isFinal() {
+        if (_final == null) {
+            return false;
+        } else {
+            return _final;
+        }
+    }
+
+    /**
+     * Sets the value of the final property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setFinal(Boolean value) {
+        this._final = value;
+    }
+
+    /**
+     * Gets the value of the messageTypes property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the messageTypes property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getMessageTypes().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link QName }
+     * 
+     * 
+     */
+    public List<QName> getMessageTypes() {
+        if (messageTypes == null) {
+            messageTypes = new ArrayList<QName>();
+        }
+        return this.messageTypes;
+    }
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+}

Modified: incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/resources/org/apache/servicemix/wsn/wsn.wsdl
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/resources/org/apache/servicemix/wsn/wsn.wsdl?rev=409375&r1=409374&r2=409375&view=diff
==============================================================================
--- incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/resources/org/apache/servicemix/wsn/wsn.wsdl (original)
+++ incubator/servicemix/branches/java5/servicemix-wsn2005/src/main/resources/org/apache/servicemix/wsn/wsn.wsdl Thu May 25 05:24:03 2006
@@ -275,7 +275,7 @@
 			</wsdl:fault>
 		</wsdl:operation>
 		<wsdl:operation name="Unsubscribe">
-			<wsdl:input name="UsubscribeRequest">
+			<wsdl:input name="UnsubscribeRequest">
 				<soap:body use="literal" />
 			</wsdl:input>
 			<wsdl:output name="UnsubscribeResponse">
@@ -317,7 +317,7 @@
 			</wsdl:fault>
 		</wsdl:operation>
 		<wsdl:operation name="Unsubscribe">
-			<wsdl:input name="UsubscribeRequest">
+			<wsdl:input name="UnsubscribeRequest">
 				<soap:body use="literal" />
 			</wsdl:input>
 			<wsdl:output name="UnsubscribeResponse">
@@ -437,10 +437,10 @@
 			</wsdl:fault>
 		</wsdl:operation>
 		<wsdl:operation name="DestroyPullPoint">
-			<wsdl:input name="DestroyRequest">
+			<wsdl:input name="DestroyPullPointRequest">
 				<soap:body use="literal" />
 			</wsdl:input>
-			<wsdl:output name="DestroyResponse">
+			<wsdl:output name="DestroyPullPointResponse">
 				<soap:body use="literal" />
 			</wsdl:output>
 			<wsdl:fault name="UnableToDestroyPullPointFault">