[Bedework-commit] exchgsynch r29 - in trunk: . docs docs/wsdefs gensrc/src gensrc/src/com/microsoft/schemas/exchange/services/_2006/messages

svnadmin at bedework.org svnadmin at bedework.org
Thu Oct 28 16:15:52 EDT 2010


Author: douglm
Date: 2010-10-28 16:15:50 -0400 (Thu, 28 Oct 2010)
New Revision: 29

Added:
   trunk/docs/
   trunk/docs/wsdefs/
   trunk/docs/wsdefs/wsmessages.xsd
   trunk/docs/wsdefs/wssvc.wsdl
Modified:
   trunk/appjars.xml
   trunk/build.xml
   trunk/gensrc/src/
   trunk/gensrc/src/com/microsoft/schemas/exchange/services/_2006/messages/ExchangeServicePortType.java
Log:
Start of specification of a web service for the remote system

Modified: trunk/appjars.xml
===================================================================
--- trunk/appjars.xml	2010-10-28 20:15:35 UTC (rev 28)
+++ trunk/appjars.xml	2010-10-28 20:15:50 UTC (rev 29)
@@ -46,13 +46,25 @@
               name="rpiutil" version="3.6" project="rpiutil"
               projecthome="${bedework.home}/projects/rpiutil" />
       
+    	<!-- We need some sort of EJB interface then we don't need all these -->
+    	
       <getJar lib="${org.bedework.temp.extrajars.dir}"
               libcache="${org.bedework.libcache.dir}"
               name="bw-annotations" version="3.6" project="calendarapi" 
               projecthome="${project.home}/../bedework/projects/calendarapi"/>
+      
+      <getJar lib="${org.bedework.temp.extrajars.dir}"
+              libcache="${org.bedework.libcache.dir}"
+              name="bw-calcore" version="3.6" project="calendarapi" 
+              projecthome="${project.home}/../bedework/projects/calendarapi" />
     	
       <getJar lib="${org.bedework.temp.extrajars.dir}"
               libcache="${org.bedework.libcache.dir}"
+              name="bw-calcorei" version="3.6" project="calendarapi" 
+              projecthome="${project.home}/../bedework/projects/calendarapi" />
+      
+      <getJar lib="${org.bedework.temp.extrajars.dir}"
+              libcache="${org.bedework.libcache.dir}"
               name="bw-calfacade" version="3.6" project="calendarapi" 
               projecthome="${project.home}/../bedework/projects/calendarapi" />
 
@@ -73,6 +85,11 @@
 
       <getJar lib="${org.bedework.temp.extrajars.dir}"
               libcache="${org.bedework.libcache.dir}"
+              name="bw-icalendar" version="3.6" project="calendarapi" 
+              projecthome="${project.home}/../bedework/projects/calendarapi" />
+
+      <getJar lib="${org.bedework.temp.extrajars.dir}"
+              libcache="${org.bedework.libcache.dir}"
               name="bw-sysevents" version="3.6" project="calendarapi" 
               projecthome="${project.home}/../bedework/projects/calendarapi" />
 

Modified: trunk/build.xml
===================================================================
--- trunk/build.xml	2010-10-28 20:15:35 UTC (rev 28)
+++ trunk/build.xml	2010-10-28 20:15:50 UTC (rev 29)
@@ -7,11 +7,12 @@
 
 <project name="exsynch" default="deploy">
   <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
-
+	
+  <dirname property="project.home" file="${ant.file}"/>
+	
   <property environment="env"/>
   <!-- These may already be set from calling dir -->
   <dirname property="org.bedework.project.exsynch" file="${ant.file}"/>
-  <dirname property="project.home" file="${ant.file}"/>
 
   <property file="${project.home}/build.properties" />
   
@@ -73,7 +74,7 @@
     </if>
 
   	<property name="org.bedework.service.options.file"
