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 2005/03/02 20:46:20 UTC

svn commit: r155948 - in incubator/apollo/trunk: ./ src/java/ src/java/org/apache/ws/resource/properties/faults/ src/java/org/apache/ws/resource/properties/query/xpath/ src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/ src/site/content/example/requests/ src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/ src/site/content/example/src/test/org/oasisOpen/docs/wsrf/

Author: scamp
Date: Wed Mar  2 11:46:15 2005
New Revision: 155948

URL: http://svn.apache.org/viewcvs?view=rev&rev=155948
Log: (empty)


Added:
    incubator/apollo/trunk/changing versions.txt
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidUpdateResourcePropertiesRequestContentFaultException.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UpdateResourcePropertyRequestFailedFaultException.java
    incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AScenarios.java
    incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AllScenarios.java
    incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/BScenarios.java
    incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/CScenarios.java
    incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/DScenario.java
    incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/EScenario.java
Modified:
    incubator/apollo/trunk/src/java/   (props changed)
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/query/xpath/XPathExpression.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/DeleteResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/InsertResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/UpdateResourcePropertiesPortTypeImpl.java
    incubator/apollo/trunk/src/site/content/example/requests/Create_Job.soap
    incubator/apollo/trunk/src/site/content/example/requests/Destroy_Job.soap
    incubator/apollo/trunk/src/site/content/example/requests/SendDocument.soap
    incubator/apollo/trunk/src/site/content/example/requests/SetTerminationTime.soap
    incubator/apollo/trunk/src/site/content/example/requests/Set_InsertDocFormat.soap
    incubator/apollo/trunk/src/site/content/example/requests/Set_InsertJobHoldOvernight.soap
    incubator/apollo/trunk/src/site/content/example/requests/Set_MultiInsertJobHold.soap
    incubator/apollo/trunk/src/site/content/example/requests/Set_UpdateDocFormat.soap
    incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortResource.java
    incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortService.java
    incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java

