ws-wsrf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r326695 - /webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml
Date Wed, 19 Oct 2005 20:36:41 GMT
Author: scamp
Date: Wed Oct 19 13:36:39 2005
New Revision: 326695

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

Modified:
    webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml

Modified: webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml?rev=326695&r1=326694&r2=326695&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml (original)
+++ webservices/wsrf/trunk/src/site/content/xdocs/dev_guide/metadata.xml Wed Oct 19 13:36:39
2005
@@ -12,6 +12,7 @@
 			<a href="http://msdn.microsoft.com/library/en-us/dnglobspec/html/ws-metadataexchange.pdf">WS-Metadata
Exchange</a> (WS-MEx) specification (defined by Microsoft 
 			and other industry contributors) defines operations that can be provided by services to
allow clients to retrieve these metadata documents.
 			</p>
+			<note>Pubscribe will handle the GetMetadata operation for you if your WSDL supports
the portType.  The Get operation, however will be generated as an abstract method which you
will need to implement in your Service class.  If you do not wish to support/implement the
Get operation, you may delegate the operation to the <code>org.apache.ws.resource.metadataexchange.v2004_09.porttype.impl.MetadataExchangePortTypeImpl.get()</code>
operation which will in turn throw a fault.</note>
 		</section>
 		<section>
 			<title>Define the Operations</title>
@@ -57,57 +58,73 @@
 		</section>
 		
 		<section>
-			<title>Modify the JNDI Configuration File</title>
-			<p>The JNDI configuration file must be modified to include a metadata resource for
your service as well as configurations that define where your metadata files are located.</p>
-			<p>To update the JNDI configuration file to include metadata information:</p>
+			<title>Modify the Configuration File</title>
+			<p>The WSRF configuration file must be modified to include a metadata bean for your
service as well as configurations that define where your metadata files are located.</p>
+			<p>To update the WSRF configuration file to include metadata information:</p>
 			<ol>
-				<li>Using a text editor, open <code>jndi-config.xml</code> in the <code>WEB-INF/classes</code>
directory.</li>
-				<li>Add the following JNDI resource block to the service, for which you would like
to associate metadata:
+				<li>Using a text editor, open <code>wsrf-config.xml</code> in the <code>WEB-INF/classes</code>
directory.</li>
+				<li>Add the following property to the ResourceHome bean , for which you would like
to associate metadata:
 				<source><![CDATA[
-<service name="myService">
-   <resource name="metadata" type="org.apache.ws.util.jndi.tools.MetadataConfigImpl">]]></source>
-					<p>The <code>org.apache.ws.util.jndi.tools.MetadataConfigImpl</code>
object containing the metadata is available via JNDI using a Context lookup of 
-				<code>wsrf/services/{service_name}/metadata</code> - i.e. <code>ctx.lookup("wsrf/services/sushi/metadata");</code>
+    <property name="metadataConfig">
+    <bean class="org.apache.ws.util.jndi.tools.MetadataConfigImpl" singleton="true">
+	  <constructor-arg>
+	    <list>		  
+		<bean class="org.apache.ws.util.jndi.tools.MetadataEntry">     
+		  <property name="dialect">    
+		    <value>http://schemas.xmlsoap.org/wsdl/</value>    
+		  </property>  
+		  <property name="identifier">  
+		    <value>http://ws.apache.org/notification/base/service/SubscriptionManager.wsdl</value>
+		  </property>   
+		  <property name="location"> 
+		    <value>wsdl/SubscriptionManager.wsdl</value>
+		  </property>	    
+		</bean>	 
+	    </list>
+	  </constructor-arg>	    
+	</bean> 
+    </property>	 ]]></source>
+					<p>The <code>org.apache.ws.util.jndi.tools.MetadataConfigImpl</code>
object containing the metadata is available via the ResourceHome interface, which is available
via the ResourceContext  - i.e. <code>getResourceContext().getResourceHome().getMetadataConfig()</code>
 					</p>
 				</li>
-				<li>In the metadata resource block, add a<code> metadataConfig</code>
element that contains metadata configurations. The configuration includes a <code>dialect</code>

