incubator-wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ngalla...@apache.org
Subject svn commit: r787550 [1/3] - in /incubator/wink/contrib/ibm-jaxrs/resources: ./ META-INF/ META-INF/services/ dist/ docs/ docs/site/ docs/site/en/ docs/site/en/appdeveloperguide/ docs/site/en/appdeveloperguide/webcontainers/ docs/site/en/samples/ docs/si...
Date Tue, 23 Jun 2009 05:30:07 GMT
Author: ngallardo
Date: Tue Jun 23 05:30:05 2009
New Revision: 787550

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

Added:
    incubator/wink/contrib/ibm-jaxrs/resources/
    incubator/wink/contrib/ibm-jaxrs/resources/META-INF/
    incubator/wink/contrib/ibm-jaxrs/resources/META-INF/services/
    incubator/wink/contrib/ibm-jaxrs/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate
    incubator/wink/contrib/ibm-jaxrs/resources/README.txt
    incubator/wink/contrib/ibm-jaxrs/resources/commons-logging.properties
    incubator/wink/contrib/ibm-jaxrs/resources/dist/
    incubator/wink/contrib/ibm-jaxrs/resources/dist/buildWar.xml
    incubator/wink/contrib/ibm-jaxrs/resources/dist/installWar.py
    incubator/wink/contrib/ibm-jaxrs/resources/dist/template_web.xml
    incubator/wink/contrib/ibm-jaxrs/resources/docs/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/additional-reading.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/addresses.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/classpath-configured.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/create-project.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/debugging.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/deploying.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing-clients.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/devenv.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/gettingstarted.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/index.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/packaging.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/single-address.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/using-jaxb.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/install-websphere.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-debug-logtrace.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-debug-settings.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-enterpriseapplicationscollection.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-install-mapcontextroots.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-install-selectionoptions.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-prepareappinstall.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-preparebindings.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-startapp.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/book.css
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/footer.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/header.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/index.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/leveraging-ibmjaxrs.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/quickstart.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples-index.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/addressbook/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/addressbook/images/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/addressbook/images/client.png   (with props)
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/addressbook/index.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/contentnegotiation/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/contentnegotiation/index.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/guestbook/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/guestbook/index.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/providers/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/providers/index.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/xml/
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/samples/xml/index.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/testyourapp.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/whatisjaxrs.html
    incubator/wink/contrib/ibm-jaxrs/resources/docs/site/index.html
    incubator/wink/contrib/ibm-jaxrs/resources/eclipse/
    incubator/wink/contrib/ibm-jaxrs/resources/eclipse/eclipse-classpath
    incubator/wink/contrib/ibm-jaxrs/resources/eclipse/eclipse_code_format_apache.xml

