| Commit in servicemix on MAIN | |||
| ws/jaxws/wsnotification/src/main/java/org/servicemix/ws/notification/impl/invoke/NotificationConsumerInvoker.java | +11 | -6 | 1.1 -> 1.2 |
| ws/jaxws/wsnotification/src/test/java/org/servicemix/ws/notification/SubscribeParseTest.java | +1 | -14 | 1.1 -> 1.2 |
| ws/jaxws/wsnotification/maven.xml | -128 | 1.1 -> 1.2 | |
| /project.properties | +12 | -7 | 1.1 -> 1.2 |
| /project.xml | +30 | -145 | 1.1 -> 1.2 |
| servicemix-root.iml | -2 | 1.2 -> 1.3 | |
| +54 | -302 | ||
added a working Maven build for the WS-Notification using JAX-WS
servicemix/ws/jaxws/wsnotification/src/main/java/org/servicemix/ws/notification/impl/invoke
diff -u -r1.1 -r1.2 --- NotificationConsumerInvoker.java 24 Aug 2005 14:45:59 -0000 1.1 +++ NotificationConsumerInvoker.java 24 Aug 2005 17:42:19 -0000 1.2 @@ -1,9 +1,8 @@
package org.servicemix.ws.notification.impl.invoke;
-import org.apache.xmlbeans.XmlException; -import org.apache.xmlbeans.XmlObject;
import org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.NotificationMessageHolderType; import org.oasis_open.docs.wsn._2004._06.wsn_ws_basenotification_1_2_draft_01.TopicExpressionType;
+import org.servicemix.jbi.jaxp.BytesSource;
import org.servicemix.jbi.jaxp.StringSource; import org.servicemix.wspojo.notification.NotificationConsumer; import org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType;
@@ -13,7 +12,6 @@
import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.TextMessage;
-import java.io.ByteArrayInputStream;
import java.io.IOException; import java.rmi.RemoteException; import java.util.ArrayList;
@@ -30,13 +28,12 @@
this.notificationConsumer = notificationConsumer;
}
- protected void dispatchMessage(TopicExpressionType topic, Message message) throws JMSException, XmlException, IOException {
+ protected void dispatchMessage(TopicExpressionType topic, Message message) throws JMSException, IOException {
if (message instanceof BytesMessage) {
BytesMessage bm = (BytesMessage) message;
byte data[] = new byte[(int) bm.getBodyLength()];
bm.readBytes(data);
- XmlObject xml = XmlObject.Factory.parse(new ByteArrayInputStream(data)); - dispatch(topic, xml);
+ dispatch(topic, createXml(data));
}
else if (message instanceof TextMessage) {
TextMessage tm = (TextMessage) message;
@@ -57,6 +54,14 @@
List<NotificationMessageHolderType> list = new ArrayList<NotificationMessageHolderType>(1);
list.add(messageHolder);
notificationConsumer.notify(list);
+ }
+
+ /**
+ * Factory method to turn XML as bytes into some POJO
+ * which by default will create a [EMAIL PROTECTED] BytesSource}
+ */
+ protected Object createXml(byte[] xmlBytes) {
+ return new BytesSource(xmlBytes);
}
/**
servicemix/ws/jaxws/wsnotification/src/test/java/org/servicemix/ws/notification
diff -u -r1.1 -r1.2 --- SubscribeParseTest.java 24 Aug 2005 14:51:20 -0000 1.1 +++ SubscribeParseTest.java 24 Aug 2005 17:42:19 -0000 1.2 @@ -23,14 +23,9 @@
import org.xmlsoap.schemas.ws._2003._03.addressing.EndpointReferenceType; import javax.xml.bind.JAXBContext;
-import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamReader; -import java.io.IOException; -import java.net.URL;
/**
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class SubscribeParseTest extends TestCase {
@@ -52,13 +47,5 @@
protected JAXBContext createContext() throws Exception {
return JAXBContext.newInstance(Subscribe.class, EndpointReferenceType.class);
- }
-
- protected XMLStreamReader createXMLStreamReader(URL resource) throws XMLStreamException, IOException {
- assertTrue("Found resource", resource != null);
-
- XMLInputFactory inputFactory = XMLInputFactory.newInstance();
- XMLStreamReader in = inputFactory.createXMLStreamReader(resource.openStream());
- return in;
} }
servicemix/ws/jaxws/wsnotification
diff -u -r1.1 -r1.2 --- maven.xml 24 Aug 2005 14:51:21 -0000 1.1 +++ maven.xml 24 Aug 2005 17:42:19 -0000 1.2 @@ -5,140 +5,12 @@
<attainGoal name="jar:install" /> </goal>
- <preGoal name="java:compile">
- <attainGoal name="xmlbeans:compile" />
- </preGoal>
-
- <goal name="xmlbeans:compile" description="generate XmlBeans for WSDL types">
-
- <!--
- <echo>Writing generated XMLBeans source files to: ${xmlbeans.compiled.java.dir}</echo>
- <delete dir="${xmlbeans.compiled.java.dir}"/>
- <mkdir dir="${xmlbeans.compiled.java.dir}"/>
- -->
-
- <echo>Writing generated XMLBeans classes to: ${xmlbeans.compiled.classes.dir}</echo>
- <delete dir="${xmlbeans.compiled.classes.dir}"/>
- <mkdir dir="${xmlbeans.compiled.classes.dir}"/>
-
- <java classname="org.apache.xmlbeans.impl.tool.SchemaCompiler"
- classpathref="maven.dependency.classpath"
- fork="true">
- <!--
- <arg value="-srconly"/>
- -->
- <arg value="-dl"/>
- <arg value="-d"/>
- <arg value="${xmlbeans.compiled.classes.dir}"/>
- <arg value="-src"/>
- <!--
- <arg value="${xmlbeans.compiled.java.dir}"/>
- -->
- <arg value="${maven.src.dir}/main/java"/>
- <arg value="${maven.src.dir}/main/wsdl/wsa"/>
- <arg value="${maven.src.dir}/main/wsdl/wse"/>
- <arg value="${maven.src.dir}/main/wsdl/wsn"/>
- <arg value="${maven.src.dir}/main/wsdl/wsrf"/>
- <arg value="${maven.src.dir}/main/wsdl/wsrm"/>
- <arg value="${maven.src.dir}/main/wsdl/xmlconfig.xsdconfig"/>
- </java>
-
-
- <!-- lets copy all the source code to one directory -->
- <!--
- <mkdir dir="target/java"/>
- <copy todir="target/java">
- <fileset dir="${xmlbeans.compiled.java.dir}"/>
- </copy>
- <copy todir="target/java">
- <fileset dir="src/main/java">
- <includes name="**/*.java"/>
- <includes name="**/*.html"/>
- <includes name="**/*.xml"/>
- </fileset>
- </copy>
- -->
-
- <copy todir="${maven.build.dest}">
- <fileset dir="${xmlbeans.compiled.classes.dir}"/>
- </copy>
- </goal>
-
- <goal name="jaxb:generate" prereqs="setclasspath" description="The JAXB generated types">
- <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" classpathref="test.classpath"/>
-
- <mkdir dir="target/jaxb"/>
-
- <xjc target="target/jaxb" extension="true">
- <arg value="-wsdl" />
- <schema dir="${maven.src.dir}/main/wsdl/wsn" includes="WS-BaseNotification-1_2-Draft_01.wsdl"/>
-
-<!--
-<schema dir="${maven.src.dir}/main/wsdl" includes="**/*.xsd"/>
-
-<schema dir="${maven.src.dir}/main/wsdl/wsa" includes="*.xsd"/>
-<schema dir="${maven.src.dir}/main/wsdl/wse" includes="*.xsd"/>
-<schema dir="${maven.src.dir}/main/wsdl/wsrf" includes="*.xsd"/>
--->
-
- <binding dir="${maven.src.dir}/main/wsdl" includes="*.xjb"/>
- </xjc>
- </goal>
-
<goal name="setclasspath">
- <!--
- <j:if test="${empty(skip_compile)}">
- <attainGoal name="test:compile"/>
- </j:if>
- -->
<path id="test.classpath">
<pathelement path="${maven.build.dest}"/>
<pathelement path="target/classes"/>
<pathelement path="target/test-classes"/>
<path refid="maven.dependency.classpath"/>
</path>
- <!--
- <taskdef name="javacc" classname="javacc" classpathref="test.classpath"/>
- -->
- </goal>
-
- <!--
- || Old way using Axis
- -->
- <goal name="wsdl:generate" prereqs="setclasspath">
- <taskdef resource="axis-tasks.properties" classpathref="test.classpath"/>
-
- <mkdir dir="${basedir}/target/generated/java"/>
-
- <!--
- testcase="true"
- helpergen="true"
- url="">
-
- -->
- <axis-wsdl2java
- output="${basedir}/target/generated/java"
- verbose="true"
- noimports="false"
- skeletondeploy="true"
- serverside="true"
- all="true"
- url="">
-
- <mapping
- namespace="http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification"
- package="org.servicemix.ws.schema.notification.base"/>
- <mapping
- namespace="http://www.ibm.com/xmlns/stdwip/web-services/WS-BrokeredNotification"
- package="org.servicemix.ws.schema.notification.broker"/>
- <mapping
- namespace="http://schemas.xmlsoap.org/ws/2004/08/eventing"
- package="org.servicemix.ws.schema.eventing"/>
- <mapping
- namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"
- package="org.servicemix.ws.schema.addressing"/>
- </axis-wsdl2java>
-
</goal>
-
</project>
servicemix/ws/jaxws/wsnotification
diff -u -r1.1 -r1.2 --- project.properties 24 Aug 2005 14:51:21 -0000 1.1 +++ project.properties 24 Aug 2005 17:42:19 -0000 1.2 @@ -3,13 +3,18 @@
# ------------------------------------------------------------------- maven.multiproject.type=jar
-xmlbeans.compiled.classes.dir=target/xmlbeans-classes -xmlbeans.compiled.java.dir=target/xmlbeans-java
+maven.compile.source=1.5 +maven.compile.target=1.5 +maven.test.source=1.5 +maven.compile.deprecation=true +maven.compile.debug=true +maven.compile.optimize=true + +maven.javadoc.source=1.5 +maven.javadoc.additionalparam = -linksource
maven.javadoc.links=\
-http://java.sun.com/j2se/1.4.1/docs/api/,\ -http://java.sun.com/j2ee/1.4/docs/api/,\
+http://download.java.net/jdk6/docs/api/,\ +http://java.sun.com/j2ee/1.5/docs/api/,\
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent,\
-http://jakarta.apache.org/commons/logging/apidocs,\ -http://xmlbeans.apache.org/docs/2.0.0/reference,\ -http://activesoap.codehaus.org/maven/apidocs
\ No newline at end of file
+http://jakarta.apache.org/commons/logging/apidocs
\ No newline at end of file
servicemix/ws/jaxws/wsnotification
diff -u -r1.1 -r1.2 --- project.xml 24 Aug 2005 14:51:21 -0000 1.1 +++ project.xml 24 Aug 2005 17:42:19 -0000 1.2 @@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <project> <pomVersion>3</pomVersion>
- <extend>${basedir}/../../project.xml</extend>
+ <extend>${basedir}/../../../project.xml</extend>
<name>ServiceMix :: WS-Notification</name> <id>servicemix-wsn</id>
@@ -26,7 +26,7 @@
<dependency>
<groupId>servicemix</groupId>
<artifactId>servicemix</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
</dependency>
<dependency>
@@ -37,176 +37,61 @@
<dependency>
<groupId>activemq</groupId>
- <artifactId>activemq-core</artifactId> - <version>3.1-SNAPSHOT</version> - </dependency> - <dependency> - <groupId>geronimo-spec</groupId> - <artifactId>geronimo-spec-jms</artifactId> - <version>1.1-rc4</version>
+ <artifactId>activemq</artifactId> + <version>3.1-M6</version>
</dependency>
<dependency>
<groupId>geronimo-spec</groupId>
- <artifactId>geronimo-spec-j2ee-management</artifactId> - <version>1.0-rc4</version> - </dependency> - - - <!-- For JAX-WS --> - <dependency> - <groupId>xmlbeans</groupId> - <artifactId>xbean</artifactId> - <version>2.0.0-beta1</version> - </dependency> - - <!-- StAX API --> - <dependency> - <id>stax+api</id> - <version>1.0</version> - </dependency> - - <!-- utility library for adapting StAX to SAX and JAXP Source --> - <dependency> - <id>stax-utils</id> - <version>snapshot-20040917</version>
+ <artifactId>geronimo-spec-j2ee</artifactId> + <version>1.4-rc4</version>
</dependency>
- <!-- possible StAX implementations: START -->
- <!-- fast implementation of StAX -->
+ <!-- WS POJOs -->
<dependency>
- <groupId>woodstox</groupId> - <artifactId>wstx-asl</artifactId> - <version>1.9</version> - </dependency> - - <!-- reference implementation --> - <!-- - <dependency> - <id>stax</id> - <version>1.1.1-dev</version> - </dependency> - --> - <!-- possible StAX implementations: END --> - - <!-- to invoke remote web services --> - <dependency> - <id>activesoap</id> - <version>1.0-SNAPSHOT</version>
+ <groupId>servicemix</groupId>
+ <artifactId>servicemix-wspojo</artifactId>
+ <version>${pom.currentVersion}</version>
</dependency>
- <!-- JAXB 1.0 based XML marshalling --> -<!-- - <dependency> - <groupId>activesoap</groupId> - <artifactId>jaxb-api</artifactId> - <version>1.5</version> - </dependency> - <dependency> - <groupId>activesoap</groupId> - <artifactId>jaxb-impl</artifactId> - <version>1.5</version> - </dependency> - <dependency> - <groupId>activesoap</groupId> - <artifactId>jaxb-libs</artifactId> - <version>1.5</version> - </dependency>
+ <!-- For JAX-WS: only required for Java 5, will be part of Java 6 -->
<dependency>
- <groupId>activesoap</groupId> - <artifactId>jaxb-xjc</artifactId> - <version>1.5</version> - </dependency> - <dependency> - <groupId>activesoap</groupId> - <artifactId>xsdlib</artifactId> - <version>1.5</version> - </dependency> - <dependency> - <groupId>activesoap</groupId> - <artifactId>relaxngDatatype</artifactId> - <version>1.5</version>
+ <groupId>servicemix</groupId> + <artifactId>jsr181-api</artifactId> + <version>20050818</version>
</dependency>
<dependency>
- <groupId>activesoap</groupId> - <artifactId>jaxb-xercesImpl</artifactId> - <version>1.5</version>
+ <groupId>servicemix</groupId> + <artifactId>jaxws-api</artifactId> + <version>20050818</version>
</dependency>
<dependency>
- <groupId>activesoap</groupId> - <artifactId>jaxb-xalan</artifactId> - <version>1.5</version>
+ <groupId>servicemix</groupId> + <artifactId>jaxws-rt</artifactId> + <version>20050818</version>
</dependency>
---> - - <!-- JAXB 2.0 based XML marshalling -->
<dependency>
- <groupId>activesoap</groupId>
+ <groupId>servicemix</groupId>
<artifactId>jaxb-api</artifactId>
- <version>20050407</version>
+ <version>20050818</version>
</dependency>
<dependency>
- <groupId>activesoap</groupId>
+ <groupId>servicemix</groupId>
<artifactId>jaxb-impl</artifactId>
- <version>20050407</version> - </dependency> - <dependency> - <groupId>activesoap</groupId> - <artifactId>jaxb1-impl</artifactId> - <version>20050407</version> - </dependency> - <dependency> - <groupId>activesoap</groupId> - <artifactId>jaxb-xjc</artifactId> - <version>20050407</version> - </dependency> - <dependency> - <groupId>activesoap</groupId> - <artifactId>xsdlib</artifactId> - <version>20050407</version>
+ <version>20050818</version>
</dependency>
<dependency>
- <groupId>activesoap</groupId> - <artifactId>relaxngDatatype</artifactId> - <version>20050407</version>
+ <id>stax+api</id> + <version>1.0</version>
</dependency>
- - <!-- Axis --> - <!-- - <dependency> - <groupId>axis</groupId> - <artifactId>axis</artifactId> - <version>1.2-beta-3</version> - </dependency> - <dependency> - <groupId>axis</groupId> - <artifactId>axis-ant</artifactId> - <version>1.2-beta-3</version> - </dependency> - <dependency> - <groupId>axis</groupId> - <artifactId>axis-jaxrpc</artifactId> - <version>1.2-beta-3</version> - </dependency>
+ <!-- optional ActiveSOAP component -->
<dependency>
- <groupId>axis</groupId> - <artifactId>axis-wsdl4j</artifactId> - <version>1.2-beta-3</version> - </dependency> - <dependency> - <groupId>axis</groupId> - <artifactId>axis-saaj</artifactId> - <version>1.2-beta-3</version> - </dependency> - <dependency> - <groupId>commons-discovery</groupId> - <artifactId>commons-discovery</artifactId> - <version>0.2</version>
+ <id>activesoap</id> + <version>1.0-SNAPSHOT</version>
</dependency>
- --> -
</dependencies>
+
<build>
<resources>
servicemix
diff -u -r1.2 -r1.3 --- servicemix-root.iml 24 Aug 2005 14:51:21 -0000 1.2 +++ servicemix-root.iml 24 Aug 2005 17:42:19 -0000 1.3 @@ -9,8 +9,6 @@
<sourceFolder url="" isTestSource="false" />
<sourceFolder url="" isTestSource="true" />
<sourceFolder url="" isTestSource="true" />
- <excludeFolder url="" /> - <excludeFolder url="" />
</content>
<orderEntry type="jdk" jdkName="1.5" />
<orderEntry type="sourceFolder" forTests="false" />