-				attribute that defines the type of the data (xsd, wsdl, etc...) and an identifier attribute
that uniquely identifies a particular document and is typically a targetNamespace. The 
-				following examples demonstrate five different methods of configuring where your metadata
files are located. The files should be "reachable" at the configured locations.<source><![CDATA[
-<resource name="metadata" type="org.apache.ws.util.jndi.tools.MetadataConfigImpl">
-   <metadataConfig>
-      <!-- classpath -->
-      <metadata dialect="http://www.w3.org/2001/XMLSchema" identifier="http://ws.apache.org/resource/properties/test/sushi_classpath">
-         <location>org/apache/ws/resource/properties/SushiProperties.xsd</location>
-      </metadata>
-            
-      <!-- file -->
-      <metadata dialect="http://schemas.xmlsoap.org/wsdl/" identifier="http://ws.apache.org/resource/properties/test/sushi_wsdl">
-         <location>C:/Projects/apache/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiProperties.wsdl</location>
-      </metadata>
-            
-      <!-- http url -->
-      <metadata dialect="http://www.w3.org/2001/XMLSchema" identifier="http://ws.apache.org/resource/properties/test/sushi_url">
-         <location>http://localhost:8080/wsrf/SushiProperties.xsd</location>
-      </metadata>
-            
-      <!-- file url -->
-      <metadata dialect="http://www.w3.org/2001/XMLSchema" identifier="http://ws.apache.org/resource/properties/test/sushi_fileurl">
-         <location>file://C:/Projects/apache/wsrf/trunk/src/test/org/apache/ws/resource/properties/SushiProperties.xsd</location>
-      </metadata>
-            
-      <!-- EndpointReference -->
-      <metadata dialect="http://schemas.xmlsoap.org/ws/2004/08/addressing" identifier="http://ws.apache.org/resource/properties/test/sushi_epr">
          
-         <reference xmlns:wsa04="http://schemas.xmlsoap.org/ws/2004/08/addressing">
-            <wsa04:Address>http://localhost:8080/wsrf/services/sushi</wsa04:Address>
-            <wsa04:ReferenceProperties>
-               <sushi:ResourceIdentifier xmlns:sushi="http://ws.apache.org/resource/properties/test/sushi">1</sushi:ResourceIdentifier>
-            </wsa04:ReferenceProperties>
-         </reference>                           
-      </metadata>
-   </metadataConfig>
-</resource>]]></source>
+				<li>The <code>org.apache.ws.util.jndi.tools.MetadataConfigImpl</code>
contains a list of <code>MetadataEntry</code> bean elements. It's properties include
a <code>dialect</code> 
+				property that defines the type of the data (xsd, wsdl, etc...) , an identifier property
that uniquely identifies a particular document and is typically a targetNamespace and a location
which is either a file URL, http URL or a classname (which would be loaded through the Classloader).
The 
+				following example demonstrates an entry for the SubscriptionHome's definition of its
WSDL.<source><![CDATA[
+  <bean id="SubscriptionHome" class="org.apache.ws.notification.base.v2004_06.impl.SubscriptionHome"
init-method="init">
+    <property name="portComponentName">
+      <value>SubscriptionManager</value>
+    </property>
+    <property name="serviceClass">
+      <value>org.apache.ws.notification.base.v2004_06.impl.SubscriptionService</value>
+    </property>
+    <property name="resourceClass">
+      <value>org.apache.ws.notification.base.v2004_06.impl.SubscriptionResource</value>
+    </property>
+    <property name="resourceIdentifierReferenceParameterName">
+      <value>{http://ws.apache.org/notification/base/service/SubscriptionManager}ResourceIdentifier</value>
+    </property>
+    <property name="metadataConfig">
+	<bean class="org.apache.ws.util.jndi.tools.MetadataConfigImpl" singleton="true">
+	  <constructor-arg>
+	    <list>		  
+		<bean class="org.apache.ws.util.jndi.tools.MetadataEntry">     
+		  <property name="dialect">    
+		    <value>http://schemas.xmlsoap.org/wsdl/</value>    
+		  </property>  
+		  <property name="identifier">  
+		    <value>http://ws.apache.org/notification/base/service/SubscriptionManager.wsdl</value>
+		  </property>   
+		  <property name="location"> 
+		    <value>wsdl/SubscriptionManager.wsdl</value>
+		  </property>	    
+		</bean>	 
+	    </list>
+	  </constructor-arg>	    
+	</bean> 
+    </property>	 
+  </bean>]]></source>
 				</li>
-				<li>Save and close jndi-config.xml.</li>
+				<li>Save and close wsrf-config.xml.</li>
 				<li>Restart Tomcat if it is already started.</li>
 			</ol>
 		</section>



Mime
View raw message