-  	          value="${org.bedework.exsynch.options}" />
+  	          value="${org.bedework.config.options}" />
     <echo message="*** Options file: ${org.bedework.service.options.file}" />
 
     <delete dir="${lib.dir}" />
@@ -282,12 +283,91 @@
   <target name="build" depends="init,build-source,cleanup"
           description="Compile classes"/>
 
+	
+  <!-- =================================================================
+       Run wsimport on our web service definitions.
+       
+       The jaxb released with java6 is version 2.1. However, to resolve some 
+       issues we have to use version 2.2. This requires either placing the
+       jaxb jars in the endorsed directory or setting xendorsed="true" when
+       running wsimport and adding the 2.2 jars to the classpath.
+       
+       The version of jboss in the quickstart has the 2.2 jars in its 
+       endorsed directory. For the moment we point at that.
+       
+       Hold that: Unfortunately eclipse doesn't appear to have a way to set
+       an endorsed directory for a single project. The generated 2.2 classes
+       don't compile. Managed to get 2.1 wsimport to run - the generated code
+       appears to run OK on 2.2 
+       ================================================================= -->
+  <target name="genws.source" depends="init">
+  	<!--
+    <getJar name="jaxws-tools" version="2.2" /> 
+    <getJar name="jaxb-xjc" version="2.2" /> 
+    <getJar name="jaxws-rt" version="2.2" /> 
+    -->
+    <getJar name="jaxws-tools" version="2.1.4" /> 
+    <getJar name="jaxb-xjc" version="2.1.7" /> 
+    <getJar name="jaxb-impl" version="2.1.8" /> 
+    <getJar name="jaxws-rt" version="2.1.4" /> 
+    <getJar name="streambuffer" version="1.0" /> 
+    <getJar name="stax-ex" version="2.2.1" /> 
+
+  	<path id="wsimport.classpath">
+      <fileset dir="${ant.home}/lib">
+        <include name="jax*.jar"/>
+      </fileset>
+  		<!--
+      <pathelement location="${project.home}/lib/jaxws-tools-2.2.jar"/>
+      <pathelement location="${project.home}/lib/jaxb-xjc-2.2.jar"/>
+      <pathelement location="${project.home}/lib/jaxws-rt-2.2.jar"/>
+      -->
+      <pathelement location="${project.home}/lib/jaxws-tools-2.1.4.jar"/>
+      <pathelement location="${project.home}/lib/jaxb-xjc-2.1.7.jar"/>
+      <pathelement location="${project.home}/lib/jaxb-impl-2.1.8.jar"/>
+      <pathelement location="${project.home}/lib/jaxws-rt-2.1.4.jar"/>
+      <pathelement location="${project.home}/lib/tools-1.6.0_21.jar" />
+      <pathelement location="${project.home}/lib/streambuffer-1.0.jar" />
+      <pathelement location="${project.home}/lib/stax-ex-2.2.1.jar" />
+      <fileset dir="${ant.home}/lib">
+        <include name="**/*.jar"/>
+      </fileset>
+  		<!--
+      <fileset dir="${org.bedework.appserver.dir}/lib/endorsed" >
+        <include name="**/*.jar"/>
+      </fileset>
+      -->
+    </path>
+    
+    <property name="cp" refid="wsimport.classpath" />
+    <echo message="***************cp: ${cp}"/>
+
+    <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
+      <classpath refid="wsimport.classpath" />
+    </taskdef>
+    
+    <delete dir="${org.bedework.exsynch.gensrc.base}/src/org/bedework" />
+  	
+  	<!-- We don't want the generated classes but there doesn't appear to be a
+  	     way to suppress generation -->
+  	<property name="wsimport.dest" 
+  	          location="${org.bedework.temp.dir}/wsclasses" />
+  	<mkdir dir="${wsimport.dest}" />
+  	
+  	<wsimport keep="true"
+  	          sourcedestdir="${org.bedework.exsynch.gensrc.base}/src"
+  		        destdir="${wsimport.dest}"
+  	          wsdl="${project.home}/docs/wsdefs/wssvc.wsdl" 
+  		        xendorsed="true" >
+		</wsimport>
+  </target>
+
   <!-- ===================== build.all Target ===============================
      This target builds jar files ready for the deploy target.
      =================================================================== -->
 
   <target name="build-source" 
