You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sc...@apache.org on 2002/05/18 16:09:35 UTC
cvs commit: xml-axis/java/test/addrNoImplSEI AddressBookSOAPBindingImpl.java AddressBookTestCase.java deploy.wsdd
scheu 02/05/18 07:09:35
Added: java/test/addrNoImplSEI AddressBookSOAPBindingImpl.java
AddressBookTestCase.java deploy.wsdd
Log:
The new addrNoImplSEI files
Revision Changes Path
1.1 xml-axis/java/test/addrNoImplSEI/AddressBookSOAPBindingImpl.java
Index: AddressBookSOAPBindingImpl.java
===================================================================
/**
* AddressBookSOAPBindingImpl.java
*
* This file was hand modified from the Emmitter generated code.
* This code tests whether the impl class must implement
* the SEI
*/
package test.addrNoImplSEI;
import java.util.Hashtable;
import java.util.Map;
import samples.addr.Address;
/**
* Note that the Impl class does not implement the
* SEI AddressBook. However it should still work since
* the methods are the same.
*/
public class AddressBookSOAPBindingImpl
// implements AddressBook
{
private Map addresses = new Hashtable();
public void addEntry(java.lang.String name, samples.addr.Address address) throws java.rmi.RemoteException {
this.addresses.put(name, address);
}
public samples.addr.Address getAddressFromName(java.lang.String name) throws java.rmi.RemoteException {
return (samples.addr.Address) this.addresses.get(name);
}
}
1.1 xml-axis/java/test/addrNoImplSEI/AddressBookTestCase.java
Index: AddressBookTestCase.java
===================================================================
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Axis" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package test.addrNoImplSEI;
import junit.framework.TestCase;
import org.apache.axis.AxisFault;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import samples.addr.*;
/** Test the address book sample code.
*/
public class AddressBookTestCase extends TestCase {
static Log log =
LogFactory.getLog(AddressBookTestCase.class.getName());
public AddressBookTestCase(String name) {
super(name);
}
public void doTest () throws Exception {
String[] args = {};
Main.main(args);
}
public void testAddressBookService () throws Exception {
try {
log.info("Testing address book sample.");
doTest();
log.info("Test complete.");
}
catch( Exception e ) {
if ( e instanceof AxisFault ) ((AxisFault)e).dump();
e.printStackTrace();
throw new Exception("Fault returned from test: "+e);
}
}
}
1.1 xml-axis/java/test/addrNoImplSEI/deploy.wsdd
Index: deploy.wsdd
===================================================================
<!-- Use this file to deploy some handlers/chains and services -->
<!-- Two ways to do this: -->
<!-- java org.apache.axis.client.AdminClient deploy.wsdd -->
<!-- after the axis server is running -->
<!-- or -->
<!-- java org.apache.axis.utils.Admin client|server deploy.wsdd -->
<!-- from the same directory that the Axis engine runs -->
<deployment
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<!-- Services from AddressBookService WSDL service -->
<service name="AddressBook" provider="java:RPC">
<parameter name="className" value="test.addrNoImplSEI.AddressBookSOAPBindingImpl"/>
<!-- Disabled to force introspection
<operation name="addEntry" >
<parameter name="name" type="tns:string" xmlns:tns="http://www.w3.org/1999/XMLSchema"/>
<parameter name="address" type="tns:address" xmlns:tns="urn:samples.addr"/>
</operation>
<operation name="getAddressFromName" returnQName="address" >
<parameter name="name" type="tns:string" xmlns:tns="http://www.w3.org/1999/XMLSchema"/>
</operation>
-->
<parameter name="allowedMethods" value="addEntry getAddressFromName"/>
<typeMapping
xmlns:ns="urn:samples.addr"
qname="ns:stateType"
type="java:samples.addr.StateType"
serializer="org.apache.axis.encoding.ser.EnumSerializerFactory"
deserializer="org.apache.axis.encoding.ser.EnumDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
<typeMapping
xmlns:ns="urn:samples.addr"
qname="ns:phone"
type="java:samples.addr.Phone"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
<typeMapping
xmlns:ns="urn:samples.addr"
qname="ns:address"
type="java:samples.addr.Address"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
</service>
</deployment>