You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2004/12/14 18:08:36 UTC

svn commit: r111839 - in incubator/apollo/trunk/examples/filesystem: requests src/example/filesystem/callback

Author: scamp
Date: Tue Dec 14 09:08:34 2004
New Revision: 111839

URL: http://svn.apache.org/viewcvs?view=rev&rev=111839
Log:
fixed callbacks..made them use the correct XmlBeanTypes
Added:
   incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.xml
   incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.xml
   incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.xml
   incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.xml
Modified:
   incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/BackupFrequencyCallback.java
   incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/FsckPassNumberCallback.java
   incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/MountPointCallback.java

Added: incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.xml?view=auto&rev=111839
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateBackupFreqProp.xml	Tue Dec 14 09:08:34 2004
@@ -0,0 +1,19 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+      <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
+      <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
+      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:BackupFrequency>24</fs:BackupFrequency>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.xml?view=auto&rev=111839
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateFsckPassNumProp.xml	Tue Dec 14 09:08:34 2004
@@ -0,0 +1,19 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+      <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
+      <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
+      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:FsckPassNumber>202</fs:FsckPassNumber>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.xml?view=auto&rev=111839
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateMountPointProp.xml	Tue Dec 14 09:08:34 2004
@@ -0,0 +1,19 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+      <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
+      <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
+      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:MountPointDirectory>/var/tmp/apollo</fs:MountPointDirectory>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Added: incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.xml
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.xml?view=auto&rev=111839
==============================================================================
--- (empty file)
+++ incubator/apollo/trunk/examples/filesystem/requests/SetResourceProperties_updateOptionsProp.xml	Tue Dec 14 09:08:34 2004
@@ -0,0 +1,24 @@
+<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" 
+          xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
+   <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
+      <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/filesystem</wsa:To>
+      <wsa:Action mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
+      <fs:ResourceId mustUnderstand="1">1234</fs:ResourceId>
+   </Header>
+
+   <Body>
+      <wsrp:SetResourceProperties xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
+                                  xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+         <wsrp:Update>
+            <fs:Options>
+            <fs:Option>Should we test this?</fs:Option>
+            <fs:Option>Should we go to lunch?</fs:Option>
+            <fs:Option>yes?</fs:Option>
+            <fs:Option>no?</fs:Option>
+            </fs:Options>
+         </wsrp:Update>
+      </wsrp:SetResourceProperties>
+   </Body>
+
+</Envelope>

Modified: incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/BackupFrequencyCallback.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/BackupFrequencyCallback.java?view=diff&rev=111839&p1=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/BackupFrequencyCallback.java&r1=111838&p2=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/BackupFrequencyCallback.java&r2=111839
==============================================================================
--- incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/BackupFrequencyCallback.java	(original)
+++ incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/BackupFrequencyCallback.java	Tue Dec 14 09:08:34 2004
@@ -3,6 +3,7 @@
 import org.apache.ws.resource.properties.SetResourcePropertyCallback;
 import org.apache.ws.resource.properties.ResourceProperty;
 import org.apache.ws.resource.example.filesystem.BackupFrequencyDocument;
+import org.apache.xmlbeans.XmlInt;
 
 import javax.xml.namespace.QName;
 
@@ -31,8 +32,8 @@
     {
         for (int i = 0; i < prop.length; i++)
         {
-            BackupFrequencyDocument o = (BackupFrequencyDocument) prop[i];
-            m_fileSystem.setBackupFrequency(o.getBackupFrequency());
+            XmlInt xInt = (XmlInt) prop[i];            
+            m_fileSystem.setBackupFrequency(xInt.getIntValue());
         }
     }
 
@@ -43,8 +44,8 @@
 
     public ResourceProperty refreshProperty(ResourceProperty prop)
     {
-        BackupFrequencyDocument o = (BackupFrequencyDocument) prop.get(0);
-        o.setBackupFrequency(m_fileSystem.getBackupFrequency());
+        XmlInt xInt = (XmlInt) prop.get( 0 );
+        xInt.setIntValue( m_fileSystem.getBackupFrequency() );
         return prop;
     }
 }

Modified: incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/FsckPassNumberCallback.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/FsckPassNumberCallback.java?view=diff&rev=111839&p1=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/FsckPassNumberCallback.java&r1=111838&p2=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/FsckPassNumberCallback.java&r2=111839
==============================================================================
--- incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/FsckPassNumberCallback.java	(original)
+++ incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/FsckPassNumberCallback.java	Tue Dec 14 09:08:34 2004
@@ -3,6 +3,7 @@
 import org.apache.ws.resource.properties.SetResourcePropertyCallback;
 import org.apache.ws.resource.properties.ResourceProperty;
 import org.apache.ws.resource.example.filesystem.FsckPassNumberDocument;
+import org.apache.xmlbeans.XmlInt;
 
 import javax.xml.namespace.QName;
 
@@ -36,15 +37,15 @@
     {
         for (int i = 0; i < prop.length; i++)
         {
-            FsckPassNumberDocument o = (FsckPassNumberDocument) prop[i];
-            m_fileSystem.setFsckPassNumber(o.getFsckPassNumber());
+            XmlInt xInt = (XmlInt) prop[i];
+            m_fileSystem.setFsckPassNumber(xInt.getIntValue());
         }
     }
 
     public ResourceProperty refreshProperty(ResourceProperty prop)
     {
-        FsckPassNumberDocument o = (FsckPassNumberDocument) prop.get(0);
-        o.setFsckPassNumber(m_fileSystem.getFsckPassNumber());
+        XmlInt xInt = (XmlInt) prop.get( 0 );
+        xInt.setIntValue( m_fileSystem.getFsckPassNumber() );
         return prop;
     }
 }

Modified: incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/MountPointCallback.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/MountPointCallback.java?view=diff&rev=111839&p1=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/MountPointCallback.java&r1=111838&p2=incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/MountPointCallback.java&r2=111839
==============================================================================
--- incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/MountPointCallback.java	(original)
+++ incubator/apollo/trunk/examples/filesystem/src/example/filesystem/callback/MountPointCallback.java	Tue Dec 14 09:08:34 2004
@@ -3,6 +3,7 @@
 import org.apache.ws.resource.properties.ResourcePropertyCallback;
 import org.apache.ws.resource.properties.ResourceProperty;
 import org.apache.ws.resource.example.filesystem.MountPointDirectoryDocument;
+import org.apache.xmlbeans.XmlString;
 import example.filesystem.backend.FileSystem;
 
 
@@ -20,8 +21,9 @@
 
     public ResourceProperty refreshProperty(ResourceProperty prop)
     {
-        MountPointDirectoryDocument o = (MountPointDirectoryDocument)prop.get(0);
-        o.setMountPointDirectory(m_fileSystem.getMountPoint());
+
+        XmlString xString = (XmlString) prop.get( 0 );
+        xString.setStringValue( m_fileSystem.getMountPoint() );
         return prop;
     }
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org