You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by mm...@apache.org on 2005/02/04 05:56:15 UTC
svn commit: r151321 - in
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL: ./ WEB-INF/
WEB-INF/build-client-svn.xml WEB-INF/build-svn.xml WEB-INF/client-build.xml
WEB-INF/server-config.wsdd WEB-INF/web.xml WEB-INF/wsdl/
WEB-INF/wsdl/fromWSDL.wsdl happyaxis.jsp index.html
Author: mmerz
Date: Thu Feb 3 20:56:12 2005
New Revision: 151321
URL: http://svn.apache.org/viewcvs?view=rev&rev=151321
Log:
Fixed fromWSDL sample.
Added:
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-client-svn.xml
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-svn.xml
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/client-build.xml
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/server-config.wsdd
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/web.xml
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/wsdl/
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/wsdl/fromWSDL.wsdl
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/happyaxis.jsp
incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/index.html
Added: incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-client-svn.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-client-svn.xml?view=auto&rev=151321
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-client-svn.xml (added)
+++ incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-client-svn.xml Thu Feb 3 20:56:12 2005
@@ -0,0 +1,100 @@
+<?xml version="1.0" ?>
+
+<!--
+ Copyright 2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Header:$
+ -->
+
+<project name="wsm-addressbook-fromWSDL Client" basedir="." default="test">
+
+ <import file="../../../beehive-imports.xml" />
+
+ <property
+ name="wsdl.url"
+ value="http://localhost:8080/fromWSDLWS/web/Service.jws?wsdl" />
+
+ <property name="webapp.dir" value=".." />
+ <property name="web.inf.dir" value="${webapp.dir}/WEB-INF" />
+ <property name="lib.dir" value="${web.inf.dir}/lib" />
+ <property name="log.dir" value="${web.inf.dir}/logs" />
+ <property name="build.dir" value="${web.inf.dir}/build-client" />
+ <property name="gen.dir" value="${build.dir}/gen" />
+ <property name="classes.dir" value="${build.dir}/classes" />
+
+ <path id="jars">
+ <fileset dir="${lib.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="test" depends="dirs,compile">
+ <junit
+ printsummary="yes"
+ haltonfailure="yes"
+ showoutput="yes">
+ <classpath>
+ <pathelement location= "${classes.dir}"/>
+ <path refid="jars"/>
+ </classpath>
+ <formatter type="plain"/>
+ <batchtest fork="yes" todir="${log.dir}">
+ <fileset dir="${classes.dir}">
+ <include name="**/*Test*.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="compile" depends="genClient">
+ <javac
+ srcdir="${gen.dir}"
+ destdir="${classes.dir}"
+ classpathref="jars"
+ failonerror="true"
+ source="1.4" />
+ </target>
+
+ <target name="genClient" depends="dirs">
+ <deploy-wsm webappDir="${webapp.dir}" />
+ <taskdef
+ name="wsdl2java"
+ classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask"
+ loaderref="axis">
+ <classpath refid="jars"/>
+ </taskdef>
+ <wsdl2java
+ verbose="true"
+ helpergen="true"
+ url="${wsdl.url}"
+ output="${gen.dir}"
+ testcase="yes">
+ </wsdl2java>
+ </target>
+
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${log.dir}" />
+ <delete dir="${lib.dir}" />
+ </target>
+
+ <target name="dirs">
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${gen.dir}" />
+ <mkdir dir="${classes.dir}" />
+ <mkdir dir="${log.dir}" />
+ </target>
+
+</project>
\ No newline at end of file
Added: incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-svn.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-svn.xml?view=auto&rev=151321
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-svn.xml (added)
+++ incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/build-svn.xml Thu Feb 3 20:56:12 2005
@@ -0,0 +1,181 @@
+<?xml version="1.0" ?>
+
+<!--
+ Copyright 2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Header:$
+ -->
+
+<project name="wsm-addressbook-fromWSDL" default="build" basedir=".">
+
+ <import file="../../../beehive-imports.xml" />
+
+ <property name="service.name" value="fromWSDL" />
+
+ <taskdef
+ name="apt"
+ classname="org.apache.beehive.controls.runtime.generator.AptTask"
+ classpath="lib/controls.jar" onerror="report" />
+
+ <property name="webapp.dir" location=".." />
+ <property name="web.inf.dir" location="${webapp.dir}/WEB-INF" />
+ <property name="attachments.dir" location="${web.inf.dir}/attachments" />
+ <property name="lib.dir" location="${web.inf.dir}/lib" />
+ <property name="build.dir" location="${web.inf.dir}/build" />
+ <property name="gen.dir" location="${build.dir}/gen" />
+ <property name="aptgen.dir" location="${build.dir}/apt-gen" />
+ <property name="classes.dir" location="${build.dir}/classes" />
+ <property name="sourcegen.dir" value="${gen.dir}/src"/>
+ <property name="webservice.jar" location="${lib.dir}/${service.name}WS.jar" />
+
+ <property name="webservice.war" location="${service.name}WS.war" />
+ <property name="schema.dir" value="wsdl" />
+ <property name="wsdl.location" location="${schema.dir}/${service.name}.wsdl" />
+
+ <condition property="isJDK15">
+ <equals arg1="${ant.java.version}" arg2="1.5" />
+ </condition>
+
+ <path id="jars">
+ <fileset dir="${lib.dir}" >
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+
+ <!-- ========================================= -->
+ <!-- deploy.war - build deployable artifact -->
+ <!-- ========================================= -->
+
+ <target name="deploy.war">
+ <jar jarfile="${to.dir}/${service.name}WS.war">
+ <fileset dir="${webapp.dir}">
+ <exclude name="${web.inf}/src/**" />
+ <exclude name="${web.inf}/.tmpbeansrc/**" />
+ </fileset>
+ </jar>
+ </target>
+
+
+ <!-- ========================================= -->
+ <!-- build - build all binaries -->
+ <!-- ========================================= -->
+
+ <target name="build" depends="dirs">
+ <deploy-wsm webappDir="${webapp.dir}" />
+ <antcall target="source-gen" />
+ <antcall target="generate-xmlbean-datatypes" />
+ <!-- build-webapp webappDir="${webapp.dir}" / -->
+ <jar jarfile="${webservice.jar}">
+ <fileset dir="${classes.dir}" />
+ </jar>
+ </target>
+
+
+ <!-- ========================================= -->
+ <!-- clean - remove binary files -->
+ <!-- ========================================= -->
+
+ <target name="clean">
+ <delete dir="${attachments.dir}" />
+ <delete dir="${lib.dir}" />
+ <delete dir="${build.dir}" />
+ <delete dir="${gen.dir}" />
+ <delete dir="${aptgen.dir}" />
+ <delete file="velocity.log" />
+ <clean-webapp webappDir="${webapp.dir}" />
+ </target>
+
+
+ <!-- ========================================= -->
+ <!-- source-gen - generate source from wsdl -->
+ <!-- ========================================= -->
+
+ <target name="source-gen" depends="generate-xmlbean-datatypes" >
+
+ <taskdef
+ name="wsdl2AJava"
+ classname="org.apache.beehive.wsm.axis.ant.WSDL2AJavaTask">
+ <classpath>
+ <path refid="jars"/>
+ </classpath>
+ </taskdef>
+
+ <!-- apt
+ srcdir="${sourcegen.dir}"
+ destdir="${classes.dir}"
+ gendir="${aptgen.dir}"
+ compileByExtension="true"
+ classpathref="jars"
+ srcExtensions="*.java,*.jcx,*.jcs,*.jws" / -->
+
+ <wsdl2AJava outputdir="${sourcegen.dir}" wsdlfile="${wsdl.location}">
+ <classpath>
+ <path refid="jars"/>
+ <path location="${classes.dir}" />
+ </classpath>
+ </wsdl2AJava>
+
+ <apt
+ srcdir="${sourcegen.dir}"
+ destdir="${classes.dir}"
+ gendir="${aptgen.dir}"
+ compileByExtension="true"
+ srcExtensions="*.java,*.jcx,*.jcs,*.jws">
+ <classpath>
+ <path refid="jars"/>
+ <path location="${classes.dir}" />
+ </classpath>
+ </apt>
+ </target>
+
+ <!-- ========================================= -->
+ <!-- generate-xmlbean-datatypes - -->
+ <!-- ========================================= -->
+
+ <target name="generate-xmlbean-datatypes">
+ <taskdef
+ name="xmlbeanbuild"
+ classname="org.apache.xmlbeans.impl.tool.XMLBean">
+ <classpath>
+ <path refid="jars" />
+ </classpath>
+ </taskdef>
+ <mkdir dir="${classes.dir}" />
+ <mkdir dir="${sourcegen.dir}" />
+ <xmlbeanbuild
+ schema="${schema.dir}"
+ srcgendir="${sourcegen.dir}"
+ classgendir="${classes.dir}"
+ failonerror="true" >
+ <classpath>
+ <path refid="jars" />
+ </classpath>
+ </xmlbeanbuild>
+ </target>
+
+
+ <!-- ========================================= -->
+ <!-- dirs - create dirs required for compile -->
+ <!-- ========================================= -->
+
+ <target name="dirs">
+ <mkdir dir="${aptgen.dir}" />
+ <mkdir dir="${attachments.dir}" />
+ <mkdir dir="${classes.dir}" />
+ <mkdir dir="${gen.dir}" />
+ </target>
+
+</project>
\ No newline at end of file
Added: incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/client-build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/client-build.xml?view=auto&rev=151321
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/client-build.xml (added)
+++ incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/client-build.xml Thu Feb 3 20:56:12 2005
@@ -0,0 +1,67 @@
+<?xml version="1.0" ?>
+
+<project name="AddressBookClient" basedir="." default="all">
+
+ <property name="AddressBook.wsdl.url"
+ value="http://localhost:8080/fromWSDLWS/web/Service.jws?wsdl" />
+
+
+ <path id="jars">
+ <fileset dir="lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <taskdef name="wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask"
+ loaderref="axis" >
+ <classpath refid="jars"/>
+ </taskdef>
+
+
+ <target name="clean">
+ <delete dir="build" />
+ </target>
+
+ <target name="dirs">
+ <mkdir dir="build" />
+ <mkdir dir="build/generated" />
+ <mkdir dir="build/classes" />
+
+ </target>
+ <target name="all" depends="genClient, compile, test"/>
+
+ <target name="genClient" depends="dirs">
+ <wsdl2java url="${AddressBook.wsdl.url}"
+ output="build/generated"
+ testcase="yes">
+ </wsdl2java>
+
+ </target>
+
+ <target name="compile" depends="genClient">
+ <javac srcdir="build/generated"
+ destdir="build/classes"
+ classpathref="jars"
+ failonerror="true"
+ source="1.4"
+ />
+ </target>
+
+ <target name="test" depends="compile">
+ <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
+ <classpath>
+ <pathelement location= "build/classes"/>
+ <path refid="jars"/>
+ </classpath>
+
+
+ <batchtest fork="yes" todir=".">
+ <fileset dir="build/classes">
+ <include name="**/*Test*.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+
+ </target>
+
+</project>
Added: incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/server-config.wsdd
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/server-config.wsdd?view=auto&rev=151321
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/server-config.wsdd (added)
+++ incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/server-config.wsdd Thu Feb 3 20:56:12 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+ <globalConfiguration>
+ <parameter name="adminPassword" value="admin"/>
+ <parameter name="disablePrettyXML" value="true"/>
+ <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
+ <parameter name="sendXsiTypes" value="true"/>
+ <parameter name="sendXMLDeclaration" value="true"/>
+ <requestFlow>
+ <handler type="java:org.apache.beehive.wsm.axis.AnnotatedWebServiceDeploymentHandler">
+ <parameter name="scope" value="session"/>
+ </handler>
+ <handler type="java:org.apache.axis.handlers.JWSHandler">
+ <parameter name="scope" value="session"/>
+ </handler>
+ </requestFlow>
+ </globalConfiguration>
+ <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
+ <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
+ <service name="AdminService" provider="java:MSG">
+ <parameter name="allowedMethods" value="AdminService"/>
+ <parameter name="enableRemoteAdmin" value="false"/>
+ <parameter name="className" value="org.apache.axis.utils.Admin"/>
+ <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+ </service>
+ <service name="Version" provider="java:RPC">
+ <parameter name="allowedMethods" value="getVersion"/>
+ <parameter name="className" value="org.apache.axis.Version"/>
+ </service>
+ <transport name="http">
+ <requestFlow>
+ <handler type="URLMapper"/>
+ <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+ </requestFlow>
+ <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
+ <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
+ <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
+ </transport>
+ <transport name="local">
+ <responseFlow>
+ <handler type="LocalResponder"/>
+ </responseFlow>
+ </transport>
+</deployment>
+
Added: incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/web.xml?view=auto&rev=151321
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/web.xml (added)
+++ incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/web.xml Thu Feb 3 20:56:12 2005
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
+Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+ <display-name>Apache-Axis</display-name>
+
+ <filter>
+ <filter-name>ControlFilter</filter-name>
+ <filter-class>org.apache.beehive.controls.runtime.servlet.ControlFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>ControlFilter</filter-name>
+ <url-pattern>*.jws</url-pattern>
+ </filter-mapping>
+
+ <listener>
+ <listener-class>org.apache.axis.transport.http.AxisHTTPSessionListener</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>AxisServlet</servlet-name>
+ <display-name>Apache-Axis Servlet</display-name>
+ <servlet-class>
+ org.apache.axis.transport.http.AxisServlet
+ </servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>AdminServlet</servlet-name>
+ <display-name>Axis Admin Servlet</display-name>
+ <servlet-class>
+ org.apache.axis.transport.http.AdminServlet
+ </servlet-class>
+ <load-on-startup>100</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>SOAPMonitorService</servlet-name>
+ <display-name>SOAPMonitorService</display-name>
+ <servlet-class>
+ org.apache.axis.monitor.SOAPMonitorService
+ </servlet-class>
+ <init-param>
+ <param-name>SOAPMonitorPort</param-name>
+ <param-value>5001</param-value>
+ </init-param>
+ <load-on-startup>100</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/servlet/AxisServlet</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>*.jws</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>SOAPMonitorService</servlet-name>
+ <url-pattern>/SOAPMonitor</url-pattern>
+ </servlet-mapping>
+
+ <!-- uncomment this if you want the admin servlet -->
+ <!--
+ <servlet-mapping>
+ <servlet-name>AdminServlet</servlet-name>
+ <url-pattern>/servlet/AdminServlet</url-pattern>
+ </servlet-mapping>
+ -->
+
+ <session-config>
+ <!-- Default to 5 minute session timeouts -->
+ <session-timeout>5</session-timeout>
+ </session-config>
+
+ <!-- currently the W3C havent settled on a media type for WSDL;
+ http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
+ for now we go with the basic 'it's XML' response -->
+ <mime-mapping>
+ <extension>wsdl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+
+ <mime-mapping>
+ <extension>xsd</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <welcome-file-list id="WelcomeFileList">
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>index.jws</welcome-file>
+ </welcome-file-list>
+
+</web-app>
Added: incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/wsdl/fromWSDL.wsdl
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/wsdl/fromWSDL.wsdl?view=auto&rev=151321
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/wsdl/fromWSDL.wsdl (added)
+++ incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/WEB-INF/wsdl/fromWSDL.wsdl Thu Feb 3 20:56:12 2005
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://beehive.apache.org/addressBook2" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://beehive.apache.org/addressBook2" xmlns:intf="http://beehive.apache.org/addressBook2" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<!--WSDL created by Apache Axis version: 1.2RC2
+Built on Nov 16, 2004 (12:19:44 EST)-->
+ <wsdl:types>
+ <schema elementFormDefault="qualified" targetNamespace="http://beehive.apache.org/addressBook2" xmlns="http://www.w3.org/2001/XMLSchema">
+ <element name="addEntry">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ <element name="address" type="impl:Address"/>
+ </sequence>
+ </complexType>
+ </element>
+ <complexType name="Phone">
+ <sequence>
+ <element name="areaCode" type="xsd:int"/>
+ <element name="exchange" nillable="true" type="xsd:string"/>
+ <element name="number" nillable="true" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ <complexType name="StateType">
+ <sequence>
+ <element name="state" nillable="true" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ <complexType name="Address">
+ <sequence>
+ <element name="city" nillable="true" type="xsd:string"/>
+ <element name="phoneNumber" nillable="true" type="impl:Phone"/>
+ <element name="state" nillable="true" type="impl:StateType"/>
+ <element name="streetName" nillable="true" type="xsd:string"/>
+ <element name="streetNum" type="xsd:int"/>
+ <element name="zip" type="xsd:int"/>
+ </sequence>
+ </complexType>
+ <element name="addEntryResponse">
+ <complexType/>
+ </element>
+ <element name="getAddressFromNames">
+ <complexType>
+ <sequence>
+ <element maxOccurs="unbounded" name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getAddressFromNamesResponse">
+ <complexType>
+ <sequence>
+ <element maxOccurs="unbounded" name="result" type="impl:Address"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="oneWayWithParam">
+ <complexType>
+ <sequence>
+ <element name="firstParam" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="oneWayWithNoParam">
+ <complexType/>
+ </element>
+ <element name="simpleNoParamMethod">
+ <complexType/>
+ </element>
+ <element name="simpleNoParamMethodResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getAddressFromName">
+ <complexType>
+ <sequence>
+ <element name="name" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="getAddressFromNameResponse">
+ <complexType>
+ <sequence>
+ <element name="result" type="impl:Address"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="getAddressFromNameRequest">
+
+ <wsdl:part element="impl:getAddressFromName" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="oneWayWithNoParamRequest">
+
+ <wsdl:part element="impl:oneWayWithNoParam" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="addEntryRequest">
+
+ <wsdl:part element="impl:addEntry" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="oneWayWithParamRequest">
+
+ <wsdl:part element="impl:oneWayWithParam" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="getAddressFromNameResponse">
+
+ <wsdl:part element="impl:getAddressFromNameResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="simpleNoParamMethodRequest">
+
+ <wsdl:part element="impl:simpleNoParamMethod" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="simpleNoParamMethodResponse">
+
+ <wsdl:part element="impl:simpleNoParamMethodResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="getAddressFromNamesRequest">
+
+ <wsdl:part element="impl:getAddressFromNames" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="addEntryResponse">
+
+ <wsdl:part element="impl:addEntryResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="getAddressFromNamesResponse">
+
+ <wsdl:part element="impl:getAddressFromNamesResponse" name="parameters"/>
+
+ </wsdl:message>
+
+ <wsdl:portType name="Service">
+
+ <wsdl:operation name="addEntry">
+
+ <wsdl:input message="impl:addEntryRequest" name="addEntryRequest"/>
+
+ <wsdl:output message="impl:addEntryResponse" name="addEntryResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="getAddressFromNames">
+
+ <wsdl:input message="impl:getAddressFromNamesRequest" name="getAddressFromNamesRequest"/>
+
+ <wsdl:output message="impl:getAddressFromNamesResponse" name="getAddressFromNamesResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="oneWayWithParam">
+
+ <wsdl:input message="impl:oneWayWithParamRequest" name="oneWayWithParamRequest"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="oneWayWithNoParam">
+
+ <wsdl:input message="impl:oneWayWithNoParamRequest" name="oneWayWithNoParamRequest"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="simpleNoParamMethod">
+
+ <wsdl:input message="impl:simpleNoParamMethodRequest" name="simpleNoParamMethodRequest"/>
+
+ <wsdl:output message="impl:simpleNoParamMethodResponse" name="simpleNoParamMethodResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="getAddressFromName">
+
+ <wsdl:input message="impl:getAddressFromNameRequest" name="getAddressFromNameRequest"/>
+
+ <wsdl:output message="impl:getAddressFromNameResponse" name="getAddressFromNameResponse"/>
+
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="ServiceSoapBinding" type="impl:Service">
+
+ <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="addEntry">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="addEntryRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="addEntryResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="getAddressFromNames">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="getAddressFromNamesRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="getAddressFromNamesResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="oneWayWithParam">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="oneWayWithParamRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="oneWayWithNoParam">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="oneWayWithNoParamRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="simpleNoParamMethod">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="simpleNoParamMethodRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="simpleNoParamMethodResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="getAddressFromName">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="getAddressFromNameRequest">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="getAddressFromNameResponse">
+
+ <wsdlsoap:body use="literal"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="ServiceService">
+
+ <wsdl:port binding="impl:ServiceSoapBinding" name="Service">
+
+ <wsdlsoap:address location="http://localhost:8080/EnhancedAddressBook/web/Service.jws"/>
+
+ </wsdl:port>
+
+ </wsdl:service>
+
+</wsdl:definitions>
Added: incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/happyaxis.jsp
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/happyaxis.jsp?view=auto&rev=151321
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/happyaxis.jsp (added)
+++ incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/happyaxis.jsp Thu Feb 3 20:56:12 2005
@@ -0,0 +1,488 @@
+<html>
+<%@ page import="java.io.InputStream,
+ java.io.IOException,
+ javax.xml.parsers.SAXParser,
+ javax.xml.parsers.SAXParserFactory"
+ session="false" %>
+ <%
+ /*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+%>
+<head>
+<title>Axis Happiness Page</title>
+</head>
+<body bgcolor='#ffffff'>
+<%!
+
+ /*
+ * Happiness tests for axis. These look at the classpath and warn if things
+ * are missing. Normally addng this much code in a JSP page is mad
+ * but here we want to validate JSP compilation too, and have a drop-in
+ * page for easy re-use
+ * @author Steve 'configuration problems' Loughran
+ * @author dims
+ * @author Brian Ewins
+ */
+
+
+ /**
+ * Get a string providing install information.
+ * TODO: make this platform aware and give specific hints
+ */
+ public String getInstallHints(HttpServletRequest request) {
+
+ String hint=
+ "<B><I>Note:</I></B> On Tomcat 4.x and Java1.4, you may need to put libraries that contain "
+ +"java.* or javax.* packages into CATALINA_HOME/common/lib"
+ +"<br>jaxrpc.jar and saaj.jar are two such libraries.";
+ return hint;
+ }
+
+ /**
+ * test for a class existing
+ * @param classname
+ * @return class iff present
+ */
+ Class classExists(String classname) {
+ try {
+ return Class.forName(classname);
+ } catch (ClassNotFoundException e) {
+ return null;
+ }
+ }
+
+ /**
+ * test for resource on the classpath
+ * @param resource
+ * @return true iff present
+ */
+ boolean resourceExists(String resource) {
+ boolean found;
+ InputStream instream=this.getClass().getResourceAsStream(resource);
+ found=instream!=null;
+ if(instream!=null) {
+ try {
+ instream.close();
+ } catch (IOException e) {
+ }
+ }
+ return found;
+ }
+
+ /**
+ * probe for a class, print an error message is missing
+ * @param out stream to print stuff
+ * @param category text like "warning" or "error"
+ * @param classname class to look for
+ * @param jarFile where this class comes from
+ * @param errorText extra error text
+ * @param homePage where to d/l the library
+ * @return the number of missing classes
+ * @throws IOException
+ */
+ int probeClass(JspWriter out,
+ String category,
+ String classname,
+ String jarFile,
+ String description,
+ String errorText,
+ String homePage) throws IOException {
+ try {
+ Class clazz = classExists(classname);
+ if(clazz == null) {
+ String url="";
+ if(homePage!=null) {
+ url="<br> See <a href="+homePage+">"+homePage+"</a>";
+ }
+ out.write("<p>"+category+": could not find class "+classname
+ +" from file <b>"+jarFile
+ +"</b><br> "+errorText
+ +url
+ +"<p>");
+ return 1;
+ } else {
+ String location = getLocation(out, clazz);
+ if(location == null) {
+ out.write("Found "+ description + " (" + classname + ")<br>");
+ }
+ else {
+ out.write("Found "+ description + " (" + classname + ") at " + location + "<br>");
+ }
+ return 0;
+ }
+ } catch(NoClassDefFoundError ncdfe) {
+ String url="";
+ if(homePage!=null) {
+ url="<br> See <a href="+homePage+">"+homePage+"</a>";
+ }
+ out.write("<p>"+category+": could not find a dependency"
+ +" of class "+classname
+ +" from file <b>"+jarFile
+ +"</b><br> "+errorText
+ +url
+ +"<br>The root cause was: "+ncdfe.getMessage()
+ +"<br>This can happen e.g. if "+classname+" is in"
+ +" the 'common' classpath, but a dependency like "
+ +" activation.jar is only in the webapp classpath."
+ +"<p>");
+ return 1;
+ }
+ }
+
+ /**
+ * get the location of a class
+ * @param out
+ * @param clazz
+ * @return the jar file or path where a class was found
+ */
+
+ String getLocation(JspWriter out,
+ Class clazz) {
+ try {
+ java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
+ String location = url.toString();
+ if(location.startsWith("jar")) {
+ url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
+ location = url.toString();
+ }
+
+ if(location.startsWith("file")) {
+ java.io.File file = new java.io.File(url.getFile());
+ return file.getAbsolutePath();
+ } else {
+ return url.toString();
+ }
+ } catch (Throwable t){
+ }
+ return "an unknown location";
+ }
+
+ /**
+ * a class we need if a class is missing
+ * @param out stream to print stuff
+ * @param classname class to look for
+ * @param jarFile where this class comes from
+ * @param errorText extra error text
+ * @param homePage where to d/l the library
+ * @throws IOException when needed
+ * @return the number of missing libraries (0 or 1)
+ */
+ int needClass(JspWriter out,
+ String classname,
+ String jarFile,
+ String description,
+ String errorText,
+ String homePage) throws IOException {
+ return probeClass(out,
+ "<b>Error</b>",
+ classname,
+ jarFile,
+ description,
+ errorText,
+ homePage);
+ }
+
+ /**
+ * print warning message if a class is missing
+ * @param out stream to print stuff
+ * @param classname class to look for
+ * @param jarFile where this class comes from
+ * @param errorText extra error text
+ * @param homePage where to d/l the library
+ * @throws IOException when needed
+ * @return the number of missing libraries (0 or 1)
+ */
+ int wantClass(JspWriter out,
+ String classname,
+ String jarFile,
+ String description,
+ String errorText,
+ String homePage) throws IOException {
+ return probeClass(out,
+ "<b>Warning</b>",
+ classname,
+ jarFile,
+ description,
+ errorText,
+ homePage);
+ }
+
+ /**
+ * probe for a resource existing,
+ * @param out
+ * @param resource
+ * @param errorText
+ * @throws Exception
+ */
+ int wantResource(JspWriter out,
+ String resource,
+ String errorText) throws Exception {
+ if(!resourceExists(resource)) {
+ out.write("<p><b>Warning</b>: could not find resource "+resource
+ +"<br>"
+ +errorText);
+ return 0;
+ } else {
+ out.write("found "+resource+"<br>");
+ return 1;
+ }
+ }
+
+
+ /**
+ * get servlet version string
+ *
+ */
+
+ public String getServletVersion() {
+ ServletContext context=getServletConfig().getServletContext();
+ int major = context.getMajorVersion();
+ int minor = context.getMinorVersion();
+ return Integer.toString(major) + '.' + Integer.toString(minor);
+ }
+
+
+
+ /**
+ * what parser are we using.
+ * @return the classname of the parser
+ */
+ private String getParserName() {
+ SAXParser saxParser = getSAXParser();
+ if (saxParser == null) {
+ return "Could not create an XML Parser";
+ }
+
+ // check to what is in the classname
+ String saxParserName = saxParser.getClass().getName();
+ return saxParserName;
+ }
+
+ /**
+ * Create a JAXP SAXParser
+ * @return parser or null for trouble
+ */
+ private SAXParser getSAXParser() {
+ SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
+ if (saxParserFactory == null) {
+ return null;
+ }
+ SAXParser saxParser = null;
+ try {
+ saxParser = saxParserFactory.newSAXParser();
+ } catch (Exception e) {
+ }
+ return saxParser;
+ }
+
+ /**
+ * get the location of the parser
+ * @return path or null for trouble in tracking it down
+ */
+
+ private String getParserLocation(JspWriter out) {
+ SAXParser saxParser = getSAXParser();
+ if (saxParser == null) {
+ return null;
+ }
+ String location = getLocation(out,saxParser.getClass());
+ return location;
+ }
+ %>
+<html><head><title>Axis Happiness Page</title></head>
+<body>
+<h1>Axis Happiness Page</h1>
+<h2>Examining webapp configuration</h2>
+
+<p>
+<h3>Needed Components</h3>
+<%
+ int needed=0,wanted=0;
+
+ /**
+ * the essentials, without these Axis is not going to work
+ */
+ needed=needClass(out, "javax.xml.soap.SOAPMessage",
+ "saaj.jar",
+ "SAAJ API",
+ "Axis will not work",
+ "http://xml.apache.org/axis/");
+
+ needed+=needClass(out, "javax.xml.rpc.Service",
+ "jaxrpc.jar",
+ "JAX-RPC API",
+ "Axis will not work",
+ "http://xml.apache.org/axis/");
+
+ needed+=needClass(out, "org.apache.axis.transport.http.AxisServlet",
+ "axis.jar",
+ "Apache-Axis",
+ "Axis will not work",
+ "http://xml.apache.org/axis/");
+
+ needed+=needClass(out, "org.apache.commons.discovery.Resource",
+ "commons-discovery.jar",
+ "Jakarta-Commons Discovery",
+ "Axis will not work",
+ "http://jakarta.apache.org/commons/discovery.html");
+
+ needed+=needClass(out, "org.apache.commons.logging.Log",
+ "commons-logging.jar",
+ "Jakarta-Commons Logging",
+ "Axis will not work",
+ "http://jakarta.apache.org/commons/logging.html");
+
+ needed+=needClass(out, "org.apache.log4j.Layout",
+ "log4j-1.2.8.jar",
+ "Log4j",
+ "Axis may not work",
+ "http://jakarta.apache.org/log4j");
+
+ //should we search for a javax.wsdl file here, to hint that it needs
+ //to go into an approved directory? because we dont seem to need to do that.
+ needed+=needClass(out, "com.ibm.wsdl.factory.WSDLFactoryImpl",
+ "wsdl4j.jar",
+ "IBM's WSDL4Java",
+ "Axis will not work",
+ null);
+
+ needed+=needClass(out, "javax.xml.parsers.SAXParserFactory",
+ "xerces.jar",
+ "JAXP implementation",
+ "Axis will not work",
+ "http://xml.apache.org/xerces-j/");
+
+ needed+=needClass(out,"javax.activation.DataHandler",
+ "activation.jar",
+ "Activation API",
+ "Axis will not work",
+ "http://java.sun.com/products/javabeans/glasgow/jaf.html");
+%>
+<h3>Optional Components</h3>
+<%
+ /*
+ * now the stuff we can live without
+ */
+ wanted+=wantClass(out,"javax.mail.internet.MimeMessage",
+ "mail.jar",
+ "Mail API",
+ "Attachments will not work",
+ "http://java.sun.com/products/javamail/");
+
+ wanted+=wantClass(out,"org.apache.xml.security.Init",
+ "xmlsec.jar",
+ "XML Security API",
+ "XML Security is not supported",
+ "http://xml.apache.org/security/");
+
+ wanted += wantClass(out, "javax.net.ssl.SSLSocketFactory",
+ "jsse.jar or java1.4+ runtime",
+ "Java Secure Socket Extension",
+ "https is not supported",
+ "http://java.sun.com/products/jsse/");
+ /*
+ * resources on the classpath path
+ */
+ /* broken; this is a file, not a resource
+ wantResource(out,"/server-config.wsdd",
+ "There is no server configuration file;"
+ +"run AdminClient to create one");
+ */
+ /* add more libraries here */
+
+ out.write("<h3>");
+ //is everythng we need here
+ if(needed==0) {
+ //yes, be happy
+ out.write("<i>The core axis libraries are present. </i>");
+ } else {
+ //no, be very unhappy
+ response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ out.write("<i>"
+ +needed
+ +" core axis librar"
+ +(needed==1?"y is":"ies are")
+ +" missing</i>");
+ }
+ //now look at wanted stuff
+ if(wanted>0) {
+ out.write("<i>"
+ +wanted
+ +" optional axis librar"
+ +(wanted==1?"y is":"ies are")
+ +" missing</i>");
+ } else {
+ out.write("The optional components are present.");
+ }
+ out.write("</h3>");
+ //hint if anything is missing
+ if(needed>0 || wanted>0 ) {
+ out.write(getInstallHints(request));
+ }
+
+ %>
+ <p>
+ <B><I>Note:</I></B> Even if everything this page probes for is present, there is no guarantee your
+ web service will work, because there are many configuration options that we do
+ not check for. These tests are <i>necessary</i> but not <i>sufficient</i>
+ <hr>
+
+ <h2>Examining Application Server</h2>
+ <%
+ String servletVersion=getServletVersion();
+ String xmlParser=getParserName();
+ String xmlParserLocation = getParserLocation(out);
+
+ %>
+ <table>
+ <tr><td>Servlet version</td><td><%= servletVersion %></td></tr>
+ <tr><td>XML Parser</td><td><%= xmlParser %></td></tr>
+ <tr><td>XML ParserLocation</td><td><%= xmlParserLocation %></td></tr>
+ </table>
+<% if(xmlParser.indexOf("crimson")>=0) { %>
+ <p>
+ <b>We recommend <a href="http://xml.apache.org/xerces2-j/">Xerces 2</a>
+ over Crimson as the XML parser for Axis</b>
+ </p>
+<% } %>
+
+ <h2>Examining System Properties</h2>
+<%
+ /**
+ * Dump the system properties
+ */
+ java.util.Enumeration e=null;
+ try {
+ e= System.getProperties().propertyNames();
+ } catch (SecurityException se) {
+ }
+ if(e!=null) {
+ out.write("<pre>");
+ for (;e.hasMoreElements();) {
+ String key = (String) e.nextElement();
+ out.write(key + "=" + System.getProperty(key)+"\n");
+ }
+ out.write("</pre><p>");
+ } else {
+ out.write("System properties are not accessible<p>");
+ }
+%>
+ <hr>
+ Platform: <%= getServletConfig().getServletContext().getServerInfo() %>
+</body>
+</html>
+
+
Added: incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/index.html
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/index.html?view=auto&rev=151321
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/index.html (added)
+++ incubator/beehive/trunk/samples/wsm-addressbook-fromWSDL/index.html Thu Feb 3 20:56:12 2005
@@ -0,0 +1,31 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Apache-Beehive</title>
+</head>
+
+<body bgcolor="#FFFFFF">
+<h1 align="center">Beehive Web Services</h1>
+<p><em>Welcome</em> to the AddressBook Web service!</p>
+<p>What would you like to do today?</p>
+<ul>
+ <li>
+ <a href="happyaxis.jsp">Validate</a> the local installation
+ <br>
+ <i>see below if this does not work.</i>
+ </li>
+ <li>
+ View AddressBook Web Service's
+ <a href="web/Service.jws?wsdl">WSDL</a>
+ </li>
+</ul>
+
+<h3>Validating the local configuration</h3>
+
+If the validation page displays an exception instead of a
+status page, the likely cause is that you have multiple XML parsers in
+your classpath. Clean up your classpath by eliminating extraneous parsers.
+
+</body>
+</html>