-          depends="bld.gensrc,bld.common,bld.service,bld.server" />
+          depends="genws.source,bld.gensrc,bld.common,bld.service,bld.server" />
 
   <!-- ===================== deploy Target ===============================
      Deploy if an application server is defined.
@@ -390,7 +470,7 @@
       <property name="propval.app.context.root"
                 value="${org.bedework.module.context.root}" />
       <property name="propval.app.properties.path"
-                value="properties/${ant.project.name}" />
+                value="properties/calendar" />
       <property name="propval.app.war.name"
                 value="${org.bedework.module.war.name}" />
       <property name="propval.app.web.xml"

Added: trunk/docs/wsdefs/wsmessages.xsd
===================================================================
--- trunk/docs/wsdefs/wsmessages.xsd	                        (rev 0)
+++ trunk/docs/wsdefs/wsmessages.xsd	2010-10-28 20:15:50 UTC (rev 29)
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<schema xmlns="http://www.w3.org/2001/XMLSchema" 
+        xmlns:tns="http://www.bedework.org/exsynch/wsmessages" 
+        targetNamespace="http://www.bedework.org/exsynch/wsmessages" 
+        elementFormDefault="qualified">
+  <!-- Schema for messages passed from exsynch processor to the remote service. -->
+  
+  <simpleType name="SynchType">
+    <annotation>
+      <documentation xml:lang="en">
+           from... synch from that end
+           both  both ways - server tries to resolve conflicts
+           both...Master - Named service wins in conflicts.
+      </documentation>
+    </annotation>
+    <restriction base="string">
+      <enumeration value="fromExchange" />
+      <enumeration value="toExchange" />
+      <enumeration value="both" />
+      <enumeration value="bothExchangeMaster" />
+      <enumeration value="bothRemoteMaster" />
+    </restriction>
+  </simpleType>
+  
+  <simpleType name="StatusType">
+    <restriction base="string">
+      <enumeration value="OK" />
+      <enumeration value="Already subscribed" />
+      <enumeration value="Unknown Exchange calendar" />
+      <enumeration value="Invalid token" />
+      <enumeration value="Unknown subscription" />
+      <enumeration value="Error" />
+    </restriction>
+  </simpleType>
+  
+  <!-- *********************************************************************
+       Remote system to syncher
+       subscribe: set up a new subscription for a principal to a calendar
+       unsubscribe: remove a new subscription for a principal to a calendar
+       ********************************************************************* -->
+  
+  <element name="subscribe">
+    <annotation>
+      <documentation xml:lang="en">
+           Message from remote service requesting new subscription.
+           token
+                 Sent in initial startup request
+           principal-href
+                 Principal requesting the subscription.
+           synch-token
+                 Passed back for operations on the calendar
+           exchange-user
+                 Userid for exchange
+           exchange-encpw
+                 Encoded password for exchange
+      </documentation>
+    </annotation>
+    <complexType>
+      <sequence >
+        <element name="token" type="string" />
+        <element name="calendar-href" type="string" />
+        <element name="principal-href" type="string" />
+        <element name="synch-token" type="string" />
+        <element name="exchange-folder-id" type="string" />
+        <element name="exchange-uri" type="string" />
+        <element name="synch-type" type="tns:SynchType" />
+        <element name="exchange-user" type="string" />
+        <element name="exchange-encpw" type="string" />
+      </sequence>
+    </complexType>
+  </element>
+  
+  <element name="subscribeResponse">
+    <annotation>
+      <documentation xml:lang="en">
+           Response to message from remote service requesting new subscription.
+      </documentation>
+    </annotation>
+    <complexType>
+      <sequence >
+        <element name="calendar-href" type="string" />
+        <element name="subscribe-status" type="tns:StatusType" />
+        <element minOccurs="0" name="message" type="string" />
+      </sequence>
+    </complexType>
+  </element>
+  
+  <element name="unsubscribe">
+    <annotation>
+      <documentation xml:lang="en">
+           Message from remote service unsubscribing - same response as subscribe.
+      </documentation>
+    </annotation>
+    <complexType>
+      <sequence>
+        <element name="calendar-href" type="string" />
+        <element name="principal-href" type="string" />
+      </sequence>
+    </complexType>
+  </element>
+  
+  <!-- *********************************************************************
+       Syncher to Remote system 
+       start-service-notification; sent to (re)initialise the service
+       get-sycnch-info: return info used to synch
+       fetch: fetch one or more calendar items
+       add: add a new calendar item
+       update: update a calendar item
+       delete: delete a calendar item
+       ********************************************************************* -->
+  
+  <element name="start-service-notification">
+    <annotation>
+      <documentation xml:lang="en">
+           (Re)initialize the service
+           subscribe-url: callback url for notifications and subscribe requests
+           token: random token for subscribe requests. If token is unchanged this
+               is just a keep alive ping
+      </documentation>
+    </annotation>
+    <complexType>
+      <sequence>
+        <element name="subscribe-url" type="string" />
+        <element name="token" type="string" />
+      </sequence>
+    </complexType>
+  </element>
+  
+  <element name="start-service-response">
+    <annotation>
+      <documentation xml:lang="en">
+           Respond to the ping
+           token: sent in initial request
+           status: OK
+      </documentation>
+    </annotation>
+    <complexType>
+      <sequence>
+        <element name="token" type="string" />
+        <element name="status" type="tns:StatusType" />
+      </sequence>
+    </complexType>
+  </element>
+  
+  <element name="get-sycnch-info">
+    <annotation>
+      <documentation xml:lang="en">
+           Message to remote service requesting synchronization info.
+      </documentation>
+    </annotation>
+    <complexType>
+      <sequence>
+        <element name="calendar-href" type="string" />
+        <element name="synch-token" type="string" />
+      </sequence>
+    </complexType>
+  </element>
+  
+  <complexType name="SynchInfoType">
+    <sequence>
+      <element name="uid" type="string" />
+      <element name="exchange-lastmod" type="string" />
+    </sequence>
+  </complexType>
+  
+  <element name="synch-info-response">
+    <annotation>
+      <documentation xml:lang="en">
+           Response to message to remote service requesting synchronization info.
+      </documentation>
+    </annotation>
+    <complexType>
+      <sequence>
+        <element name="calendar-href" type="string" />
+        <element name="synch-info-responses">
+          <complexType>
+            <sequence>
+              <element maxOccurs="unbounded" name="synch-info" 
+                                                type="tns:SynchInfoType" />
+            </sequence>
+          </complexType>
+        </element>
+      </sequence>
+    </complexType>
+  </element>
+  
+  
+</schema>

