You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/01/15 17:30:35 UTC
svn commit: r496391 -
/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java
Author: danj
Date: Mon Jan 15 08:30:34 2007
New Revision: 496391
URL: http://svn.apache.org/viewvc?view=rev&rev=496391
Log:
WsResourceRouter that extends WSA DestinationUnreachable fault by adding WSRF ResourceUnknownFault data.
This is a fix for MUSE-180.
Added:
webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java
Added: webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java?view=auto&rev=496391
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java (added)
+++ webservices/muse/trunk/modules/muse-wsrf-impl/src/org/apache/muse/ws/resource/impl/WsResourceRouter.java Mon Jan 15 08:30:34 2007
@@ -0,0 +1,50 @@
+/*=============================================================================*
+ * Copyright 2007 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.muse.ws.resource.impl;
+
+import org.apache.muse.core.Resource;
+import org.apache.muse.core.routing.SimpleResourceRouter;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.resource.faults.ResourceUnknownFault;
+
+/**
+ *
+ * WsResourceRouter is a sub-class of SimpleResourceRouter that wraps all
+ * WS-A DestinationUnreachable faults in a WS-RF ResourceUnknownFault. These
+ * two faults have the same functional role, but WS-RF messages advertise
+ * the ResourceUnknownFault, so we use it instead of the WS-A fault.
+ *
+ * @author Dan Jemiolo (danj)
+ *
+ */
+
+public class WsResourceRouter extends SimpleResourceRouter
+{
+ protected Resource getTargetResource()
+ throws SoapFault
+ {
+ try
+ {
+ return super.getTargetResource();
+ }
+
+ catch (SoapFault error)
+ {
+ throw new ResourceUnknownFault(error);
+ }
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org