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/01 15:33:32 UTC

svn commit: r155782 - in incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl: ClientErrorNotPossibleFaultException.java JobPortService.java PrinterPortService.java

Author: scamp
Date: Tue Mar  1 06:33:29 2005
New Revision: 155782

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


Added:
    incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/ClientErrorNotPossibleFaultException.java
Modified:
    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/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/PrinterPortService.java

Added: incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/ClientErrorNotPossibleFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/ClientErrorNotPossibleFaultException.java?view=auto&rev=155782
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/ClientErrorNotPossibleFaultException.java (added)
+++ incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/ClientErrorNotPossibleFaultException.java Tue Mar  1 06:33:29 2005
@@ -0,0 +1,33 @@
+package org.oasisOpen.docs.wsrf.x2005.x01.wsrfInterop20Draft03Wsdl;
+
+import org.apache.ws.resource.faults.BaseFaultException;
+import org.apache.ws.resource.properties.NamespaceVersionHolder;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: sacam
+ * Date: Mar 1, 2005
+ * Time: 9:19:17 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ClientErrorNotPossibleFaultException extends BaseFaultException{
+
+    /**
+     * Constructs a new ClientErrorNotPossibleFaultException with the specified name. The SOAP fault code will be set to soap:Client and
+     * the SOAP fault string will be set to the fault name. Sets the timestamp field to the current time and the SOAP
+     * actor and detail fields to null.
+     *
+     * @param namespaces
+     */
+    public ClientErrorNotPossibleFaultException(NamespaceVersionHolder namespaces) {
+        super(namespaces, getQName(namespaces));
+    }
+
+    private static QName getQName(NamespaceVersionHolder namespaces)
+      {
+          return new QName( PrinterPortPropertyQNames.PRINTER_STATE.getNamespaceURI(), "client_error_not_possibleFault",
+                    "wsrf-prw" );
+      }
+}

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=155781&r2=155782
==============================================================================
--- 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 Tue Mar  1 06:33:29 2005
@@ -20,6 +20,7 @@
 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.*;
@@ -108,7 +109,7 @@
       }
       catch ( Exception e )
       {
-         //throw something
+         throw new ClientErrorNotPossibleFaultException(new NamespaceVersionHolderImpl());
       }
 
       return responseDoc;
@@ -118,7 +119,6 @@
    throws ResourceContextException, 
           ResourceException
    {
-      //not sure if over engineering here
       boolean                     docTypeSupported    = false;
       JobPortResource             jobPortResource     = (JobPortResource) getResourceContext(  ).getResource(  );
       XmlBeansResourceProperty    xmlProp             =
@@ -158,7 +158,7 @@
       }
       catch ( NamingException e )
       {
-         //throw something!!
+         throw new ClientErrorNotPossibleFaultException(new NamespaceVersionHolderImpl());
       }
 
       return docTypeSupported;

Modified: incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/PrinterPortService.java
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/PrinterPortService.java?view=diff&r1=155781&r2=155782
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/PrinterPortService.java (original)
+++ incubator/apollo/trunk/src/site/content/example/src/java/org/oasisOpen/docs/wsrf/x2005/x01/wsrfInterop20Draft03Wsdl/PrinterPortService.java Tue Mar  1 06:33:29 2005
@@ -19,6 +19,7 @@
 import org.apache.ws.resource.ResourceContextException;
 import org.apache.ws.resource.ResourceException;
 import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.properties.v1_2_draft05.porttype.impl.NamespaceVersionHolderImpl;
 import org.apache.ws.resource.properties.impl.XmlBeansResourceProperty;
 import org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet;
 import org.apache.xmlbeans.XmlBoolean;
@@ -110,7 +111,7 @@
       }
       else
       {
-         //todo throw custom spec-defined fault
+         throw new ClientErrorNotPossibleFaultException(new NamespaceVersionHolderImpl());
       }
 
       return responseDocument;
@@ -159,7 +160,7 @@
             }
             else
             {
-               //todo throw custom spec-defined fault
+               throw new ClientErrorNotPossibleFaultException(new NamespaceVersionHolderImpl());
             }
          }
          catch ( Exception e )
@@ -169,7 +170,7 @@
       }
       else
       {
-        //todo throw custom spec-defined fault
+        throw new ClientErrorNotPossibleFaultException(new NamespaceVersionHolderImpl());
       }
 
 
@@ -180,12 +181,12 @@
    {
       PrinterPortResource resource = null;
       try
-      {           //todo do we have a bug?????? fails for singleton
+      {
          resource = (PrinterPortResource) getResourceContext(  ).getResource(  );
       }
       catch ( Exception e )
       {
-         //todo throw custom spec-defined fault
+         throw new ClientErrorNotPossibleFaultException(new NamespaceVersionHolderImpl());
       }
 
       XmlBeansResourceProperty resourceProperty =
@@ -223,14 +224,6 @@
    {
       XmlBeansResourcePropertySet propSet = (XmlBeansResourcePropertySet) instance.getResourcePropertySet(  );
       return (JobPropertiesDocument) propSet.toXmlObject(  );
-   }
-
-   private EndpointReferenceType getResourceEpr(  )
-   throws ResourceContextException, 
-          ResourceException
-   {
-      PrinterPortResource resource = (PrinterPortResource) getResourceContext(  ).getResource(  );
-      return resource.getEpr(  );
    }
 
    private void addJobInfoToResponse( JobPortResource                           instance,



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