Added: trunk/docs/wsdefs/wssvc.wsdl
===================================================================
--- trunk/docs/wsdefs/wssvc.wsdl	                        (rev 0)
+++ trunk/docs/wsdefs/wssvc.wsdl	2010-10-28 20:15:50 UTC (rev 29)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:tns="http://www.bedework.org/exsynch/wsmessages" 
+                  xmlns:s="http://www.w3.org/2001/XMLSchema" 
+                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+                  targetNamespace="http://www.bedework.org/exsynch/wsmessages" 
+                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  <wsdl:types>
+    <s:schema>
+      <s:import schemaLocation="wsmessages.xsd" 
+      namespace="http://www.bedework.org/exsynch/wsmessages" />
+    </s:schema>
+  </wsdl:types>
+  
+  <wsdl:message name="GetSynchInfoIn">
+    <wsdl:part name="request" element="tns:get-sycnch-info" />
+  </wsdl:message>
+  
+  <wsdl:message name="GetSynchInfoOut">
+    <wsdl:part name="GetSynchInfoResult" element="tns:synch-info-response" />
+  </wsdl:message>
+  
+  <wsdl:portType name="ExsynchRemoteServicePortType">
+    <wsdl:operation name="get-synch-info">
+      <wsdl:input message="tns:GetSynchInfoIn" />
+      <wsdl:output message="tns:GetSynchInfoOut" />
+    </wsdl:operation>
+  </wsdl:portType>
+  
+  <wsdl:binding name="ExsynchRemoteServiceBinding" 
+                type="tns:ExsynchRemoteServicePortType">
+    <wsdl:documentation>
+      <wsi:Claim conformsTo="http://ws-i.org/profiles/basic/1.0" 
+                 xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" />
+    </wsdl:documentation>
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="get-synch-info">
+      <soap:operation soapAction="http://www.bedework.org/exsynch/wsmessages/get-synch-info" />
+      <wsdl:input>
+        <soap:body use="literal" parts="request" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" parts="GetSynchInfoResult" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+
+  <wsdl:service name="ExsynchRemoteService">
+    <wsdl:port name="ExsynchRSPort" binding="tns:ExsynchRemoteServiceBinding">
+       <soap:address location="http://localhost/pubcaldav/exsynchrmt"></soap:address>
+    </wsdl:port>
+  </wsdl:service>
+</wsdl:definitions>  
\ No newline at end of file