Added: incubator/wink/contrib/ibm-jaxrs/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate Tue Jun 23 05:30:05 2009
@@ -0,0 +1 @@
+com.ibm.ws.jaxrs.ext.RuntimeDelegateImpl
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/README.txt
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/README.txt?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/README.txt (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/README.txt Tue Jun 23 05:30:05 2009
@@ -0,0 +1,48 @@
+(C) Copyright 2009 IBM Corporation.  All rights reserved.
+
+----------------------------------------------------------------------
+Welcome to the IBM JAX-RS runtime library.  This project provides 
+enablement for developing standards-based RESTful services using 
+JAX-RS, the Java API for RESTful Services.  JAX-RS was developed under 
+JSR-311 as par of the Java Community Process.
+
+http://jcp.org/en/jsr/detail?id=311
+
+Provided in this package is the runtime code, samples and 
+documentation to help you get started developing your own RESTful 
+services.
+
+----------------------------------------------------------------------
+Requirements:
+
+- Java 6 
+
+- Apache Ant 1.6 and above
+
+
+----------------------------------------------------------------------
+Binaries:
+
+ibmjaxrs-{version}.jar     - Contains the runtime implementation code 
+
+ibmjaxrs-{version}-api.jar - Contains the available user interfaces, 
+                             including both JAX-RS defined APIs and 
+                             additional SPIs.
+
+Directory Structure:
+
+docs      - A collection of documents about JAX-RS in general and
+            how to create JAX-RS-based services.
+
+lib       - Prerequisite libraries needed to by the JAX-RS runtime.
+
+resources - Utilities for packaging and deploying JAX-RS applications
+            in certain environments.
+
+samples   - A collection of samples demonstrating some of the 
+            functionality available in JAX-RS.
+
+----------------------------------------------------------------------
+Java and all Java-based trademarks are trademarks of Sun Microsystems, 
+Inc. in the United States, other countries, or both.
+

Added: incubator/wink/contrib/ibm-jaxrs/resources/commons-logging.properties
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/commons-logging.properties?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/commons-logging.properties (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/commons-logging.properties Tue Jun 23 05:30:05 2009
@@ -0,0 +1,2 @@
+# Enable the simple log based logging
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/dist/buildWar.xml
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/dist/buildWar.xml?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/dist/buildWar.xml (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/dist/buildWar.xml Tue Jun 23 05:30:05 2009
@@ -0,0 +1,133 @@
+<!-- This is a template file that can be run by users wishing to
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you 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 a built project into a deployable WAR that utilizes
+	the IBM JAX-RS runtime..  -->
+<project default="buildDeployableWAR">
+	
+	<!-- The value of this property should be the path to a directory
+		containing the build outputs of your project. -->
+	<property name="build.dir" value="!!replace with correct value!!" />
+	
+	<!-- The value of this property is the path that will be used to
+		store the generated web.xml for your application. This directory
+		will be removed by the build file.-->
+	<property name="tmp.dd.dir" value="ibmjaxrs_tmp_dd_output" />
+	
+	<!-- The value of this property points to the location of the generated
+		web.xml. It should not be changed -->
+	<property name="webxml.path" value="${tmp.dd.dir}/web.xml" />
+	
+	<!-- This points to the location of the IBM JAX-RS distributables. -->
+	<property name="ibm.jaxrs.home" value="!!replace with correct value!!" />
+	
+	<!-- The value of this property is the application-provided javax.ws.rs.core.Application subclass. -->
+	<property name="application.class" value="!!replace with correct value!!" />
+	
+	<!-- The value of this property will be the name of the created WAR. -->
+	<property name="war.name" value="!!replace with correct value!!" />
+	
+	<!-- Name of the context root the WAR will be deployed with in WAS. Only needed for 'installToWAS' target -->
+	<property name="context.root" value="!!replace with correct value!!" />
+
+	<!-- Path of WAS profile the WAR will be installed under. Only needed for 'installToWAS' target -->
+	<property name="profile.root" value="!!replace with correct value!!" />
+
+	<!-- Name of the script to invoke wsadmin on Unix OS. The value of this property should not be changed. -->
+	<property name="wsadmin.exec.unix" value="wsadmin.sh" />
+
+	<!-- Name of the script to invoke wsadmin on Windows OS. The value of this property should not be changed. -->
+	<property name="wsadmin.exec.windows" value="wsadmin.bat" />
+	
+	<available file="${profile.root}/bin/wsadmin.bat" property="windows.os" />
+
+	<available file="${profile.root}/bin/wsadmin.sh" property="unix.os" />
+	
+	<!-- Get the current directory name.  This is needed to label
+	     the sample WAR, JAR, etc.  -->
+	<basename property="archiveName" file="${basedir}"/>
+	
+	
+	<target name="buildDeployableWAR" depends="createWebXML, packageWar, clean"/>
+	
+	<target name="installToWAS" depends="installToWASUnix, installToWASWindows" />
+
+	<target name="installToWASUnix" depends="buildDeployableWAR" if="unix.os">
+   	   <exec executable="${profile.root}/bin/${wsadmin.exec.unix}">
+	      <arg value="-connType" />
+	      <arg value="NONE" />
+	      <arg value="-f" />
+	      <arg value="installWAR.py" />
+	      <arg value="${war.name}" />
+	      <arg value="${context.root}" />
+           </exec>
+    </target>
+
+    <target name="installToWASWindows" depends="buildDeployableWAR" if="windows.os">
+   	   <exec executable="${profile.root}/bin/${wsadmin.exec.windows}">
+	      <arg value="-connType" />
+	      <arg value="NONE" />
+	      <arg value="-f" />
+	      <arg value="installWAR.py" />
+	      <arg value="${war.name}" />
+	      <arg value="${context.root}" />
+           </exec>
+    </target>
+	
+	
+	<target name="packageWar">
+		<war destfile="${war.name}" webxml="${webxml.path}">
+			<classes dir="${build.dir}"/>
+			<lib dir="${ibm.jaxrs.home}">
+			    <include name="*.jar" />
+			</lib>
+			<lib dir="${ibm.jaxrs.home}/lib">
+				<include name="*.jar" />
+				<exclude name="junit-4.4.jar" />
+				<exclude name="geronimo-servlet_3.0_spec-1.0-EA-20080711.180136-1.jar"/>
+				<exclude name="jetty-6.1.9.jar" />
+				<exclude name="jetty-util-6.1.9.jar" />
+			</lib>
+		</war>
+	</target>
+	
+	<target name="createWebXML">
+	        <java classname="com.ibm.ws.jaxrs.tools.WebBuilder"
+	           fork="true"
+	           failonerror="false"
+	           maxmemory="128m"
+	           >
+		         <arg value="${application.class}" />
+			 <arg value="${basedir}" />
+			 <arg value="${ibm.jaxrs.home}" />
+			 <classpath>
+			     <fileset dir="${ibm.jaxrs.home}">
+	         	        <include name="**/*.jar"/>
+			     </fileset>
+	         </classpath>
+		 </java>
+	</target>
+
+	<target name="clean">
+	         <delete dir="${tmp.dd.dir}" />
+    </target>
+       	
+</project>

Added: incubator/wink/contrib/ibm-jaxrs/resources/dist/installWar.py
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/dist/installWar.py?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/dist/installWar.py (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/dist/installWar.py Tue Jun 23 05:30:05 2009
@@ -0,0 +1,12 @@
+import sys
+warName  =  sys.argv[0]
+contextRoot = sys.argv[1]
+appName = warName + '_app'
+
+apps = AdminApp.list();
+if apps.find(appName) >= 0 : 
+   print 'Uninstalling application ' + appName
+   AdminApp.uninstall(appName)
+
+AdminApp.install(warName, '[ -nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname ' + appName + ' -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn -noprocessEmbeddedConfig -filepermission .*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755 -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -MapWebModToVH [[' + warName + ' ' + warName + ',WEB-INF/web.xml default_host ]] -CtxRootForWebMod [[' + warName + ' ' + warName + ',WEB-INF/web.xml ' + contextRoot + ' ]]]' ) 
+AdminConfig.save()

Added: incubator/wink/contrib/ibm-jaxrs/resources/dist/template_web.xml
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/dist/template_web.xml?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/dist/template_web.xml (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/dist/template_web.xml Tue Jun 23 05:30:05 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you 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.
+  -->
+
+<!--
+  This program may be used, executed, copied, modified and distributed
+  without royalty for the purpose of developing, using, marketing, or distributing.
+-->
+<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+</web-app>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/additional-reading.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/additional-reading.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/additional-reading.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/additional-reading.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta name="copyright" content="IBM Corporation 2008">
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008">
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="book.css" type="text/css">
+<link rel="stylesheet" href="../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS</title>
+</head>
+<body>
+
+<!-- Header information -->
+<iframe src="header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"> <a href="header.html">If
+you are using a lower-level browser, then click here to go directly to
+included content.</a> </iframe>
+
+<h1>Additional Reading</h1>
+
+
+<h2>REST General</h2>
+
+<h2>REST Clients</h2>
+
+
+<!-- Footer information -->
+<iframe src="footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"> <a href="footer.html">If you are
+using a lower-level browser, then click here to go directly to included
+content.</a> </iframe>
+
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/addresses.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/addresses.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/addresses.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/classpath-configured.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/classpath-configured.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/classpath-configured.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/create-project.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/create-project.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/create-project.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/debugging.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/debugging.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/debugging.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/debugging.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">Troubleshooting a JAX-RS application</h2>
+
+
+<div>
+<p>When developing a JAX-RS application, it's often helpful to see
+what the runtime is doing if you run in to problems with your client or
+service. Here are a few tips for how to go about troubleshooting your
+application.</p>
+</div>
+
+<div class="section">
+<h3 class="sectiontitle">Enabling commons-logging</h3>
+<p>For this example, we'll work with a set of JAXB bean tha Include
+instructions for turning on logging in certain environments.
+</div>
+
+
+<div class="section">
+<h3 class="sectiontitle">Parameter values are null or not available</h3>
+<p>If you find that your method is being properly targeted, but that
+your parameter values are null, it could be that you have the wrong <b>type</b>
+of parameter specified. Let's take the example of a method defined as it
+is below.</p>
+
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>@GET
+@Path(value="/people/{id}")
+public Person getPerson(@QueryParam(value="id") String id) {
+	    
+    // look-up person info based on "id" param
+	    
+}</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+<p>If this operation is invoked with the URL: <font
+	class="displaycode">http://myhost/people/123</font> the parameter that
+is passed in for the String value will be null. This is because the
+parameter is defined in the method signature using the <font
+	class="displaycode">QueryParam</font> annotation instead of as a <font
+	class="displaycode">PathParam</font>. For that URL to work, the method
+should be defined as:</p>
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>@GET
+@Path(value="/people/{id}")
+public Person getPerson(@PathParam(value="id") String id) {
+
+    // look-up person info based on "id" param
+    
+}</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+<p>Or, another option is to change the invocation URL to use the
+HTTP query string parameter like: <font class="displaycode">http://myhost/people?id=123</font></p>
+
+<p>Another pattern that could be causing your parameters to be null
+is how they are defined in the parameter annotation. You might have
+accidentally included "{" and "}" around your parameter id. This would
+result in the runtime not being able to match the parameter value with
+the id you have specified.</p>
+
+<font class="red"><b>Bad:</b></font><br />
+<br />
+<font class="code">@PathParam(value="{id}")</font><br />
+<br />
+
+<font class="green"><b>Good:</b></font><br />
+<br />
+<font class="code">@PathParam(value="id")</font><br />
+<br />
+</div>
+
+
+<div class="section">
+<h3 class="sectiontitle">Implemented Provider interface but
+Provider does not work</h3>
+<p>Sometimes you've implemented a provider interface but the
+provider does not seem to work. Be sure to add the
+javax.ws.rs.ext.Provider annotation to the provider class and add the
+provider class to your javax.ws.rs.core.Application class methods.</p>
+</div>
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you are
+using a very old browser. Click here to go directly to included content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/deploying.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/deploying.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/deploying.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/deploying.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,205 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">Deploying a JAX-RS application</h2>
+<div>
+<p>Applications utilizing the IBM JAX-RS runtime can be deployed
+into any web container. The following steps walk through the deployment
+process.</p>
+</div>
+
+
+
+<div class="section">
+<h3 class="sectiontitle">Building the <font class="code-inline">Application</font>
+sub-class</h3>
+
+<p>Before you can package your JAX-RS application, you have to
+identify which classes will represent the root resources available in
+your RESTful service. Root resources are the ones that will be
+accessible at the root level of your application. In other words, they
+are the resources that will appear just below the context root. For our
+<a href="developing.html">AddressBook</a> sample, there is only one root
+resource, <font class="code-inline">"/address"</font>.</p>
+
+<p>Once you have identified your root resources, they need to be
+surfaced to the runtime via the <font class="code-inline">javax.ws.rs.core.Application</font>
+configuration mechanism. JAX-RS defines this class as a means for
+aggregating the JAX-RS related artifacts that exist in an application.
+Classes included in the Application configuration will be treated as
+root-level resources in the JAX-RS service. As defined by the
+specification, this is the only <em>portable</em> means of configuring a
+JAX-RS application.</p>
+
+<p>To create the config class, create a new class in your
+environment that extends <font class="code-inline">javax.ws.rs.core.Application</font>.
+This subclass will provide a set of root resources and providers (if any
+exist) to the runtime. The code sample below demonstrates a sample
+Application class. This code is based on the AddressBook sample that was
+developed <a href="developing.html">here</a>.</p>
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>package com.test;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.core.Application;
+
+public class AddressBookApplication extends Application {
+
+    public Set&lt;Class&lt;?&gt;&gt; getClasses() {
+        Set&lt;Class&lt;?&gt;&gt; classes = new HashSet&lt;Class&lt;?&gt;&gt;();
+        classes.add(AddressBook.class);
+        return classes;
+    }
+    
+}</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+<br />
+
+</div>
+
+<div class="section">
+<h3 class="sectiontitle">Packaging the application for web
+container deployment</h3>
+
+<p>JAX-RS applications can be deployed in a JavaEE 5 web container
+as a Web Archive Module(WAR). There are two ways to package applicatons
+for use in a web container environment. You can package the application
+<b>using the provided ant script</b> or package the application <b>manually</b>.
+Although we recommend using the automated build script, we understand
+that is not possible in all circumstances.</p>
+
+</div>
+
+
+<div class="section">
+<h3 class="sectiontitle">Packaging using the build script</h3>
+
+<p>Instructions for using the provided build script can be found <a
+	href="packaging.html">here</a></p>
+</div>
+
+<div class="section">
+<h3 class="sectiontitle">Packaging manually</h3>
+
+<p>The steps below describe what is needed to package the WAR module
+manually.
+<ol>
+	<li>Construct a Web Archive Module(WAR) that contains
+	user-supplied JAX-RS resources along with the libraries provided in the
+	IBM JAX-RS distribution. The libraries should be packaged in the
+	WEB-INF/lib directory of the WAR, and the JAX-RS resource classes
+	should be packaged in the WEB-INF/classes directory.<br />
+	</li>
+
+
+	<li>Configure the web.xml of the WAR to provide the
+	javax.ws.rs.core.Application subclass that is contained within the user
+	application (this will be automatically produced when using the
+	supplied build.xml): <br />
+	<br />
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>&lt;servlet&gt;
+	&lt;servlet-name&gt;JAX-RS Servlet&lt;/servlet-name&gt;
+	&lt;servlet-class&gt;com.ibm.ws.jaxrs.web.RESTServlet&lt;/servlet-class&gt;
+	&lt;init-params&gt;
+		&lt;param-name&gt;javax.ws.rs.Application&lt;/param-name&gt;
+		&lt;param-value&gt;com.test.AddressBookApplication&lt;/param-value&gt;
+	&lt;/init-params&gt;
+&lt;/servlet&gt;
+&lt;servlet-mapping&gt;
+	&lt;servlet-name&gt;JAX-RS Servlet&lt;/servlet-name&gt;
+	&lt;url-pattern&gt;/*&lt;/url-pattern&gt;
+&lt;/servlet-mapping&gt;</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+	<br />
+	</li>
+
+	<li>
+	<p>Deploy the configured WAR into a web container. The root level
+	JAX-RS resources should be available at URL patterns of the form:</p>
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>http://&lt;host&gt;:&lt;port&gt;/&lt;context_root&gt;/(@Path.value)</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+
+	<p>Consider the following resource:</p>
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>@Path(value = "/addresses")
+public class AddressBook {
+ 
+ ...
+
+}</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+
+	<p>If this were deployed in a WAR whose context root was <font
+		class="code-inline">"/rest"</font>, the URL to the resource would be:</p>
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>http://&lt;host&gt;:&lt;port&gt;/rest/addresses</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+	</li>
+
+</ol>
+</div>
+
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you are
+using a very old browser. Click here to go directly to included content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing-clients.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing-clients.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing-clients.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing-clients.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,225 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">Developing clients for JAX-RS resources</h2>
+<div>
+
+<p>Now that you have developed your JAX-RS resource and deployed it
+to the server. JAX-RS does not provide a client API itself, but several
+other options exist. For example, you could develop a browser based
+client using something as simple as HTML forms or an AJAX client using
+the <a href="http://dojotoolkit.org/">Dojo Toolkit</a>. Yet another
+option is using the Apache HTTP client API.</p>
+
+<p>The instructions below describe how to develop a client using the
+Apache HTTP client API. These instuctions are based on the sample
+created in the developing JAX-RS resources instructions. Adjust the
+contents below based on your resource if it is different from the one in
+the example.</p>
+</div>
+
+<ol>
+	<li><b>Configure the client development environment</b>
+	<p>Just as was required for developing the JAX-RS resource, a
+	development environment is required to compile the client. Follow the
+	same steps you used to create the server development environment with a
+	few caveats.
+	<ul>
+		<li>You can use the previous Eclipse project that you had created
+		or you can create a new one specifically for the client.<br />
+		</li>
+
+		<li>The client JARs will come from the "lib" directory in the IBM
+		JAX-RS distribution. Instead of the API jar, the following JARs are
+		required for the classpath:<br />
+		<br />
+		commons-httpclient-3.1.jar<br />
+		commons-codec-1.3.jar<br />
+		commons-logging-1.1.1.jar<br />
+		</li>
+	</ul>
+	<br />
+	</li>
+	<li><b>Create a simple client</b>
+	<p>Now you're ready to create the actual client code. With the
+	HttpClient API, this is somewhat trivial. The example below shows how
+	to create a client for an HTTP GET request. Notice that the HttpClient
+	object instance is used to invoke different instances of request method
+	objects. There are objects for each of the HTTP request method types.</p>
+
+	<p>The example client shown invokes an HTTP GET request similar to
+	what was demonstrated using a browser in the <a
+		href="developing.html#test">developing resources</a> instructions.</p>
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>package com.test;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.GetMethod;
+
+public class AddressBookClient {
+    
+    public static void main(String[] args) throws Exception {
+        AddressBookClient client = new AddressBookClient();
+        client.getAddresses();
+    }
+    
+    public void getAddresses() throws Exception {
+        // Build the request objects
+        System.out.println("[get - building request]");
+        HttpClient client = new HttpClient();
+        GetMethod get = new GetMethod("http://localhost:9080/rest/addresses");
+        
+        // Invoke the request
+        int responseCode = client.executeMethod(get);
+        System.out.println("[get - response code] " + responseCode);
+        
+        // Process the response
+        byte[] bytes = get.getResponseBody();
+        String response = new String(bytes);
+        System.out.println("[get - response content] " + response.toString());
+    }
+
+}</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+
+	<p>Once you are able to compile and run the client, the output
+	should look like this:</p>
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>[get - building request]
+[get - response code] 200
+[get - response content] {Michael, Ron, Jane, Sam}</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+
+	<br />
+	</li>
+
+	<li><b>Adding request method types</b>
+	<p>Before you can create a client for a POST request, you'll need
+	to add a resource method that support POST on your resource. If you
+	already have one, then skip to the next step. If you are using the
+	resource that was defined in the developing resources sample, then
+	you'll need to add a method similar to the one below to your resource.
+	Once you've updated the resource redeploy it using the same steps as
+	before.</p>
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>@POST
+@Consumes(value="text/plain")
+public void addName(String name) {
+    list.add(name.trim());
+}</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+
+	<p>With the resource updated, now you'll need to add the client
+	code to invoke the new service. Let's add it in another method so that
+	we can keep the get and post requests separate. The code to add another
+	name looks like this:</p>
+
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>public void postAddress() throws Exception {
+    System.out.println("[post - building request]");
+    HttpClient client = new HttpClient();
+    PostMethod post = new PostMethod("http://localhost:9080/rest/addresses");
+       
+    String name = "Barry";
+    RequestEntity request = new StringRequestEntity(name, "text/plain", null);
+    post.setRequestEntity(request);
+        
+    int responseCode = client.executeMethod(post);
+    System.out.println("[post - response code] " + responseCode);
+}</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+
+	<p>Along with the method for sending the POST request, update the <font
+		class="code-inline">main</font> method to make the call to the POST
+	and then call the GET to check that the name was added to the list.</p>
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>public static void main(String[] args) throws Exception {
+	AddressBookClient client = new AddressBookClient();
+	client.getAddresses();
+        
+	client.postAddress();
+	client.getAddresses();
+}</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+
+	<p>After compiling the new code, you should see the following
+	output when you run it.</p>
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>[post - building request]
+[post - response code] 204
+[get - building request]
+[get - response code] 200
+[get - response content] {Michael, Ron, Jane, Sam, Barry}</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+	</li>
+</ol>
+<p>By building this example, you should be able to see what is
+generally required to build a RESTful client for a JAX-RS resource. The
+HttpClient API allows for much more complexity than is show here so it
+can be adapted to support the more advanced scenarios that your
+application might require.</p>
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you are
+using a very old browser. Click here to go directly to included content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/developing.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,202 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">Developing JAX-RS resources</h2>
+<div>
+<p>JAX-RS resources are developed by using annotations defined
+within the JAX-RS specification. This enables fast development time and
+eliminates the need for excessive deployment descriptor information. The
+following steps will outline the process for developing a simple JAX-RS
+Address Book resource.</p>
+</div>
+<ol>
+	<li id="configure"><b>Configure a development environment</b><br />
+	<br />
+	The <a href="devenv.html">previous step</a> includes instructions for
+	configuring a development environment for writing JAX-RS resources.</li>
+
+	<li id="develop"><b>Develop the resource class</b><br />
+	<br />
+	Develop a sample, such as the Address Book resource using JAX-RS
+	annotations. For example, the following sample is developed to provide
+	access to a list of names in an address book. There is a resource
+	method for access the entire list and a resource method for accessing
+	individual names. <br />
+	<br />
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>package com.test;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+
+/**
+ * A sample resource that provides access to 
+ * server configuration properties
+ */
+@Path(value="/addresses")
+public class AddressBook {
+    
+    private static String[] list = new String[] {
+        "Michael",
+        "Ron",
+        "Jane",
+        "Sam"
+    };
+    
+    @GET
+    @Produces(value="text/plain")
+    public String getList() {
+        StringBuffer buffer = new StringBuffer();
+        buffer.append("{");
+        for (int i = 0; i &lt; list.length; ++i) {
+            if (i != 0) 
+                buffer.append(", ");
+            buffer.append(list[i]);
+        }
+        buffer.append("}");
+        
+        return buffer.toString();
+    }
+
+    @GET
+    @Produces(value="text/plain")
+    @Path(value="{id}")
+    public String getPropety(@PathParam("id") int id) {
+        if (id &gt; -1 &amp;&amp; id &lt; list.length -1) {
+            return list[id];
+        }
+        else {
+            return "Name Not Found";
+        }
+    }
+
+}</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+	<br />
+	In this example, we are specifying the <font class="code-inline">AddressBook</font>
+	class as a <b>root resource</b> by placing the <font
+		class="code-inline">@Path</font> annotation on the class. In addition,
+	the 'getAddresses' method is mapped to an HTTP GET request by use of
+	the <font class="code-inline">@GET</font> annotation. The <font
+		class="code-inline">@Produces</font> annotation specifies that a MIME
+	type of <font class="code-inline">"text/plain"</font> will be produced
+	by invoking this method.<br />
+	<br />
+
+	The 'getAddress' method is mapped to an HTTP GET request as well, but
+	also has a parameter that can be included in the request URL. This
+	parameter will be mapping to the "id" input parameter on the method
+	signature and can be used by the resource during invocation.<br />
+	<br />
+
+	The table below summarizes the resources available from this sample:<br />
+	<br />
+
+	<div class="tableborder">
+	<table cellspacing="0" cellpadding="4" frame="border" border="1"
+		rules="all">
+		<caption>Table 1. URI Overview</caption>
+		<thead>
+
+			<tr>
+				<th>HTTP Method</th>
+				<th>URI</th>
+				<th>Input Type(s)</th>
+				<th>Output Type(s)</th>
+				<th>Note(s)</th>
+			</tr>
+		</thead>
+		<tbody>
+			<tr>
+				<td>GET</td>
+				<td>/addresses</td>
+				<td>n/a</td>
+				<td>text/plain</td>
+				<td>n/a</td>
+			</tr>
+			<tr>
+				<td>GET</td>
+				<td>/addresses/{id}</td>
+				<td>n/a</td>
+				<td>text/plain</td>
+				<td>n/a</td>
+			</tr>
+		</tbody>
+	</table>
+	</div>
+	</li>
+
+
+	<li id="deploy"><b>Deploy the resource</b><br />
+	<br />
+	<a href="deploying.html">Deploy</a> your JAX-RS resource to the web
+	container of your choice. This will make it available for testing.</li>
+
+	<li id="test"><b>Test the resource</b><br />
+	<br />
+	<p>Once deployed, the easiest way to test this resource is through
+	a browser. The fact that the resource methods are based on an HTTP GET
+	enables this. If the resource methods were another type of request,
+	like a POST, it would require a client that could submit data to the
+	resource. (Note: an HTML form is capable of handling this)</p>
+	<br />
+	<br />
+
+	<p>First try accessing the full list of names available. The URL
+	you use will be different in that the host will be whatever host your
+	web container is running on and the context root will be whatever you
+	specified during your application deployment. For example, if installed
+	the application with a context root of "/rest", then your URL could
+	look like: <font class="code-inline">http://localhost:9080/rest/addresses</font>.
+	The return content should look like the image below.</p>
+
+	<img src="addresses.png" /><br />
+	<br />
+
+	<p>Now try targeting the second resource method available. The URI
+	for this resource is a slight extension of the previous one. Include
+	one of the available indexes to retrieve that entry from the list. This
+	would be similar to providing a unique identifier to a record in a
+	database that represents the resource you are looking for. The URL for
+	a specific resource would be <font class="code-inline">http://localhost:9080/rest/addresses/2</font>
+	where the number at the end is the unique identifier. The returned
+	content should match the image below.</p>
+
+	<img src="single-address.png" /></li>
+
+</ol>
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you are
+using a very old browser. Click here to go directly to included content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/devenv.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/devenv.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/devenv.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/devenv.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">Developing JAX-RS resources</h2>
+<div>
+<p>JAX-RS resources are developed by using annotations defined
+within the JAX-RS specification. This enables fast development time and
+eliminates the need for excessive deployment descriptor information. The
+following steps will outline the process for developing a simple JAX-RS
+Address Book resource.</p>
+</div>
+
+
+
+<div class="section">
+<h3 class="sectiontitle">Configuring a Development Environment</h3>
+
+<p>To start developing JAX-RS applications, you first need to
+configure a development environment that will allow you to compile your
+resources with the JAX-RS API classes.</p>
+<ul>
+	<li><a href="#usingEclipse">Using Eclipse</a></li>
+	<li><a href="#usingCommandLine">Using the command line
+	environment</a></li>
+</ul>
+</div>
+
+<!-- BEGIN: Developing using Eclipse -->
+
+<div class="section">
+<h3 class="sectiontitle" id="usingEclipse">Using Eclipse</h3>
+
+<p>The Eclipse Project provides a very useful tool for developing
+Java applications. You can use the Eclipse tools to develop JAX-RS
+resources using the instructions below.</p>
+
+<ol>
+
+	<li><b>Create a new Java project</b><br />
+	<p>Start by creating a new space for the JAX-RS application. From
+	the menu bar at the top, go to File &gt; New &gt; Project... Select
+	"Java Project" and click "Next". On the next panel, type in your
+	desired project name and click "Finish".</p>
+	<img src="create-project.png" /><br />
+	</li>
+	<li><b>Configure the classpath</b><br />
+	<p>To compile JAX-RS applications, you will need the appropriate
+	JARs in your classpath containing the JAX-RS annotation and interface
+	classes. You can import these into your new Java project by selecting
+	your project in the Package Explorer panel and right clicking. Click on
+	the "properties" option which should be toward the bottom of the list.<br />
+	<br />
+
+	From the properties panel, click on "Java Build Path" on the left. This
+	should bring up a set of tabs on the right-hand side. Select the
+	"Libraries" tab at the top. Click on the "Add External Jars..." button
+	and browse to the directory that contains your IBM JAX-RS distribution.
+	Find the ibmjaxrs-{version}-api.jar, select it and click "Ok".<br />
+	<br />
+
+	At this point, the ibmjaxrs jar should show up in your project. You're
+	now ready to begin developing JAX-RS resources using this
+	configuration.</p>
+	<img src="classpath-configured.png" /></li>
+
+</ol>
+</div>
+<!-- END: Developing using Eclipse -->
+
+<br />
+<br />
+<br />
+
+<!-- BEGIN: Developing using command line -->
+
+<div class="section">
+<h3 class="sectiontitle" id="usingCommandLine">Using the command line environment</h3>
+
+<ol>
+
+</ol>
+</div>
+<!-- END: Developing using command line -->
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you are
+using a very old browser. Click here to go directly to included content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/gettingstarted.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/gettingstarted.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/gettingstarted.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/gettingstarted.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Guestbook Sample</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">Overview of the JAX-RS Developer's Guide</h2>
+
+<p>The JAX-RS Developer's Guide will present an introduction to the
+JAX-RS runtime provided by IBM. The guide will cover how to develop,
+package, and deploy your JAX-RS applications using the IBM JAX-RS
+runtime.</p>
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you
+are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/index.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/index.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/index.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/index.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 align="center">Developer's Guide</h2>
+<div>
+<ul>
+	<li><a href="gettingstarted.html">Overview of the JAX-RS
+	Developer's Guide</a></li>
+	<li>Developing a JAX-RS application
+	<ul>
+		<li><a href="devenv.html">Configuring a Development
+		Environment</a></li>
+		<li><a href="developing.html">Developing JAX-RS resources</a></li>
+		<li><a href="developing-clients.html">Developing JAX-RS
+		clients</a></li>
+		<li><a href="using-jaxb.html">Using JAXB with JAX-RS</a></li>
+	</ul>
+	</li>
+	<li><a href="deploying.html">Deploying a JAX-RS application</a>
+	<ul>
+		<li><a href="debugging.html">Troubleshooting a JAX-RS
+		application</a></li>
+	</ul>
+	</li>
+	<li>Web Container Specific Help
+	<ul>
+		<li><a href="webcontainers/install-websphere.html">WebSphere</a></li>
+	</ul>
+	</li>
+	<li>Samples
+	<ul>
+		<li><a href="../samples/addressbook/index.html">Address Book
+		Sample</a></li>
+		<li><a href="../samples/contentnegotiation/index.html">Content
+		Negotiation Scoreboard Sample</a></li>
+		<li><a href="../samples/guestbook/index.html">Guestbook
+		Sample</a> - Exceptions and other Errors</li>
+		<li><a href="../samples/providers/index.html">Provider Sample</a>
+		- Creating MessageBodyReaders/Writers</li>
+		<li><a href="../samples/xml/index.html">XML Phonebook Service</a>
+		- XML via Generic Entity Types</li>
+	</ul>
+	</li>
+</ul>
+</div>
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you are
+using a very old browser. Click here to go directly to included content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/packaging.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/packaging.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/packaging.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/packaging.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,209 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">Packaging a JAX-RS application</h2>
+
+<div>
+
+<p>Applications utilizing the IBM JAX-RS runtime can be packaged
+using a provided ant script. The <font class="code-inline">buildWar.xml</font>
+is included in the distribution under the <font class="code-inline">${IBM_JAXRS_HOME}/resources</font>
+directory. Optionally, if using a WebSphere Application Server
+stand-alone configuration, the ant script can be invoked to include
+installing the packaged WAR.</p>
+
+
+<ol>
+	<li>
+	<p>Copy the <font class="code-inline">buildWar.xml</font> provided
+	in the IBM JAX-RS distributables to the root level of the project.</p>
+
+	<p><b>If you are using Eclipse</b>, you can import the build script
+	using by right-clicking on the project folder and going to <em>"Import..."</em>.
+	On the next panel select <em>"File System"</em> as the input type and
+	click <em>"Next"</em>. Browse to the <font class="code-inline">resources</font>
+	directory within your IBM JAX-RS distribution folder and import the <font
+		class="code-inline">buildWar.xml</font> file.
+	<p><b>If you are using a command-line environment</b>, you can
+	simply copy the <font class="code-inline"> buildWar.xml</font> from the
+	distribution folder to the root of your development folder.</p>
+	<br />
+	</li>
+	<li>
+	<p>Edit the project specific properties in the build script.</p>
+
+	<p>There are four properties that must be modified in the <font
+		class="code-inline">buildWar.xml</font></p>
+
+	<div class="tableborder">
+	<table cellspacing="0" cellpadding="4" frame="border" border="1"
+		rules="all">
+		<caption>Table 1. Properties Overview</caption>
+		<thead>
+			<tr>
+				<th>Property</th>
+				<th>Description</th>
+			</tr>
+		</thead>
+		<tbody>
+			<tr>
+				<td><b><font class="code-inline">build.dir</font></b></td>
+
+				<td>The directory that contains the compiled .class files for
+				the project. These .class files will be put into the <font
+					class="code-inline">WEB-INF/classes</font> directory of the created
+				WAR.</td>
+			</tr>
+			<tr>
+				<td><b><font class="code-inline">ibm.jaxrs.home</font></b></td>
+
+				<td>The directory that contains the expanded IBM JAX-RS
+				distributables.</td>
+			</tr>
+			<tr>
+				<td><b><font class="code-inline">application.class</font></b></td>
+
+				<td>The javax.ws.rs.core.Application subclass that is provided
+				by the application.</td>
+			</tr>
+			<tr>
+				<td><b><font class="code-inline">war.name</font></b></td>
+
+				<td>The name of the WAR that is created.</td>
+			</tr>
+		</tbody>
+	</table>
+	</div>
+
+	<br />
+	<p>When utilizing the script to install to a WebSphere Application
+	Server configuration, there are two additional properties that must be
+	supplied</p>
+
+	<div class="tableborder">
+	<table cellspacing="0" cellpadding="4" frame="border" border="1"
+		rules="all">
+		<caption>Table 2. Properties Overview</caption>
+		<thead>
+			<tr>
+				<th>Property</th>
+				<th>Description</th>
+			</tr>
+		</thead>
+		<tbody>
+			<tr>
+				<td><b><font class="code-inline">profile.root</font></b></td>
+
+				<td>The path to the WebSphere Application Server profile for
+				your configuration.</td>
+			</tr>
+			<tr>
+				<td><b><font class="code-inline">context.root</font></b></td>
+
+				<td>The context root to which the WAR will be deployed.</td>
+			</tr>
+		</tbody>
+	</table>
+	</div>
+
+	<p>Consider the case where the project has the following property
+	values:
+	<ul>
+		<li><b>build.dir</b> - <font class="code-inline">/usr/projects/jaxrs/build/classes</font></li>
+		<li><b>ibm.jaxrs.home</b> - <font class="code-inline">/usr/downloads/IBM/jaxrs</font></li>
+		<li><b>application.class</b> - <font class="code-inline">sample.jaxrs.Application</font></li>
+		<li><b>war.name</b> - <font class="code-inline">jaxrsSample.war</font></li>
+		<li><b>context.root</b> - <font class="code-inline">/rest</font></li>
+		<li><b>profile.root</b> - <font class="code-inline">/opt/user/was/profiles/AppSrv01</font></li>
+	</ul>
+
+	<p>The <font class="code-inline">build.xml</font> would be updated
+	as follows:</p>
+
+	<table border="0" width="100%">
+		<tbody>
+			<tr>
+				<td class="code-outline">
+				<div><pre><code>
+&lt;!-- The value of this property should be the path to a directory
+	containing the build outputs of your project. --&gt;
+&lt;property name="build.dir" value="/usr/projects/jaxrs/build/classes" /&gt;
+
+&lt;!-- The value of this property is the path that will be used to
+	store the generated web.xml for your application. This directory
+	will be removed by the build file.--&gt;
+&lt;property name="tmp.dd.dir" value="ibmjaxrs_tmp_dd_output" /&gt;
+
+&lt;!-- The value of this property points to the location of the generated
+	web.xml. It should not be changed --&gt;
+&lt;property name="webxml.path" value="${tmp.dd.dir}/web.xml" /&gt;
+
+&lt;!-- This points to the location of the IBM JAX-RS distributables. --&gt;
+&lt;property name="ibm.jaxrs.home" value="/usr/downloads/IBM/jaxrs" /&gt;
+
+&lt;!-- The value of this property is the application-provided javax.ws.rs.core.Application subclass. --&gt;
+&lt;property name="application.class" value="sample.jaxrs.Application" /&gt;
+
+&lt;!-- The value of this property will be the name of the created WAR. --&gt;
+&lt;property name="war.name" value="jaxrsSample.war" /&gt;
+
+&lt;!-- Name of the context root the WAR will be deployed with in WAS. Only needed for 'installToWAS' target --&gt;
+&lt;property name="context.root" value="/rest" /&gt;
+
+&lt;!-- Path of WAS profile the WAR will be installed under. Only needed for 'installToWAS' target --&gt;
+&lt;property name="profile.root" value="/opt/user/was/profiles/AppSrv01" /&gt;
+</code></pre></div>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+	<br />
+	<br />
+	</li>
+
+	<li>
+	<p>If you do not intend to install the packaged WAR to a WebSphere
+	Application Server configuration, simply run the <font
+		class="code-inline">"ant"</font> command after the preceding
+	properties have been set. A WAR with the supplied name will be created
+	in the same directory of the buildWar.xml file.</p>
+
+	<p>If you do intend to install the packaged WAR to a WebSphere
+	Application Server configuration, run the <font class="code-inline">"ant
+	installToWAS"</font> command after the preceding properties have been set. A
+	WAR with the supplied name will be created in the same directory of the
+	buildWar.xml file, and the WAR will be installed to the indicated
+	WebSphere Application Server configuration.</p>
+
+	<p>The script can also be run from within Eclipse by right-clicking
+	on the <font class="code-inline">buildWar.xml</font> and click <em>Run
+	As &gt; Ant Build</em>.
+	</li>
+</ol>
+
+</div>
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you are
+using a very old browser. Click here to go directly to included content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/single-address.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/single-address.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/single-address.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/using-jaxb.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/using-jaxb.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/using-jaxb.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/using-jaxb.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,353 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../book.css" type="text/css">
+<link rel="stylesheet" href="../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">Using JAXB</h2>
+
+
+<div class="section">
+<h3 class="sectiontitle">Creating JAXB beans</h3>
+<p>For this example, we'll work with a set of JAXB bean that are
+generated from an existing XML Schema document. The example below
+provides a sample schema document for a stock quote service. There is
+only one xml element defined, which includes the stock price and the
+company name and ticker symbol.</p>
+
+<p>To generate a set of JAXB beans from this schema, you will need
+to run the "xjc" tool that is provided with the JDK (available in Java
+6). Passing the schema document as a parameter, this should generate a
+set of java classes including one for the Stock and one of the
+StockQuote types.</p>
+
+<p>Once you have generated the beans, you're ready to move on to the
+next step; building the stock quote JAX-RS resource.</p>
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:ns="http://ibm.com/sample/jaxrs"
+	targetNamespace="http://ibm.com/sample/jaxrs"&gt;
+  
+    &lt;xsd:element name="stockQuote"&gt;
+       &lt;xsd:complexType&gt;
+         &lt;xsd:sequence&gt;
+           &lt;xsd:element name="stock" type="ns:Stock" /&gt;
+           &lt;xsd:element name="quote" type="xsd:int" /&gt;
+         &lt;/xsd:sequence&gt;
+       &lt;/xsd:complexType&gt;
+    &lt;/xsd:element&gt;
+    
+    &lt;xsd:complexType name="Stock"&gt;
+       &lt;xsd:sequence&gt;
+         &lt;xsd:element name="symbol" type="xsd:string" /&gt;
+         &lt;xsd:element name="price" type="xsd:float" /&gt;
+         &lt;xsd:element name="companyName" type="xsd:string" /&gt;
+       &lt;/xsd:sequence&gt;
+    &lt;/xsd:complexType&gt;
+&lt;/xsd:schema&gt;</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+<br />
+</div>
+
+<div class="section">
+<h3 class="sectiontitle">Adding JAXB beans to resources</h3>
+
+<p>JAXB beans can be included either as parameters to the request or
+the return type of a methods. For the purposes of simplicity, let's
+start by returning a JAXB from a resource method. The code below is an
+example of how to implement the StockQuoteService resource method. The
+method will return the StockQuote bean that corresponds to the stock
+symbol in the path parameter.</p>
+
+<p>This resource can be packaged and deployed as a JAX-RS resource
+using the instructions found <a href="deploying.html">here</a>.</p>
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>package com.ibm.sample.jaxrs;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Path(value="/stocks")
+public class StockQuoteService {
+    
+    private static Map&lt;String , StockQuote&gt; stocks = new HashMap&lt;String
+	, StockQuote&gt;();
+    
+    static {
+        Stock s = new Stock();
+        s.setCompanyName("IBM");
+        s.setSymbol("IBM");
+        StockQuote quote = new StockQuote();
+        quote.setQuote(98.99);
+        quote.setStock(s);
+        stocks.put(s.getSymbol(), quote);
+        
+        s = new Stock();
+        s.setCompanyName("Yahoo!");
+        s.setSymbol("YHOO");
+        quote = new StockQuote();
+        quote.setQuote(23.18);
+        quote.setStock(s);
+        stocks.put(s.getSymbol(), quote);
+    }
+    
+    @GET
+    @Path(value="/{symbol}")
+    @Produces(value="application/xml")
+    public StockQuote getQuote(@PathParam(value="symbol") String symbol) {
+        System.out.println("[stockquote] - looking up quote for symbol " + symbol);
+        StockQuote quote = stocks.get(symbol);
+        System.out.println("[stockquote] - returning value: " + quote);
+        return quote;
+    }
+
+}</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+</div>
+
+<div class="section">
+<h3 class="sectiontitle">Creating a client</h3>
+
+<p>Once deployed, the newly created resource can be accessed from a
+browser using this URL:</p>
+
+<p class="code">http://&lt;hostname&gt;:&lt;port&gt;/&lt;context
+root&gt;/stocks/{stock symbol}</p>
+
+<p>For this example, we'll provide some concrete values to those
+variables. We'll use:</p>
+
+<p class="code">http://localhost:9080/stockquote/stocks/IBM</p>
+
+<p>However, it is more useful to access this resource from a more
+robust client. One way to do this is using the Apache Commons HTTP
+Client API. More information about how to write clients using this API
+can be found <a href="developing-clients.html">here</a>.</p>
+
+<p>The code sample below shows how to access this resource and
+retreive the information using JAXB. Notice that an InputStream is
+returned from the resource and the client passes that directly to the
+JAXB Umarshaller API. Based on the configuration provided, JAXB will
+return the appropriate object type.</p>
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>package com.ibm.sample.jaxrs;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.GetMethod;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.Unmarshaller;
+
+import java.io.InputStream;
+
+public class StockQuoteClient {
+    
+    private String url = "http://localhost:9080/stockquote/stocks/";
+    
+    private JAXBContext ctx;
+    
+    public static void main(String[] args) throws Exception {
+        StockQuoteClient client = new StockQuoteClient();
+        client.getQuote("IBM");        
+    }
+    
+    public void getQuote(String symbol) throws Exception {
+        HttpClient client = new HttpClient();
+        GetMethod get = new GetMethod(url + symbol);
+        
+        int responseCode = client.executeMethod(get);
+        System.out.println("[getquote] - response code: " + responseCode);
+        
+        JAXBContext ctx = JAXBContext.newInstance("com.ibm.sample.jaxrs");
+        Unmarshaller u = ctx.createUnmarshaller();
+        
+        InputStream is = get.getResponseBodyAsStream();
+        StockQuote quote = (StockQuote) u.unmarshal(is);
+        
+        if (quote != null) {
+            System.out.println("[getquote] - " + quote.getStock().getSymbol() 
+                + " = " + quote.getQuote());
+        }
+    }
+    
+}</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+</div>
+
+
+<div class="section">
+<h3 class="sectiontitle">Sending JAXB data from the client</h3>
+
+<p>Now that you know how to receive the JAXB data, try sending JAXB
+data to the server using the HTTP POST method. See if you can follow the
+code samples below to create a JAXB object instance and send the data
+using the Apache client so that a new stock symbol is added to the
+quotes database.</p>
+
+<p>To do this, the first thing you'll need is the actual resource
+method. Here's an example of what this would look like. Notice that this
+is a method with a void response and the JAXB parameter for the input.
+Try adding this to your existing StockQuoteService and redeploy the
+service in your environment.</p>
+
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>@POST
+@Consumes(value="application/xml")
+public void addQuote(StockQuote q) {
+    stocks.put(q.getStock().getSymbol(), q);
+}</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+<p>Now add a method to the client that will target the new resource
+method. Notice that instead of creating an Umarshaller to get the data
+out of the stream for JAXB, this time we're creating a Marshaller and
+putting the data into a stream. The contents of the stream are then put
+into a RequestEntity object which also requires that the HTTP
+Content-Type header be set. Invoking this method will send your data to
+the server and add a new stock type to the database.</p>
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>public int addQuote(String company, String symbol, double price) 
+  throws Exception {
+    ObjectFactory of = new ObjectFactory();
+    Stock s = of.createStock();
+        
+    s.setCompanyName(company);
+    s.setSymbol(symbol);
+        
+    StockQuote q = of.createStockQuote();
+    q.setQuote(price);
+    q.setStock(s);
+        
+    JAXBContext ctx = JAXBContext.newInstance("com.ibm.sample.jaxrs");
+    Marshaller m = ctx.createMarshaller();
+
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    m.marshal(q, baos);
+        
+    HttpClient client = new HttpClient();
+    PostMethod post = new PostMethod(url);
+        
+    RequestEntity request = new ByteArrayRequestEntity(baos.toByteArray(), 
+    	"application/xml; charset=utf-8");
+    post.setRequestEntity(request);
+                
+    int responseCode = client.executeMethod(post);
+    System.out.println("[addquote] - response code: " + responseCode);
+        
+    return responseCode;
+}</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+<p>The next step is to update the client code to call the new
+method. Here's a sample of how to to this. Once the addQuote method is
+called, you should be able to access the new resource via the getQuote
+method.</p>
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>public static void main(String[] args) throws Exception {
+    StockQuoteClient client = new StockQuoteClient();
+    client.getQuote("IBM");
+        
+    client.addQuote("Microsoft", "MSFT", 22.45);
+    client.getQuote("MSFT");
+}</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+<p>After making all of the updates, the output of the client should
+look like the following:</p>
+
+<table border="0" width="100%">
+	<tbody>
+		<tr>
+			<td class="code-outline">
+			<div><pre><code>[getquote] - response code: 200
+[getquote] - IBM = 98.99
+[addquote] - response code: 200
+[getquote] - response code: 200
+[getquote] - MSFT = 22.45</code></pre></div>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+</div>
+
+<div class="section">
+<h3 class="sectiontitle">Take the next step</h3>
+
+<p>Now see if you can take it one step further by adding a resource
+method that updates the stock price using the HTTP PUT method. Remember,
+you'll need to add a resource method annotated with @PUT along with new
+client code for invoking this method. The resource method signature
+should be similar to the addQuote signature, but this method will just
+updated the price of the stock. Good luck!</p>
+</div>
+
+<iframe src="../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../footer.html">Hmm, you are
+using a very old browser. Click here to go directly to included content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/install-websphere.html
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/install-websphere.html?rev=787550&view=auto
==============================================================================
--- incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/install-websphere.html (added)
+++ incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/install-websphere.html Tue Jun 23 05:30:05 2009
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="copyright" content="IBM Corporation 2008" />
+<meta name="DC.Rights.Owner" content="IBM Corporation 2008" />
+<!-- All rights reserved. Licensed Materials Property of IBM -->
+<!-- US Government Users Restricted Rights -->
+<!-- Use, duplication or disclosure restricted by -->
+<!-- GSA ADP Schedule Contract with IBM Corp. -->
+<link rel="stylesheet" href="../../book.css" type="text/css">
+<link rel="stylesheet" href="../../../siteonly/site.css" type="text/css">
+<title>IBM JAX-RS: Developer's Guide</title>
+</head>
+
+<body>
+<!-- Header information -->
+<iframe src="../../header.html" scrolling="no" frameborder="0"
+	style="width: 100%; height: 75px;"><a href="../../header.html">Hmm,
+you are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+
+<h2 class="topictitle1">WebSphere Application Server V7</h2>
+
+<p>The IBM JAX-RS runtime should run inside any recent web container
+with Java 6. This page has some pointers specifically for <a
+	href="http://www-01.ibm.com/software/webservers/appserv/was/">WebSphere
+Application Server V7</a>.</p>
+
+
+<div class="section">
+<h3 class="sectiontitle">Install a JAX-RS Application</h3>
+
+<p>Login to the administrative console. On a local install using
+default ports, this should be <a
+	href="http://localhost:9060/ibm/console">http://localhost:9060/ibm/console</a>.</p>
+
+<p>Once you're logged in, go to the Applications &gt; Enterprise
+Applications collection panel. Click the Install button.</p>
+
+<img src="was-console-enterpriseapplicationscollection.png" />
+
+<p>Select your application. Click Next.</p>
+
+<img src="was-console-prepareappinstall.png" />
+
+<p>Choose Fast Path Install and toggle the Generate Default
+Bindings. Click Next.</p>
+
+<img src="was-console-preparebindings.png" />
+
+<p>Change the Application Name if you want to. Click Next through
+the rest of the wizard.</p>
+
+<img src="was-console-install-selectionoptions.png" />
+
+<p>If you are asked for a Context Root for a web module, enter in a
+unique context root.</p>
+
+<img src="was-console-install-mapcontextroots.png" />
+
+<p>Finish the installation wizard and save your configuration.</p>
+
+<p>Navigate back to the Enterprise Applications collection panel and
+start your application.</p>
+
+<img src="was-console-startapp.png" />
+
+<p>You should now be able to use your application. If you had
+installed the Address Book server WAR sample and used "/rest" as your
+context root, you could go to <a
+	href="http://localhost:9080/rest/addresses">http://localhost:9080/rest/addresses</a>
+with your browser to see some of the raw service data.</p>
+</div>
+
+<div class="section">
+<h3 class="sectiontitle">Turning on Trace/Debug</h3>
+
+<p>You need to add <b>com.ibm.ws.jaxrs.*=all:
+org.apache.cxf.*=all</b> to your trace settings for the application server
+where your application is installed.</p>
+
+<p>To turn on trace, go to the Troubleshooting &gt; Logs and Trace
+page. Select the server where you have your application installed. Then,
+click the Change log detail levels link.</p>
+
+<img src="was-console-debug-logtrace.png" />
+
+<p>Click the Runtime tab and add the com.ibm.ws.jaxrs.*=all:
+org.apache.cxf.*=all trace setting to make the trace settings
+immediately become active. You can save the changes to the Configuration
+tab to make the trace changes permanent between server restarts. Click
+OK and save any configuration changes you make.</p>
+
+<img src="was-console-debug-settings.png" />
+
+<p>Trace should appear in your WebSphere profile logs directory. If
+you had installed WebSphere to c:\WebSphere\AppServer and are using
+AppSrv01 as your profile, the trace would appear in the
+c:\WebSphere\AppServer\profiles\AppSrv01\logs\server1\trace.log file.</p>
+</div>
+
+<iframe src="../../footer.html" scrolling="no" frameborder="0"
+	style="width: 100%;"><a href="../../footer.html">Hmm, you
+are using a very old browser. Click here to go directly to included
+content.</a></iframe>
+</body>
+</html>
\ No newline at end of file

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-debug-logtrace.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-debug-logtrace.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-debug-logtrace.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-debug-settings.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-debug-settings.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-debug-settings.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-enterpriseapplicationscollection.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-enterpriseapplicationscollection.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-enterpriseapplicationscollection.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-install-mapcontextroots.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-install-mapcontextroots.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-install-mapcontextroots.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-install-selectionoptions.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-install-selectionoptions.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-install-selectionoptions.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-prepareappinstall.png
URL: http://svn.apache.org/viewvc/incubator/wink/contrib/ibm-jaxrs/resources/docs/site/en/appdeveloperguide/webcontainers/was-console-prepareappinstall.png?rev=787550&view=auto
==============================================================================
Binary file - no diff available.



Mime
View raw message