antelder 2003/01/02 02:34:52
Modified: java/src/org/apache/wsif/util WSIFUtils.java
Log:
Add a new method to WSIFUtils to get the WSDL extension registry that has been
populated with all the WSIF provider custom WSDL extensions.
This is required when you want to use a WSDL reader not from WSIF (eg UDDI) to read
WSDL with WSIF bindings.
Revision Changes Path
1.26 +16 -0 xml-axis-wsif/java/src/org/apache/wsif/util/WSIFUtils.java
Index: WSIFUtils.java
===================================================================
RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/util/WSIFUtils.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- WSIFUtils.java 12 Dec 2002 14:25:58 -0000 1.25
+++ WSIFUtils.java 2 Jan 2003 10:34:52 -0000 1.26
@@ -85,6 +85,7 @@
import javax.wsdl.Service;
import javax.wsdl.WSDLException;
import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.ExtensionRegistry;
import javax.wsdl.factory.WSDLFactory;
import javax.wsdl.xml.WSDLReader;
import javax.wsdl.xml.WSDLWriter;
@@ -93,6 +94,7 @@
import org.apache.wsif.WSIFConstants;
import org.apache.wsif.WSIFException;
import org.apache.wsif.WSIFService;
+import org.apache.wsif.base.WSIFServiceImpl;
import org.apache.wsif.compiler.schema.tools.Schema2Java;
import org.apache.wsif.format.WSIFFormatHandler;
import org.apache.wsif.logging.MessageLogger;
@@ -1399,6 +1401,20 @@
}
return unWrappedParts;
+ }
+
+ /**
+ * Gets the WSIF WSDL Extensions Registry
+ * This calls initializeProviders to ensure all providers
+ * have registered any custom WSDL extensions.
+ * @return ExtensionRegistry the WSIF ExtensionRegistry
+ */
+ public static ExtensionRegistry getExtensionRegistry() {
+ Trc.entry(null);
+ initializeProviders();
+ ExtensionRegistry er = WSIFServiceImpl.getCompositeExtensionRegistry();
+ Trc.exit(er);
+ return er;
}
}