Property changes on: trunk/gensrc/src
___________________________________________________________________
Name: svn:ignore
   + org


Modified: trunk/gensrc/src/com/microsoft/schemas/exchange/services/_2006/messages/ExchangeServicePortType.java
===================================================================
--- trunk/gensrc/src/com/microsoft/schemas/exchange/services/_2006/messages/ExchangeServicePortType.java	2010-10-28 20:15:35 UTC (rev 28)
+++ trunk/gensrc/src/com/microsoft/schemas/exchange/services/_2006/messages/ExchangeServicePortType.java	2010-10-28 20:15:50 UTC (rev 29)
@@ -537,6 +537,27 @@
 
     /**
      *
+     * @param getItemResult
+     * @param request
+     * @param serverVersion
+     * @param requestVersion
+     * @param mailboxCulture
+     */
+    @WebMethod(operationName = "GetItem", action = "http://schemas.microsoft.com/exchange/services/2006/messages/GetItem")
+    public void getItem(
+        @WebParam(name = "GetItem", targetNamespace = "http://schemas.microsoft.com/exchange/services/2006/messages", partName = "request")
+        GetItemType request,
+        @WebParam(name = "MailboxCulture", targetNamespace = "http://schemas.microsoft.com/exchange/services/2006/types", header = true, partName = "MailboxCulture")
+        MailboxCultureType mailboxCulture,
+        @WebParam(name = "RequestServerVersion", targetNamespace = "http://schemas.microsoft.com/exchange/services/2006/types", header = true, partName = "RequestVersion")
+        RequestServerVersion requestVersion,
+        @WebParam(name = "GetItemResponse", targetNamespace = "http://schemas.microsoft.com/exchange/services/2006/messages", mode = WebParam.Mode.OUT, partName = "GetItemResult")
+        Holder<GetItemResponseType> getItemResult,
+        @WebParam(name = "ServerVersionInfo", targetNamespace = "http://schemas.microsoft.com/exchange/services/2006/types", header = true, mode = WebParam.Mode.OUT, partName = "ServerVersion")
+        Holder<ServerVersionInfo> serverVersion);
+
+    /**
+     *
      * @param timeZoneContext
      * @param request
      * @param serverVersion



More information about the Bedework-commit mailing list