package com.lx.blocks.address;
import java.io.*;
public interface Address extends Serializable
{
public int getAddressID ();
public void setAddressID (int id);
public int getPersonID ();
public void setPersonID (int id);
public int getCompanyID ();
public void setCompanyID(int companyid);
public String getAddressCode();
public void setAddressCode(String addresscode);
public String getStreet1 ();
public void setStreet1 (String street1);
public String getStreet2 ();
public void setStreet2 (String street2);
public String getStreet3 ();
public void setStreet3 (String street3);
public String getStreet4 ();
public void setStreet4 (String street4);
public String getCity ();
public void setCity (String city);
public String getState ();
public void setState (String state);
public String getZipCode ();
public void setZipCode (String zipcode);
public String getCounty ();
public void setCounty (String county);
public Boolean isPrimary ();
public void setIsPrimary (Boolean isprimary);
public Boolean isDeleted ();
public void setIsDeleted (Boolean isdeleted);
}
package com.lx.blocks.person;
import java.util.*;
import java.io.*;
import com.lx.blocks.*;
import com.lx.blocks.address.*;
import com.lx.blocks.contactmethod.*;
public interface Person extends Serializable
{
public int getPersonID ();
public void setPersonID (int id);
public String getLastName ();
public void setLastName (String lname);
public String getFirstName ();
public void setFirstName (String fname);
public String getSocSecNo ();
public void setSocSecNo (String socsecno);
public String getNickname ();
public void setNickname (String nickname);
public String getMiddleName ();
public void setMiddleName (String middlename);
public String getPrefix ();
public void setPrefix (String prefix);
public String getSuffix ();
public void setSuffic (String suffix);
public int getSex ();
public void setSex (int sex);
public String getInitials ();
public void setInitials (String initials);
/*
public boolean isDeleted ();
public void setIsDeleted (boolean isdeleted);
public boolean isActive ();
public void setIsActive (boolean isactive);
public boolean isPublic ();
public void setIsPublic (boolean ispublic);
*/
// ContactMethods
//-----------------------------
public Collection getContactMethods ();
public ContactMethod createContactMethod ();
public ContactMethod getContactMethod (String key);
public void addContactMethod (ContactMethod cm);
public void removeContactMethod (String key);
// Addresses
//-----------------------------
public Collection getAddresses ();
public Address createAddress ();
public Address getAddress (String key);
public void addAddress (Address addr);
public void removeAddress (String key);
//ContactLogs
//--------------------------
public Collection getContactLogs();
public ContactLog createContactLog ();
public ContactLog getContactLog(String key);
public void addContactLog(ContactLog cl);
public void removeContactLog(String key);
}
-----Original Message-----
From: Matthias David [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 10:55 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Defining Interfaces in WSDL?Hi Kim,a "generic" abstract class would be a class that is the supertype of any type in your WSDL. Is it that what you want?The problem with that approach is that any type in your wsdl then has to be a complexType with an extension-base-tag. If your wsdl is generated from an existing XSD or anything else this would be no problem. If your wsdl is "hand-written" then it might be a problem...Does that help you? If not, maybe you could tell us more details about your problem.Matthias.-----Original Message-----
From: Quinn, Kim John [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 4:40 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Defining Interfaces in WSDL?Hi Matthias,Thanks for that response. I've tried the "abstract" approach but the only problem is that still requires me (or the WSDL) to generate a class, in my case - as a wrapper and the derived implementations.What i'm trying to avoid is creating wrapper for 500+ classes...maybe there is some way I can define a "generic" abstract class instead and use it?Thanks again for the response.KJQ-----Original Message-----
From: Matthias David [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 3:36 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Defining Interfaces in WSDL?Hi Kim,
I dont't know how to define interfaces but you could define "abstract" supertypes in your wsdl. Axis then generates an abstract class for that type.
Here's an example:
<s:complexType name="RequestBaseType" abstract="true">
</s:complexType><s:complexType name="RequestType">
<s:complexContent>
<s:extension base="s:RequestBaseType">
<!-- define your attributes/elements here -->
</s:extension>
</s:/complexContent>
</s:complexType>RequestType is a subtype of RequestBaseType. So you could use the "interface" RequestBaseType anywhere in your code, where you actually deal with a RequestType.
Matthias.
-----Original Message-----
From: Quinn, Kim John [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 12:28 AM
To: '[EMAIL PROTECTED]'
Subject: Defining Interfaces in WSDL?
Importance: High
Hey all, well - im past deserializing now but have a new question to bang my head against...
Has anyone defined a WSDL document that uses "interfaces?"
What I need to do (due to code that uses it) is have my WebService work with the interfaces as the types as opposed to the implementations. Its either that or it seems like I am going to have to create proxy's for every single one...
Any suggestions or pointers to where I could find a sample would be great!
Thanks.
KJQ