axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/samples/addr Main.java deploy.xml AddressBook.wsdl AddressBook.java Address.java
Date Tue, 25 Sep 2001 14:31:02 GMT
butek       01/09/25 07:31:02

  Modified:    java/samples/addr Main.java deploy.xml AddressBook.wsdl
                        AddressBook.java Address.java
  Log:
  Changed address book sample to use generated stub/skel/etc.
  
  Revision  Changes    Path
  1.4       +17 -26    xml-axis/java/samples/addr/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/addr/Main.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Main.java	2001/09/05 17:22:58	1.3
  +++ Main.java	2001/09/25 14:31:02	1.4
  @@ -73,7 +73,7 @@
       static String name1 = "Purdue Boilermaker";
       static Address addr1 = new Address (1, "University Drive",
                                           "West Lafayette", "IN", 47907,
  -                                        new PhoneNumber (765, "494", "4900"));
  +                                        new Phone (765, "494", "4900"));
       
       private static void printAddress (Address ad) {
           if (ad == null) {
  @@ -84,12 +84,12 @@
                                   ad.getStreetName());
           System.err.println ("\t" + ad.getCity() + ", " + ad.getState() + " " +
                                   ad.getZip());
  -        PhoneNumber ph = ad.getPhoneNumber();
  +        Phone ph = ad.getPhoneNumber();
           System.err.println ("\tPhone: (" + ph.getAreaCode() + ") " +
                                   ph.getExchange() + "-" + ph.getNumber());
       }
       
  -    private static Object doit (AddressBookProxy ab) throws Exception {
  +    private static Object doit (AddressBook ab) throws Exception {
           System.err.println (">> Storing address for '" + name1 + "'");
           ab.addEntry (name1, addr1);
           System.err.println (">> Querying address for '" + name1 + "'");
  @@ -112,40 +112,31 @@
           URL serviceURL = new URL(opts.getURL());
           
           System.err.println ("Using proxy without session maintenance.");
  -        AddressBookProxy ab1 = new AddressBookProxy ("urn:AddressFetcher2");
  -        if (serviceURL != null) {
  -            ab1.setEndPoint (serviceURL);
  +        AddressBookService abs = new AddressBookService();
  +        AddressBook ab1 = null;
  +        if (serviceURL == null) {
  +            ab1 = abs.getAddressBook();
           }
  -        ab1.setMaintainSession (false);
  +        else {
  +            ab1 = abs.getAddressBook(serviceURL);
  +        }
           Object ret = doit (ab1);
           if (ret != null) {
               throw new Exception("non-session test expected null response, got "+ret);
           }
           
           System.err.println ("\n\nUsing proxy with session maintenance.");
  -        AddressBookProxy ab2 = new AddressBookProxy ("urn:AddressFetcher2");
  -        if (serviceURL != null) {
  -            ab2.setEndPoint (serviceURL);
  +        AddressBook ab2 = null;
  +        if (serviceURL == null) {
  +            ab2 = abs.getAddressBook();
  +        }
  +        else {
  +            ab2 = abs.getAddressBook(serviceURL);
           }
  -        ab2.setMaintainSession (true);
  +        ((AddressBookSOAPBindingStub) ab2).setMaintainSession (true);
           ret = doit (ab2);
           if (ret == null) {
               throw new Exception("session test expected non-null response, got "+ret);
           }
  -        
  -        /* This code commented out for now.  This test relies on the currently-
  -         commented-out section of deploy.xml.  See that file for more.
  -         
  -         System.err.println ("Using application-scope proxy without session maintenance.");
  -         AddressBookProxy ab3 = new AddressBookProxy ("urn:AddressFetcher3");
  -         if (serviceURL != null) {
  -         ab3.setEndPoint (serviceURL);
  -         }
  -         ab3.setMaintainSession (false);
  -         ret = doit (ab3);
  -         if (ret == null) {
  -         throw new Exception("non-session test of app provider expected non-null response,
got "+ret);
  -         }
  -         */
       }
   }
  
  
  
  1.4       +20 -40    xml-axis/java/samples/addr/deploy.xml
  
  Index: deploy.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/addr/deploy.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- deploy.xml	2001/07/08 14:18:35	1.3
  +++ deploy.xml	2001/09/25 14:31:02	1.4
  @@ -1,45 +1,25 @@
  -<!-- Use this file to deploy some handlers/chains and services  -->
  -<!-- Two ways to do this:                                       -->
  -<!--   java org.apache.axis.utils.Admin deploy.xml              -->
  -<!--      from the same dir that the Axis engine runs           -->
  -<!-- or                                                         -->
  -<!--   java org.apache.axis.client.AdminClient deploy.xml       -->
  -<!--      after the axis server is running                      -->
  -<!-- This file will be replaced by WSDD once it's ready         -->
  +<!--                                                             -->
  +<!--Use this file to deploy some handlers/chains and services  -->
  +<!--Two ways to do this:                                         -->
  +<!--  java org.apache.axis.utils.Admin deploy.xml              -->
  +<!--     from the same dir that the Axis engine runs             -->
  +<!--or                                                           -->
  +<!--  java org.apache.axis.client.AdminClient deploy.xml       -->
  +<!--     after the axis server is running                        -->
  +<!--This file will be replaced by WSDD once it's ready           -->
   
   <m:deploy xmlns:m="AdminService">
   
  -  <chain   name="book"     flow="RPCDispatcher" />
  +   <!-- Services from AddressBookService WSDL service -->
   
  -  <service name="urn:AddressFetcher2" pivot="book" >
  -    <option name="className" value="samples.addr.AddressBook" />
  -    <option name="methodName" value="addEntry getAddressFromName" />
  -    <option name="scope" value="Session" />
  -  </service>
  -
  -  <beanMappings xmlns:book2="urn:AddressFetcher2">
  -    <book2:Address       classname="samples.addr.Address"/>
  -    <book2:PhoneNumber      classname="samples.addr.PhoneNumber"/>
  -  </beanMappings>
  -
  -<!--
  -Commented out this test for now. This seems to conflict somehow with the first
  -service definition... if you uncomment this service & bean definition,
  -the functional test suddenly starts breaking!  Will look into this further...
  -See commented-out code in Main.main() - RobJ
  --->
  -
  -<!--
  -  <service name="urn:AddressFetcher3" pivot="book" >
  -    <option name="className" value="samples.addr.AddressBook" />
  -    <option name="methodName" value="addEntry getAddressFromName" />
  -    <option name="scope" value="Application" />
  -  </service>
  -
  -  <beanMappings xmlns:book3="urn:AddressFetcher3">
  -    <book3:Address       classname="samples.addr.Address"/>
  -    <book3:PhoneNumber      classname="samples.addr.PhoneNumber"/>
  -  </beanMappings>
  --->
  -
  +   <service name="urn:AddressFetcher2" pivot="RPCDispatcher">
  +      <option name="className" value="samples.addr.AddressBookSOAPBindingSkeleton"/>
  +      <option name="methodName" value=" addEntry getAddressFromName"/>
  +      <option name="scope" value="Session" />
  +   </service>
  +
  +   <beanMappings xmlns:typens="urn:xml-soap-address-demo">
  +      <typens:Phone classname= "samples.addr.Phone"/>
  +      <typens:Address classname= "samples.addr.Address"/>
  +   </beanMappings>
   </m:deploy>
  
  
  
  1.2       +7 -6      xml-axis/java/samples/addr/AddressBook.wsdl
  
  Index: AddressBook.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/addr/AddressBook.wsdl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AddressBook.wsdl	2001/06/29 11:47:12	1.1
  +++ AddressBook.wsdl	2001/09/25 14:31:02	1.2
  @@ -2,6 +2,7 @@
   
   <definitions name="urn:AddressFetcher" 
                targetNamespace="urn:AddressFetcher2"
  +             xmlns:tns="urn:AddressFetcher2"
                xmlns:typens="urn:xml-soap-address-demo"
                xmlns:xsd="http://www.w3.org/1999/XMLSchema"
                xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  @@ -45,16 +46,16 @@
     <!-- port type declns -->
     <portType name="AddressBook">
       <operation name="addEntry">
  -      <input message="AddEntryRequest"/>
  +      <input message="tns:AddEntryRequest"/>
       </operation>
       <operation name="getAddressFromName">
  -      <input message="GetAddressFromNameRequest"/>
  -      <output message="GetAddressFromNameResponse"/>
  +      <input message="tns:GetAddressFromNameRequest"/>
  +      <output message="tns:GetAddressFromNameResponse"/>
       </operation>
     </portType>
   
     <!-- binding declns -->
  -  <binding name="AddressBookSOAPBinding" type="AddressBook">
  +  <binding name="AddressBookSOAPBinding" type="tns:AddressBook">
       <soap:binding style="rpc" 
                     transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="addEntry">
  @@ -87,8 +88,8 @@
   
     <!-- service decln -->
     <service name="AddressBookService">
  -    <port name="AddressBook" binding="AddressBookSOAPBinding">
  -      <soap:address location="http://localhost:2020/soap/servlet/rpcrouter"/>
  +    <port name="AddressBook" binding="tns:AddressBookSOAPBinding">
  +      <soap:address location="http://localhost:8080/axis/servlet/AxisServlet"/>
       </port>
     </service>
   
  
  
  
  1.2       +7 -283    xml-axis/java/samples/addr/AddressBook.java
  
  Index: AddressBook.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/addr/AddressBook.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AddressBook.java	2001/06/29 11:47:12	1.1
  +++ AddressBook.java	2001/09/25 14:31:02	1.2
  @@ -1,289 +1,13 @@
  -/*
  - * The Apache Software License, Version 1.1
  - *
  - *
  - * Copyright (c) 2000 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 "SOAP" 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.
  - * ====================================================================
  +/**
  + * AddressBook.java
    *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2000, International
  - * Business Machines, Inc., http://www.apache.org.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  + * This file was auto-generated from WSDL
  + * by the Apache Axis Wsdl2java emitter.
    */
   
   package samples.addr;
  -
  -import java.util.*;
  -import org.w3c.dom.*;
  -import javax.xml.parsers.*;
  -//import org.apache.soap.util.xml.*;
   
  -/**
  - * See \samples\addr\readme for info.
  - *
  - * @author Matthew J. Duftler (duftler@us.ibm.com)
  - */
  -public class AddressBook
  -{
  -    private Hashtable name2AddressTable = new Hashtable();
  -    
  -    public AddressBook()
  -    {
  -        addEntry("John B. Good",
  -                 new Address(123, "Main Street", "Anytown", "NY", 12345,
  -                             new PhoneNumber(123, "456", "7890")));
  -        addEntry("Bob Q. Public",
  -                 new Address(456, "North Whatever", "Notown", "ME", 12424,
  -                             new PhoneNumber(987, "444", "5566")));
  -    }
  -    
  -    public void addEntry(String name, Address address)
  -    {
  -        name2AddressTable.put(name, address);
  -    }
  -    
  -    public Address getAddressFromName(String name)
  -        throws IllegalArgumentException
  -    {
  -        if (name == null)
  -        {
  -            throw new IllegalArgumentException("The name argument must not be " +
  -                                                   "null.");
  -        }
  -        
  -        return (Address)name2AddressTable.get(name);
  -    }
  -    
  -    public Element getAllListings()
  -    {
  -        // RobJ not quite sure of the deal here...
  -        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  -        DocumentBuilder db;
  -        try {
  -            db  = dbf.newDocumentBuilder();
  -        } catch (ParserConfigurationException ex) {
  -            // RobJ does not know what to do in this case...
  -            throw new IllegalArgumentException("Parser configuration exception setting
up documentBuilder: "+ex);
  -        }
  -        
  -        Document doc = db.newDocument();
  -        Element bookEl = doc.createElement("AddressBook");
  -        
  -        bookEl.appendChild(doc.createTextNode("\n"));
  -        
  -        for (Enumeration keys = name2AddressTable.keys();
  -             keys.hasMoreElements();)
  -        {
  -            String name = (String)keys.nextElement();
  -            Address address = (Address)name2AddressTable.get(name);
  -            Element listingEl = doc.createElement("Listing");
  -            Element nameEl = doc.createElement("Name");
  -            nameEl.appendChild(doc.createTextNode(name));
  -            listingEl.appendChild(doc.createTextNode("\n    "));
  -            listingEl.appendChild(nameEl);
  -            listingEl.appendChild(doc.createTextNode("\n    "));
  -            Element addressEl = doc.createElement("Address");
  -            Element streetNumEl = doc.createElement("StreetNum");
  -            streetNumEl.appendChild(doc.createTextNode(address.getStreetNum() + ""));
  -            addressEl.appendChild(doc.createTextNode("\n      "));
  -            addressEl.appendChild(streetNumEl);
  -            addressEl.appendChild(doc.createTextNode("\n      "));
  -            Element streetNameEl = doc.createElement("StreetName");
  -            streetNameEl.appendChild(doc.createTextNode(address.getStreetName()));
  -            addressEl.appendChild(streetNameEl);
  -            addressEl.appendChild(doc.createTextNode("\n      "));
  -            Element cityEl = doc.createElement("City");
  -            cityEl.appendChild(doc.createTextNode(address.getCity()));
  -            addressEl.appendChild(cityEl);
  -            addressEl.appendChild(doc.createTextNode("\n      "));
  -            Element stateEl = doc.createElement("State");
  -            stateEl.appendChild(doc.createTextNode(address.getState()));
  -            addressEl.appendChild(stateEl);
  -            addressEl.appendChild(doc.createTextNode("\n      "));
  -            Element zipEl = doc.createElement("Zip");
  -            zipEl.appendChild(doc.createTextNode(address.getZip() + ""));
  -            addressEl.appendChild(zipEl);
  -            addressEl.appendChild(doc.createTextNode("\n      "));
  -            PhoneNumber phone = address.getPhoneNumber();
  -            Element phoneEl = doc.createElement("PhoneNumber");
  -            phoneEl.appendChild(doc.createTextNode("\n        "));
  -            Element areaCodeEl = doc.createElement("AreaCode");
  -            areaCodeEl.appendChild(doc.createTextNode(phone.getAreaCode() + ""));
  -            phoneEl.appendChild(areaCodeEl);
  -            phoneEl.appendChild(doc.createTextNode("\n        "));
  -            Element exchangeEl = doc.createElement("Exchange");
  -            exchangeEl.appendChild(doc.createTextNode(phone.getExchange()));
  -            phoneEl.appendChild(exchangeEl);
  -            phoneEl.appendChild(doc.createTextNode("\n        "));
  -            Element numberEl = doc.createElement("Number");
  -            numberEl.appendChild(doc.createTextNode(phone.getNumber()));
  -            phoneEl.appendChild(numberEl);
  -            phoneEl.appendChild(doc.createTextNode("\n      "));
  -            addressEl.appendChild(phoneEl);
  -            addressEl.appendChild(doc.createTextNode("\n    "));
  -            listingEl.appendChild(addressEl);
  -            listingEl.appendChild(doc.createTextNode("\n  "));
  -            bookEl.appendChild(doc.createTextNode("  "));
  -            bookEl.appendChild(listingEl);
  -            bookEl.appendChild(doc.createTextNode("\n"));
  -        }
  -        
  -        return bookEl;
  -    }
  -    
  -    public int putListings(Element el)
  -    {
  -        // ROBJ WARNING: IS THIS RIGHT???
  -        // previously was "DOMUtils.getFirstChildElement(el)"
  -        Element listingEl = (Element)el.getFirstChild();
  -        int count = 0;
  -        
  -        while (listingEl != null)
  -        {
  -            String name = null;
  -            int    streetNum = 0;
  -            String streetName = "";
  -            String city = "";
  -            String state = "";
  -            int    zip = 0;
  -            int    areaCode = 0;
  -            String exchange = "";
  -            String number = "";
  -            
  -            Element tempEl = (Element)listingEl.getFirstChild();
  -            
  -            while (tempEl != null)
  -            {
  -                String tagName = tempEl.getTagName();
  -                
  -                if (tagName.equals("Name"))
  -                {
  -                    name = DOMUtils.getChildCharacterData(tempEl);
  -                }
  -                else if (tagName.equals("Address"))
  -                {
  -                    Element tempEl2 = DOMUtils.getFirstChildElement(tempEl);
  -                    
  -                    while (tempEl2 != null)
  -                    {
  -                        String tagName2 = tempEl2.getTagName();
  -                        String content2 = DOMUtils.getChildCharacterData(tempEl2);
  -                        
  -                        if (tagName2.equals("StreetNum"))
  -                        {
  -                            streetNum = Integer.parseInt(content2);
  -                        }
  -                        else if (tagName2.equals("StreetName"))
  -                        {
  -                            streetName = content2;
  -                        }
  -                        else if (tagName2.equals("City"))
  -                        {
  -                            city = content2;
  -                        }
  -                        else if (tagName2.equals("State"))
  -                        {
  -                            state = content2;
  -                        }
  -                        else if (tagName2.equals("Zip"))
  -                        {
  -                            zip = Integer.parseInt(content2);
  -                        }
  -                        else if (tagName2.equals("City"))
  -                        {
  -                            city = content2;
  -                        }
  -                        else if (tagName2.equals("PhoneNumber"))
  -                        {
  -                            Element tempEl3 = DOMUtils.getFirstChildElement(tempEl2);
  -                            
  -                            while (tempEl3 != null)
  -                            {
  -                                String tagName3 = tempEl3.getTagName();
  -                                String content3 = DOMUtils.getChildCharacterData(tempEl3);
  -                                
  -                                if (tagName3.equals("AreaCode"))
  -                                {
  -                                    areaCode = Integer.parseInt(content3);
  -                                }
  -                                else if (tagName3.equals("Exchange"))
  -                                {
  -                                    exchange = content3;
  -                                }
  -                                else if (tagName3.equals("Number"))
  -                                {
  -                                    number = content3;
  -                                }
  -                                
  -                                tempEl3 = DOMUtils.getNextSiblingElement(tempEl3);
  -                            }
  -                        }
  -                        
  -                        tempEl2 = DOMUtils.getNextSiblingElement(tempEl2);
  -                    }
  -                }
  -                
  -                tempEl = DOMUtils.getNextSiblingElement(tempEl);
  -            }
  -            
  -            if (name != null)
  -            {
  -                Address address = new Address(streetNum, streetName, city, state,
  -                                              zip, new PhoneNumber(areaCode,
  -                                                                   exchange,
  -                                                                   number));
  -                
  -                addEntry(name, address);
  -                count++;
  -            }
  -            
  -            listingEl = DOMUtils.getNextSiblingElement(listingEl);
  -        }
  -        
  -        return count;
  -    }
  +public interface AddressBook extends java.rmi.Remote {
  +    public void addEntry(String name, Address address) throws java.rmi.RemoteException;
  +    public Address getAddressFromName(String name) throws java.rmi.RemoteException;
   }
  
  
  
  1.2       +47 -124   xml-axis/java/samples/addr/Address.java
  
  Index: Address.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/samples/addr/Address.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Address.java	2001/06/29 11:47:12	1.1
  +++ Address.java	2001/09/25 14:31:02	1.2
  @@ -1,83 +1,24 @@
  -/*
  - * The Apache Software License, Version 1.1
  - *
  - *
  - * Copyright (c) 2000 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 "SOAP" 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.
  - * ====================================================================
  +/**
  + * Address.java
    *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation and was
  - * originally based on software copyright (c) 2000, International
  - * Business Machines, Inc., http://www.apache.org.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  + * This file was auto-generated from WSDL
  + * by the Apache Axis Wsdl2java emitter.
    */
   
   package samples.addr;
   
  -/**
  - * See \samples\addr\readme for info.
  - *
  - * @author Matthew J. Duftler (duftler@us.ibm.com)
  - */
  -public class Address
  -{
  -    private int         streetNum;
  -    private String      streetName;
  -    private String      city;
  -    private String      state;
  -    private int         zip;
  -    private PhoneNumber phoneNumber;
  -    
  -    public Address()
  -    {
  -    }
  -    
  -    public Address(int streetNum, String streetName, String city, String state,
  -                   int zip, PhoneNumber phoneNumber)
  -    {
  +public class Address implements java.io.Serializable {
  +    private int streetNum;
  +    private String streetName;
  +    private String city;
  +    private String state;
  +    private int zip;
  +    private Phone phoneNumber;
  +
  +    public Address() {
  +    }
  +
  +    public Address(int streetNum, String streetName, String city, String state, int zip,
Phone phoneNumber) {
           this.streetNum = streetNum;
           this.streetName = streetName;
           this.city = city;
  @@ -85,71 +26,53 @@
           this.zip = zip;
           this.phoneNumber = phoneNumber;
       }
  -    
  -    public void setStreetNum(int streetNum)
  -    {
  -        this.streetNum = streetNum;
  -    }
  -    
  -    public int getStreetNum()
  -    {
  +
  +    public int getStreetNum() {
           return streetNum;
       }
  -    
  -    public void setStreetName(String streetName)
  -    {
  -        this.streetName = streetName;
  +
  +    public void setStreetNum(int streetNum) {
  +        this.streetNum = streetNum;
       }
  -    
  -    public String getStreetName()
  -    {
  +
  +    public String getStreetName() {
           return streetName;
       }
  -    
  -    public void setCity(String city)
  -    {
  -        this.city = city;
  +
  +    public void setStreetName(String streetName) {
  +        this.streetName = streetName;
       }
  -    
  -    public String getCity()
  -    {
  +
  +    public String getCity() {
           return city;
       }
  -    
  -    public void setState(String state)
  -    {
  -        this.state = state;
  +
  +    public void setCity(String city) {
  +        this.city = city;
       }
  -    
  -    public String getState()
  -    {
  +
  +    public String getState() {
           return state;
       }
  -    
  -    public void setZip(int zip)
  -    {
  -        this.zip = zip;
  +
  +    public void setState(String state) {
  +        this.state = state;
       }
  -    
  -    public int getZip()
  -    {
  +
  +    public int getZip() {
           return zip;
       }
  -    
  -    public void setPhoneNumber(PhoneNumber phoneNumber)
  -    {
  -        this.phoneNumber = phoneNumber;
  +
  +    public void setZip(int zip) {
  +        this.zip = zip;
       }
  -    
  -    public PhoneNumber getPhoneNumber()
  -    {
  +
  +    public Phone getPhoneNumber() {
           return phoneNumber;
       }
  -    
  -    public String toString()
  -    {
  -        return streetNum + " " + streetName + "\n" +
  -            city + ", " + state + " " + zip + "\n" +
  -            phoneNumber;
  +
  +    public void setPhoneNumber(Phone phoneNumber) {
  +        this.phoneNumber = phoneNumber;
       }
  +
   }
  
  
  

Mime
View raw message