Added: incubator/apollo/trunk/changing versions.txt
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/changing%20versions.txt?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/changing versions.txt (added)
+++ incubator/apollo/trunk/changing versions.txt Wed Mar  2 11:46:15 2005
@@ -0,0 +1,33 @@
+This document contains notes for use when movign to a new version of a spec....
+
+Please update as things change...
+
+
+1. Add Wsdl/schema for generation
+2. Make a set of templates (copy, update, addnew
+3. Make a set of porttype infos
+4. Make the versioned porttypes
+5. Add new faults
+Make version of NamespaceVersionHolder with set of namespaces for use with exceptions
+6. Make version set of Lifetime porttype
+7. make version set of Faults porttype
+
+add axis impls copies for new basefaults and register in server-config.wsdd
+
+make a new impl of AbstractXmlBeansResourcePropertyValueChangeEvent to build event
+
+add constants classes for rp,lifetim, basefaults
+
+add constructor in XmlBeansQueryExpression
+
+WsrfWsdlUtils.getResourcePropertiesDocumentName add a check for new version
+
+ResourceProvider.invoke() add check for type of NamespaceValueHolderImpl to determine Basfefault to create and throw
+
+DefaultMethodMap ...add mappings for new methods porttypes
+
+Wsdl2Java register new porttype infos
+
+ResourceCapabilityImpl.validateOperations add check for new version of ResourceProperties
+
+

Propchange: incubator/apollo/trunk/src/java/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Mar  2 11:46:15 2005
@@ -0,0 +1 @@
+Test.java

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/DeleteResourcePropertyRequestFailedFaultException.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,49 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed 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.ws.resource.properties.faults;
+
+import org.apache.ws.resource.faults.BaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v1_2_draft05.ResourcePropertiesConstants;
+import javax.xml.namespace.QName;
+
+/**
+ * @author Sal Campana
+ */
+public class DeleteResourcePropertyRequestFailedFaultException
+   extends BaseFaultException
+{
+   /**
+    * Creates a new {@link DeleteResourcePropertyRequestFailedFaultException} object.
+    *
+    * @param namespaces DOCUMENT_ME
+    * @param description DOCUMENT_ME
+    */
+   public DeleteResourcePropertyRequestFailedFaultException( NamespaceVersionHolder namespaces,
+                                                             String[]               description )
+   {
+      super( namespaces,
+             getQName( namespaces ) );
+      setDescription( description );
+   }
+
+   private static QName getQName( NamespaceVersionHolder namespaces )
+   {
+      return new QName( namespaces.getPropertiesXsdNamespace(  ),
+                        "DeleteResourcePropertyRequestFailedFault",
+                        ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+   }
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InsertResourcePropertyRequestFailedFaultException.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,49 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed 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.ws.resource.properties.faults;
+
+import org.apache.ws.resource.faults.BaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v1_2_draft05.ResourcePropertiesConstants;
+import javax.xml.namespace.QName;
+
+/**
+ * @author Sal Campana
+ */
+public class InsertResourcePropertyRequestFailedFaultException
+   extends BaseFaultException
+{
+   /**
+    * Creates a new {@link InsertResourcePropertyRequestFailedFaultException} object.
+    *
+    * @param namespaces DOCUMENT_ME
+    * @param description DOCUMENT_ME
+    */
+   public InsertResourcePropertyRequestFailedFaultException( NamespaceVersionHolder namespaces,
+                                                             String[]               description )
+   {
+      super( namespaces,
+             getQName( namespaces ) );
+      setDescription( description );
+   }
+
+   private static QName getQName( NamespaceVersionHolder namespaces )
+   {
+      return new QName( namespaces.getPropertiesXsdNamespace(  ),
+                        "InsertResourcePropertyRequestFailedFault",
+                        ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+   }
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidInsertResourcePropertiesRequestContentFaultException.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,49 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed 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.ws.resource.properties.faults;
+
+import org.apache.ws.resource.faults.BaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v1_2_draft05.ResourcePropertiesConstants;
+import javax.xml.namespace.QName;
+
+/**
+ * @author Sal Campana
+ */
+public class InvalidInsertResourcePropertiesRequestContentFaultException
+   extends BaseFaultException
+{
+   /**
+    * Creates a new {@link InvalidInsertResourcePropertiesRequestContentFaultException} object.
+    *
+    * @param namespaces DOCUMENT_ME
+    * @param description DOCUMENT_ME
+    */
+   public InvalidInsertResourcePropertiesRequestContentFaultException( NamespaceVersionHolder namespaces,
+                                                                       String[]               description )
+   {
+      super( namespaces,
+             getQName( namespaces ) );
+      setDescription( description );
+   }
+
+   private static QName getQName( NamespaceVersionHolder namespaces )
+   {
+      return new QName( namespaces.getPropertiesXsdNamespace(  ),
+                        "InvalidInsertResourcePropertiesRequestContentFault",
+                        ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+   }
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidUpdateResourcePropertiesRequestContentFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidUpdateResourcePropertiesRequestContentFaultException.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidUpdateResourcePropertiesRequestContentFaultException.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/InvalidUpdateResourcePropertiesRequestContentFaultException.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,49 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed 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.ws.resource.properties.faults;
+
+import org.apache.ws.resource.faults.BaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v1_2_draft05.ResourcePropertiesConstants;
+import javax.xml.namespace.QName;
+
+/**
+ * @author Sal Campana
+ */
+public class InvalidUpdateResourcePropertiesRequestContentFaultException
+   extends BaseFaultException
+{
+   /**
+    * Creates a new {@link InvalidUpdateResourcePropertiesRequestContentFaultException} object.
+    *
+    * @param namespaces DOCUMENT_ME
+    * @param description DOCUMENT_ME
+    */
+   public InvalidUpdateResourcePropertiesRequestContentFaultException( NamespaceVersionHolder namespaces,
+                                                                       String[]               description )
+   {
+      super( namespaces,
+             getQName( namespaces ) );
+      setDescription( description );
+   }
+
+   private static QName getQName( NamespaceVersionHolder namespaces )
+   {
+      return new QName( namespaces.getPropertiesXsdNamespace(  ),
+                        "InvalidUpdateResourcePropertiesRequestContentFault",
+                        ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+   }
+}
\ No newline at end of file

Added: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UpdateResourcePropertyRequestFailedFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UpdateResourcePropertyRequestFailedFaultException.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UpdateResourcePropertyRequestFailedFaultException.java (added)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/faults/UpdateResourcePropertyRequestFailedFaultException.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,49 @@
+/*=============================================================================*
+ *  Copyright 2004 The Apache Software Foundation
+ *
+ *  Licensed 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.ws.resource.properties.faults;
+
+import org.apache.ws.resource.faults.BaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.v1_2_draft05.ResourcePropertiesConstants;
+import javax.xml.namespace.QName;
+
+/**
+ * @author Sal Campana
+ */
+public class UpdateResourcePropertyRequestFailedFaultException
+   extends BaseFaultException
+{
+   /**
+    * Creates a new {@link UpdateResourcePropertyRequestFailedFaultException} object.
+    *
+    * @param namespaces DOCUMENT_ME
+    * @param description DOCUMENT_ME
+    */
+   public UpdateResourcePropertyRequestFailedFaultException( NamespaceVersionHolder namespaces,
+                                                             String[]               description )
+   {
+      super( namespaces,
+             getQName( namespaces ) );
+      setDescription( description );
+   }
+
+   private static QName getQName( NamespaceVersionHolder namespaces )
+   {
+      return new QName( namespaces.getPropertiesXsdNamespace(  ),
+                        "UpdateResourcePropertyRequestFailedFault",
+                        ResourcePropertiesConstants.NSPREFIX_WSRP_SCHEMA );
+   }
+}
\ No newline at end of file

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/query/xpath/XPathExpression.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/query/xpath/XPathExpression.java?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/query/xpath/XPathExpression.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/query/xpath/XPathExpression.java Wed Mar  2 11:46:15 2005
@@ -108,7 +108,7 @@
       String nsContextString;
       try
       {
-         nsContextString = JaxpUtils.toString( m_nsContext );
+         nsContextString = m_nsContext.toString();
       }
       catch ( Exception e )
       {

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/DeleteResourcePropertiesPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/DeleteResourcePropertiesPortTypeImpl.java?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/DeleteResourcePropertiesPortTypeImpl.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/DeleteResourcePropertiesPortTypeImpl.java Wed Mar  2 11:46:15 2005
@@ -2,6 +2,9 @@
 
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.faults.SetResourcePropertyRequestFailedFaultException;
+import org.apache.ws.resource.properties.faults.InvalidSetResourcePropertiesRequestContentFaultException;
+import org.apache.ws.resource.properties.faults.DeleteResourcePropertyRequestFailedFaultException;
 import org.apache.ws.resource.properties.impl.AbstractResourcePropertiesPortType;
 import org.apache.ws.resource.properties.impl.AbstractSetResourcePropertiesPortType;
 import org.apache.ws.resource.properties.v1_2_draft05.porttype.DeleteResourcePropertiesPortType;
@@ -39,7 +42,18 @@
     {
         DeleteResourcePropertiesResponseDocument responseDoc = createResponseDocument();
         DeleteResourcePropertiesDocument.DeleteResourceProperties requestElem = requestDoc.getDeleteResourceProperties();
-        deleteResourceProperty( requestElem.getDelete().getResourceProperty() );
+        try
+        {
+            deleteResourceProperty( requestElem.getDelete().getResourceProperty() );
+        }
+        catch (SetResourcePropertyRequestFailedFaultException se)
+        {
+            throw new DeleteResourcePropertyRequestFailedFaultException(se.getNamespaces(),se.getDescription());
+        }
+        catch (InvalidSetResourcePropertiesRequestContentFaultException  is)
+        {
+            throw new DeleteResourcePropertyRequestFailedFaultException(is.getNamespaces(),is.getDescription());
+        }
         return responseDoc;
     }
 

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/InsertResourcePropertiesPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/InsertResourcePropertiesPortTypeImpl.java?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/InsertResourcePropertiesPortTypeImpl.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/InsertResourcePropertiesPortTypeImpl.java Wed Mar  2 11:46:15 2005
@@ -2,6 +2,10 @@
 
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.faults.InvalidSetResourcePropertiesRequestContentFaultException;
+import org.apache.ws.resource.properties.faults.SetResourcePropertyRequestFailedFaultException;
+import org.apache.ws.resource.properties.faults.InvalidInsertResourcePropertiesRequestContentFaultException;
+import org.apache.ws.resource.properties.faults.InsertResourcePropertyRequestFailedFaultException;
 import org.apache.ws.resource.properties.impl.AbstractSetResourcePropertiesPortType;
 import org.apache.ws.resource.properties.v1_2_draft05.porttype.InsertResourcePropertiesPortType;
 import org.apache.ws.util.XmlBeanUtils;
@@ -41,7 +45,18 @@
         InsertResourcePropertiesResponseDocument responseDoc = createResponseDocument();
         InsertResourcePropertiesDocument.InsertResourceProperties requestElem = requestDoc.getInsertResourceProperties();
         XmlObject[] propElemsToBeInserted = XmlBeanUtils.getChildElements( requestElem.getInsert() );
-        insertResourceProperty( propElemsToBeInserted );
+        try
+        {
+            insertResourceProperty( propElemsToBeInserted );
+        }
+        catch (InvalidSetResourcePropertiesRequestContentFaultException e)
+        {
+            throw new InvalidInsertResourcePropertiesRequestContentFaultException(e.getNamespaces(), e.getDescription());
+        }
+        catch (SetResourcePropertyRequestFailedFaultException sr)
+        {
+            throw new InsertResourcePropertyRequestFailedFaultException(sr.getNamespaces(), sr.getDescription());
+        }
         return responseDoc;
     }
 

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/UpdateResourcePropertiesPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/UpdateResourcePropertiesPortTypeImpl.java?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/UpdateResourcePropertiesPortTypeImpl.java (original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/properties/v1_2_draft05/porttype/impl/UpdateResourcePropertiesPortTypeImpl.java Wed Mar  2 11:46:15 2005
@@ -2,6 +2,10 @@
 
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.properties.NamespaceVersionHolder;
+import org.apache.ws.resource.properties.faults.SetResourcePropertyRequestFailedFaultException;
+import org.apache.ws.resource.properties.faults.InvalidSetResourcePropertiesRequestContentFaultException;
+import org.apache.ws.resource.properties.faults.UpdateResourcePropertyRequestFailedFaultException;
+import org.apache.ws.resource.properties.faults.InvalidUpdateResourcePropertiesRequestContentFaultException;
 import org.apache.ws.resource.properties.impl.AbstractResourcePropertiesPortType;
 import org.apache.ws.resource.properties.impl.AbstractSetResourcePropertiesPortType;
 import org.apache.ws.resource.properties.v1_2_draft05.porttype.UpdateResourcePropertiesPortType;
@@ -39,7 +43,18 @@
         UpdateResourcePropertiesResponseDocument responseDoc = createResponseDocument();
         UpdateResourcePropertiesDocument.UpdateResourceProperties requestElem = requestDoc.getUpdateResourceProperties();
         XmlObject[] newPropElems = XmlBeanUtils.getChildElements( requestElem.getUpdate() );
-        updateResourceProperty( newPropElems );
+        try
+        {
+            updateResourceProperty( newPropElems );
+        }
+        catch (SetResourcePropertyRequestFailedFaultException e)
+        {
+            throw new UpdateResourcePropertyRequestFailedFaultException(e.getNamespaces(), e.getDescription());
+        }
+        catch (InvalidSetResourcePropertiesRequestContentFaultException e)
+        {
+            throw new InvalidUpdateResourcePropertiesRequestContentFaultException(e.getNamespaces(), e.getDescription());
+        }
         return responseDoc;
     }
 

Modified: incubator/apollo/trunk/src/site/content/example/requests/Create_Job.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/requests/Create_Job.soap?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/requests/Create_Job.soap (original)
+++ incubator/apollo/trunk/src/site/content/example/requests/Create_Job.soap Wed Mar  2 11:46:15 2005
@@ -10,9 +10,9 @@
    </Header>
 
    <Body>
-     <Create_JobRequest>
-       <job_name>My Second Printer Job</job_name>
-     </Create_JobRequest>
+     <wsrf-pr:Create_JobRequest>
+       <wsrf-pr:job_name>My Second Printer Job</wsrf-pr:job_name>
+     </wsrf-pr:Create_JobRequest>
    </Body>
 
 </Envelope>

Modified: incubator/apollo/trunk/src/site/content/example/requests/Destroy_Job.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/requests/Destroy_Job.soap?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/requests/Destroy_Job.soap (original)
+++ incubator/apollo/trunk/src/site/content/example/requests/Destroy_Job.soap Wed Mar  2 11:46:15 2005
@@ -2,11 +2,13 @@
 
 <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
 	  xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draft-05.xsd"
-          xmlns:wsrf-pr="http://docs.oasis-open.org/wsrf/2005/01/wsrf-Interop-2.0-draft-03.xsd">
+          xmlns:wsrf-pr="http://docs.oasis-open.org/wsrf/2005/01/wsrf-Interop-2.0-draft-03.xsd"
+          xmlns:wsrf-pr-wsdl="http://docs.oasis-open.org/wsrf/2005/01/wsrf-Interop-2.0-draft-03.wsdl">
 
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/PrinterFactory</wsa:To>
-      <wsa:Action mustUnderstand="1">http://localhost:8080/wsrf/services/PrinterFactory</wsa:Action>            
+      <wsa:Action mustUnderstand="1">http://localhost:8080/wsrf/services/PrinterFactory</wsa:Action>  
+      <wsrf-pr-wsdl:ResourceID>Job1</wsrf-pr-wsdl:ResourceID>
    </Header>
 
    <Body>

Modified: incubator/apollo/trunk/src/site/content/example/requests/SendDocument.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/requests/SendDocument.soap?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/requests/SendDocument.soap (original)
+++ incubator/apollo/trunk/src/site/content/example/requests/SendDocument.soap Wed Mar  2 11:46:15 2005
@@ -9,20 +9,20 @@
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/PrinterFactory</wsa:To>
       <wsa:Action mustUnderstand="1">http://localhost:8080/wsrf/services/PrinterFactory</wsa:Action>      
       <wsrf-pr-wsdl:ResourceID mustUnderstand="1" 
-            xmlns:wsrf-pr-wsdl="http://docs.oasis-open.org/wsrf/2005/01/wsrf-Interop-2.0-draft-03.wsdl">1</wsrf-pr-wsdl:ResourceID>
+            xmlns:wsrf-pr-wsdl="http://docs.oasis-open.org/wsrf/2005/01/wsrf-Interop-2.0-draft-03.wsdl">Job1</wsrf-pr-wsdl:ResourceID>
    </Header>
 
    <Body>
-     <Send_DocumentRequest> 
-       <last_document>true</last_document>
-       <document_format>text/plain</document_format>
-       <document_content>
-        <Base64Data>
+     <wsrf-pr:Send_DocumentRequest> 
+       <wsrf-pr:last_document>true</wsrf-pr:last_document>
+       <wsrf-pr:document_format>text/plain</wsrf-pr:document_format>
+       <wsrf-pr:document_content>
+        <wsrf-pr:Base64Data>
 	      Q29uZ3JhdHVsYXRpb25zLCB5b3UndmUgcmVh
 	      Y2hlZCB0aGUgZW5kIG9mIHRoZSBTY2VuYXJpbyE=
-        </Base64Data>
-       </document_content>
-     </Send_DocumentRequest>
+        </wsrf-pr:Base64Data>
+       </wsrf-pr:document_content>
+     </wsrf-pr:Send_DocumentRequest>
    </Body>
 
 </Envelope>

Modified: incubator/apollo/trunk/src/site/content/example/requests/SetTerminationTime.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/requests/SetTerminationTime.soap?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/requests/SetTerminationTime.soap (original)
+++ incubator/apollo/trunk/src/site/content/example/requests/SetTerminationTime.soap Wed Mar  2 11:46:15 2005
@@ -3,11 +3,13 @@
 
 
 <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"	 
-          xmlns:wsrf-rl="http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceLifetime-1.2-draft-04.xsd">
+          xmlns:wsrf-rl="http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceLifetime-1.2-draft-04.xsd"
+          xmlns:wsrf-pr-wsdl="http://docs.oasis-open.org/wsrf/2005/01/wsrf-Interop-2.0-draft-03.wsdl">
 
    <Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
       <wsa:To mustUnderstand="1">http://localhost:8080/wsrf/services/PrinterFactory</wsa:To>
-      <wsa:Action mustUnderstand="1">http://localhost:8080/wsrf/services/PrinterFactory</wsa:Action>     
+      <wsa:Action mustUnderstand="1">http://localhost:8080/wsrf/services/PrinterFactory</wsa:Action> 
+      <wsrf-pr-wsdl:ResourceID>Job1</wsrf-pr-wsdl:ResourceID>
    </Header>
 
    <Body>      

Modified: incubator/apollo/trunk/src/site/content/example/requests/Set_InsertDocFormat.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/requests/Set_InsertDocFormat.soap?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/requests/Set_InsertDocFormat.soap (original)
+++ incubator/apollo/trunk/src/site/content/example/requests/Set_InsertDocFormat.soap Wed Mar  2 11:46:15 2005
@@ -12,10 +12,10 @@
    <Body>
       <wsrf-rp:SetResourceProperties>
           <wsrf-rp:Insert>        
-           <document_format_supported>
-	    <mimeMediaType>foo</mimeMediaType>
-	    <mimeMediaType>bar</mimeMediaType>
-           </document_format_supported>      
+           <wsrf-pr:document_format_supported>
+	    <wsrf-pr:mimeMediaType>foo</wsrf-pr:mimeMediaType>
+	    <wsrf-pr:mimeMediaType>bar</wsrf-pr:mimeMediaType>
+           </wsrf-pr:document_format_supported>      
       </wsrf-rp:Insert>
    </wsrf-rp:SetResourceProperties>
    </Body>

Modified: incubator/apollo/trunk/src/site/content/example/requests/Set_InsertJobHoldOvernight.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/requests/Set_InsertJobHoldOvernight.soap?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/requests/Set_InsertJobHoldOvernight.soap (original)
+++ incubator/apollo/trunk/src/site/content/example/requests/Set_InsertJobHoldOvernight.soap Wed Mar  2 11:46:15 2005
@@ -15,7 +15,7 @@
            <wsrf-pr:job_hold_until_supported>
                  Overnight
            </wsrf-pr:job_hold_until_supported>
-         <wsrf-rp:Insert>
+         </wsrf-rp:Insert>
      </wsrf-rp:SetResourceProperties>
    </Body>
 

Modified: incubator/apollo/trunk/src/site/content/example/requests/Set_MultiInsertJobHold.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/requests/Set_MultiInsertJobHold.soap?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/requests/Set_MultiInsertJobHold.soap (original)
+++ incubator/apollo/trunk/src/site/content/example/requests/Set_MultiInsertJobHold.soap Wed Mar  2 11:46:15 2005
@@ -21,7 +21,7 @@
                <wsrf-pr:job_hold_until_default>
                  No-Hold
                </wsrf-pr:job_hold_until_default>
-             <wsrf-rp:Insert>
+           </wsrf-rp:Insert>
      </wsrf-rp:SetResourceProperties>
    </Body>
 

Modified: incubator/apollo/trunk/src/site/content/example/requests/Set_UpdateDocFormat.soap
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/requests/Set_UpdateDocFormat.soap?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/requests/Set_UpdateDocFormat.soap (original)
+++ incubator/apollo/trunk/src/site/content/example/requests/Set_UpdateDocFormat.soap Wed Mar  2 11:46:15 2005
@@ -12,10 +12,10 @@
    <Body>
       <wsrf-rp:SetResourceProperties>
         <wsrf-rp:Update>
-           <document_format_supported>
-	    <mimeMediaType>text/plain</mimeMediaType>
-	    <mimeMediaType>application/postscript</mimeMediaType>
-           </document_format_supported>
+           <wsrf-pr:document_format_supported>
+	    <wsrf-pr:mimeMediaType>text/plain</wsrf-pr:mimeMediaType>
+	    <wsrf-pr:mimeMediaType>application/postscript</wsrf-pr:mimeMediaType>
+           </wsrf-pr:document_format_supported>
       </wsrf-rp:Update>
    </wsrf-rp:SetResourceProperties>
    </Body>

Modified: incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortResource.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortResource.java?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortResource.java (original)
+++ incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortResource.java Wed Mar  2 11:46:15 2005
@@ -31,7 +31,7 @@
 {
    private String                m_jobName;
    private long                  m_jobId;
-   private String                m_origUserName;
+   private String                m_origUserName = "Johann Gutenberg";
    private EndpointReferenceType m_jobRef;
    private EndpointReferenceType m_printerRef;
    private boolean m_isReady = false;
@@ -56,7 +56,10 @@
       super(  );
       m_jobName         = jobName;
       m_jobId           = jobId;
-      m_origUserName    = origUserName;
+      if(origUserName != null && !origUserName.equals(""))
+      {
+        m_origUserName    = origUserName;
+      }
       m_jobRef          = jobEpr;
       m_printerResource = printerResource;
       m_printerRef      = printerResource.getEpr();

Modified: incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortService.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortService.java?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortService.java (original)
+++ incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/JobPortService.java Wed Mar  2 11:46:15 2005
@@ -18,17 +18,18 @@
 import org.apache.ws.resource.ResourceContext;
 import org.apache.ws.resource.ResourceContextException;
 import org.apache.ws.resource.ResourceException;
-import org.apache.ws.resource.impl.SimpleTypeResourceKey;
 import org.apache.ws.resource.properties.impl.XmlBeansResourceProperty;
 import org.apache.ws.resource.properties.v1_2_draft05.porttype.impl.NamespaceVersionHolderImpl;
-import org.apache.ws.util.XmlBeanUtils;
-import org.apache.xmlbeans.XmlObject;
-import org.oasisOpen.docs.wsrf.x2005.x01.wsrfInterop20Draft03.*;
+import org.oasisOpen.docs.wsrf.x2005.x01.wsrfInterop20Draft03.CreationResponseDocument;
+import org.oasisOpen.docs.wsrf.x2005.x01.wsrfInterop20Draft03.DocumentContentType;
+import org.oasisOpen.docs.wsrf.x2005.x01.wsrfInterop20Draft03.JobStateType;
+import org.oasisOpen.docs.wsrf.x2005.x01.wsrfInterop20Draft03.MimeMediaTypeType;
+import org.oasisOpen.docs.wsrf.x2005.x01.wsrfInterop20Draft03.MimeMediaTypes;
+import org.oasisOpen.docs.wsrf.x2005.x01.wsrfInterop20Draft03.SendDocumentRequestDocument;
 import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
-import org.xmlsoap.schemas.ws.x2004.x08.addressing.ReferencePropertiesType;
+
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import javax.xml.namespace.QName;
 
 /**
  * This class should be generated ONCE (and not overwritten) to maintain user-added code.
@@ -96,11 +97,8 @@
              {
                  jobResource.enqueue();
              }
-             org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet =
-               jobResource.getResourcePropertySet(  );
 
-            //todo ok this just means we add to document to be printed...need some representation or something
-            //also if is last document..probably change its state or something
+             addJobInfoToResponse(jobResource,creationResponse);
          }
          else
          {
@@ -115,6 +113,21 @@
       return responseDoc;
    }
 
+   private void addJobInfoToResponse( JobPortResource                           instance,
+                                      CreationResponseDocument.CreationResponse creationResponse )
+   {
+      org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet =
+         instance.getResourcePropertySet(  );
+      creationResponse.setJobReference( (EndpointReferenceType) ( (XmlBeansResourceProperty) resourcePropertySet
+                                                                  .get( JobPortPropertyQNames.JOB_REFERENCE ) )
+                                                                .toXmlObjects(  )[0] );
+      JobStateType jobState =
+         (JobStateType) ( (XmlBeansResourceProperty) resourcePropertySet.get( JobPortPropertyQNames.JOB_STATE ) )
+                        .toXmlObjects(  )[0];
+      creationResponse.xsetJobState( jobState ); //only way I could get to compile
+      creationResponse.setSuccessStatusCode( "successful-ok" );
+   }
+
    private boolean isDocTypeSupported( String documentFormat )
    throws ResourceContextException, 
           ResourceException
@@ -123,26 +136,26 @@
       JobPortResource             jobPortResource     = (JobPortResource) getResourceContext(  ).getResource(  );
       XmlBeansResourceProperty    xmlProp             =
          (XmlBeansResourceProperty) jobPortResource.getResourcePropertySet(  ).get( JobPortPropertyQNames.JOB_PRINTER_REFERENCE );
-      JobPrinterReferenceDocument printRef            = (JobPrinterReferenceDocument) xmlProp.get( 0 );
-      EndpointReferenceType       jobPrinterReference = printRef.getJobPrinterReference(  );
-      ReferencePropertiesType     referenceProperties = jobPrinterReference.getReferenceProperties(  );
+      EndpointReferenceType jobPrinterReference            = (EndpointReferenceType) xmlProp.get( 0 );
+      //EndpointReferenceType       jobPrinterReference = printRef.getJobPrinterReference(  );
+     /* ReferencePropertiesType     referenceProperties = jobPrinterReference.getReferenceProperties(  );
       QName                       keyQName            =
          QName.valueOf( "{http://docs.oasis-open.org/wsrf/2005/01/wsrf-Interop-2.0-draft-03.wsdl}ResourceID)" );
       XmlObject[]                 childElements       =
          XmlBeanUtils.getChildElements( referenceProperties, keyQName );
       String                      value               = XmlBeanUtils.getValue( childElements[0] ); //todo check this
-      SimpleTypeResourceKey       key                 = new SimpleTypeResourceKey( keyQName, value );
+      SimpleTypeResourceKey       key                 = new SimpleTypeResourceKey( keyQName, value );*/
       try
       {
          InitialContext                  ctx                     = new InitialContext(  );
          PrinterPortHome                 home                    =
             (PrinterPortHome) ctx.lookup( PrinterPortHome.HOME_LOCATION );
-         PrinterPortResource             printResource           = (PrinterPortResource) home.find( key );
+         PrinterPortResource             printResource           = (PrinterPortResource) home.find( null );
          XmlBeansResourceProperty        xmlPropDocFormat        =
             (XmlBeansResourceProperty) printResource.getResourcePropertySet(  ).get( PrinterPortPropertyQNames.DOCUMENT_FORMAT_SUPPORTED );
-         DocumentFormatSupportedDocument docsSupported           =
-            (DocumentFormatSupportedDocument) xmlPropDocFormat.toXmlObjects(  )[0];
-         MimeMediaTypes                  documentFormatSupported = docsSupported.getDocumentFormatSupported(  );
+         MimeMediaTypes documentFormatSupported           =
+            (MimeMediaTypes) xmlPropDocFormat.toXmlObjects(  )[0];
+
          MimeMediaTypeType.Enum[]        mimeMediaTypeArray      =
             documentFormatSupported.getMimeMediaTypeArray(  );
 
@@ -150,7 +163,7 @@
          for ( int i = 0; i < mimeMediaTypeArray.length; i++ )
          {
             MimeMediaTypeType.Enum enum = mimeMediaTypeArray[i];
-            if ( enum.equals( documentFormat ) )
+            if ( enum.toString().equals( documentFormat ) )
             {
                docTypeSupported = true;
             }

Added: incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AScenarios.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AScenarios.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AScenarios.java (added)
+++ incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AScenarios.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,27 @@
+package org.oasisOpen.docs.wsrf;
+
+import junit.framework.TestCase;
+
+import java.io.IOException;
+
+
+/**
+ * @author Sal Campana
+ */
+public class AScenarios extends TestCase
+{
+
+    public void testAScenarios() throws Exception
+    {
+        InteropTestCase testCase = new InteropTestCase();
+        testCase.setUp();
+        testCase.createPrinter();
+        testCase.testValidatePrinterInitialState();
+        testCase.testGetPrinterQueueCount_SCENARIO_A1();
+        testCase.testGetPrinterStateAndQueueCount_SCENARIO_A2();
+        testCase.testGetPrinterResourcePropertiesDocument_SCENARIO_A3();
+        testCase.testQueryResourceProperties_SCENARIO_A4();
+        testCase.tearDown();
+    }
+
+}

Added: incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AllScenarios.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AllScenarios.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AllScenarios.java (added)
+++ incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/AllScenarios.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,23 @@
+package org.oasisOpen.docs.wsrf;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * @author Sal Campana
+ */
+public class AllScenarios
+{
+    public static Test suite()
+    {
+        TestSuite suite = new TestSuite();
+        suite.addTestSuite(AScenarios.class);
+        suite.addTestSuite(BScenarios.class);
+        suite.addTestSuite(CScenarios.class);
+        suite.addTestSuite(DScenario.class);
+        suite.addTestSuite(EScenario.class);
+        return suite;
+    }
+
+}

Added: incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/BScenarios.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/BScenarios.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/BScenarios.java (added)
+++ incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/BScenarios.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,27 @@
+package org.oasisOpen.docs.wsrf;
+
+import junit.framework.TestCase;
+
+
+/**
+ * @author Sal Campana
+ */
+public class BScenarios extends TestCase
+{
+    public void testBScenarios() throws Exception
+    {
+        InteropTestCase testCase = new InteropTestCase();
+        testCase.setUp();
+        testCase.createPrinter();
+
+        testCase.testUpdateResourceProperties_SCENARIO_B1();
+        testCase.testFailInsertResourceProps_SCENARIO_B1_FAIL();
+        testCase.testSetResourceProperties_SCENARIO_B2();
+        testCase.testMultiSetResourceProps_SCENARIO_B3();
+        testCase.testFailMultiSetResourceProps_SCENARIO_B3_VARIANT();
+        testCase.testResetToInitialState_SCENARIO_B3_RESET();
+        testCase.tearDown();
+    }
+
+
+}

Added: incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/CScenarios.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/CScenarios.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/CScenarios.java (added)
+++ incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/CScenarios.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,24 @@
+package org.oasisOpen.docs.wsrf;
+
+import junit.framework.TestCase;
+
+
+/**
+ * @author Sal Campana
+ */
+public class CScenarios extends TestCase
+{
+    public void testCScenarios() throws Exception
+    {
+        InteropTestCase testCase = new InteropTestCase();
+        testCase.setUp();
+        testCase.createPrinter();
+        //set the printer to accepting jobs
+        testCase.testUpdateResourceProperties_SCENARIO_B1();
+        testCase.testPrintJob_SCENARIO_C();
+        testCase.testValidatePrinterJobProperties();
+
+        testCase.tearDown();
+    }
+
+}

Added: incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/DScenario.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/DScenario.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/DScenario.java (added)
+++ incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/DScenario.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,28 @@
+package org.oasisOpen.docs.wsrf;
+
+import junit.framework.TestCase;
+
+
+/**
+ * @author Sal Campana
+ */
+public class DScenario extends TestCase
+{
+     public void testDScenario() throws Exception
+    {
+        InteropTestCase testCase = new InteropTestCase();
+        testCase.setUp();
+        testCase.createPrinter();
+
+
+        //set the printer to accepting jobs //todo here?
+        testCase.testUpdateResourceProperties_SCENARIO_B1();
+        testCase.testPrintJob_SCENARIO_C();
+
+        testCase.testDestroy_SCENARIO_D();
+        testCase.testFailDestroy_SCENARIO_D_FAIL();
+
+        testCase.tearDown();
+    }
+
+}

Added: incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/EScenario.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/EScenario.java?view=auto&rev=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/EScenario.java (added)
+++ incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/EScenario.java Wed Mar  2 11:46:15 2005
@@ -0,0 +1,29 @@
+package org.oasisOpen.docs.wsrf;
+
+import junit.framework.TestCase;
+
+
+/**
+ * @author Sal Campana
+ */
+public class EScenario extends TestCase
+{
+     public void testEScenario() throws Exception
+    {
+        InteropTestCase testCase = new InteropTestCase();
+        testCase.setUp();
+        testCase.createPrinter();
+
+        //set the printer to accepting jobs //todo here?
+        testCase.testUpdateResourceProperties_SCENARIO_B1();
+        testCase.testSetResourceProperties_SCENARIO_B2();
+
+        testCase.testScheduledTermination_SCENARIO_E();
+        testCase.testSetTerminationTime_SCENARIO_E_CONTINUED();
+
+        testCase.testSendDocument_SCENARIO_E_CONTINUED();
+
+        testCase.tearDown();
+    }
+
+}

Modified: incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java?view=diff&r1=155947&r2=155948
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java (original)
+++ incubator/apollo/trunk/src/site/content/example/src/test/org/oasisOpen/docs/wsrf/InteropTestCase.java Wed Mar  2 11:46:15 2005
@@ -5,10 +5,21 @@
 import org.apache.ws.util.jndi.XmlBeanJndiUtils;
 import org.apache.ws.util.soap.SoapClient;
 import org.apache.ws.util.test.axis.AbstractOneAxisTestCase;
+import org.apache.ws.util.XmlBeanUtils;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlException;
+import org.apache.xmlbeans.XmlCursor;
+import org.oasisOpen.docs.wsrf.x2004.x11.wsrfWSResourceLifetime12Draft04.SetTerminationTimeDocument;
+import org.xmlsoap.schemas.soap.envelope.EnvelopeDocument;
+import org.xmlsoap.schemas.soap.envelope.Envelope;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.URL;
+import java.util.Calendar;
+
+import junit.framework.TestCase;
 
 /**
  * Created by IntelliJ IDEA.
@@ -64,12 +75,23 @@
         createPrinter();
     }
 
+    /**
+     * Stops the embedded Axis server after the last test within this test case has finished running.
+     *
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception
+    {
+        super.tearDown();
+    }
+
     protected FileProvider getFileProvider() throws ConfigurationException
     {
         return new FileProvider(InteropTestCase.class.getResourceAsStream("/server-config.wsdd"));
     }
 
     //*****  tests ********
+
     public void createPrinter() throws IOException
     {
         String response = sendRequest(m_printerFactoryURL, SOAP_REQ_CREATE_PRINTER);
@@ -115,7 +137,7 @@
     }
 
     public void testQueryCompletedJobs_SCENARIO_A4_VARIANT() throws IOException
-    {
+    {         //todo this is after jobs are created
         String response = sendRequest(m_printerURL, "QueryJobsCompleted.soap");
         assertTrue(response.indexOf("QueryResourcePropertiesResponse") > -1);
         //todo look at response to see how to validate
@@ -174,8 +196,8 @@
         String response = sendRequest(m_printerURL, "Set_MultiDelete.soap");
         assertTrue(response.indexOf("SetResourcePropertiesResponse") > -1);
         response = sendRequest(m_printerURL, "GetPrinterPropertiesDoc.soap");
-        assertTrue(response.indexOf("job_hold_until_default") > -1);
-        assertTrue(response.indexOf("_hold_until_supported") > -1);
+        assertTrue(response.indexOf("job_hold_until_default") == -1);
+        assertTrue(response.indexOf("_hold_until_supported") == -1);
     }
 
     public void testPrintJob_SCENARIO_C() throws IOException
@@ -210,20 +232,37 @@
 
     public void testScheduledTermination_SCENARIO_E() throws IOException
     {
-        String response = sendRequest(m_jobURL, "Create_Job.soap");
+        String response = sendRequest(m_printerURL, "Create_Job.soap");
         assertTrue(response.indexOf("CreationResponse") > -1);
         assertTrue(response.indexOf("successful-ok") > -1);
 
         response = sendRequest(m_printerURL, "GetPrinterPropertiesDoc.soap");
-        assertTrue(response.indexOf("<job_id>2") > -1);
+        assertTrue(response.indexOf("job_id>1") > -1);
     }
 
     public void testSetTerminationTime_SCENARIO_E_CONTINUED() throws IOException
     {
         //may need to do this in code to account for date time change
-        String response = sendRequest(m_jobURL, "SetTerminationTime.soap");
-        assertTrue(response.indexOf("GetResourcePropertyResponse") > -1);
-        //todo check this one
+        EnvelopeDocument envelopeDoc = null;
+        try
+        {
+            envelopeDoc = (EnvelopeDocument) XmlObject.Factory.parse(new File(m_requestsDir, "SetTerminationTime.soap"));
+        }
+        catch (XmlException e)
+        {            
+            fail(e.getMessage());
+        }
+        Calendar instance = Calendar.getInstance();
+        instance.set(Calendar.MINUTE, instance.get(Calendar.MINUTE) + 5);
+
+        Envelope envelope = envelopeDoc.getEnvelope();
+        XmlObject[] childElements = XmlBeanUtils.getChildElements(envelope.getBody());
+        SetTerminationTimeDocument.SetTerminationTime childElement = (SetTerminationTimeDocument.SetTerminationTime) childElements[0];
+        childElement.setRequestedTerminationTime(instance);
+
+        String response = sendRequest(m_jobURL, envelopeDoc.newInputStream());
+        assertTrue(response.indexOf("SetTerminationTimeResponse") > -1);
+
     }
 
     public void testSendDocument_SCENARIO_E_CONTINUED() throws IOException
@@ -269,5 +308,10 @@
     public String sendRequest(String requestURL, String requestFileName) throws IOException
     {
         return SoapClient.sendRequest(new URL(requestURL), new File(m_requestsDir, requestFileName), null);
+    }
+
+    public String sendRequest(String requestURL, InputStream is) throws IOException
+    {
+        return SoapClient.sendRequest(new URL(requestURL), is, null);
     }
 }



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