|
Hi, I apologize because I know it’s the JIBX mailing list and I ask
something about AXIS2. I am currently using Axis1.3 and I would like to switch to AXIS2 and
later, when it’ll be available, I would like to use JIBX with Axis2. My problem is: I am completely lost. I red everything I found
about Axis2. I can create a simple webservice that gets and returns a String
but what about a more “complex” object like a Person with several
addresses ? In Axis 1.3 it was really simple. I just have to define
a Remote interface and implementation like: public interface PersonServiceRemote extends Remote { Person[] findByLastNameAndCity(final String argCity, final
String argLastName); void save(final Person argPerson); … } In the client (a heavy client), I use a DAO (PersonDAOImpl
here after) which call the PersonServiceRemote functions…
and that’s all. With Axis1.3 the Marshalling/Unmarshalling is
done. I give parameters (String or array in fact) and I receive a java
object or array of object. How can I do with AXIS2 ? Thanks for your help JMi DAO
at client level that use the webservice: ================================ ... import
org.springframework.beans.factory.ListableBeanFactory; import
org.springframework.context.support.FileSystemXmlApplicationContext; ... public
class PersonDAOImpl extends AbstractDAO implements PersonDAO {
public static final String CLIENT_CONTEXT_CONFIG_LOCATION =
"clientContext.xml";
private ListableBeanFactory beanFactory;
private PersonServiceRemote personServiceRemote;
public PersonDAOImpl() throws MyException {
init();
}
protected void init() throws MyException {
try {
beanFactory = new
FileSystemXmlApplicationContext(CLIENT_CONTEXT_CONFIG_LOCATION);
Map services = beanFactory.getBeansOfType(PersonServiceRemote.class);
for (Iterator it = services.keySet().iterator(); it.hasNext();) {
String beanName = (String) it.next();
personServiceRemote = (PersonServiceRemote) services.get(beanName);
}
} catch (final Exception argE) {
LOG.error(argE.getMessage(),
argE);
throw new MyException(argE);
}
}
public List findByLastNameAndCity(final String argCity, final String
argLastName) throws MyException {
List list = new ArrayList();
try {
PersonTO array = personServiceRemote.findByLastNameAndCity(argCity,
argLastName);
if (array.length > 0) {
for (int i = 0; i < array.length; i++) { Person data = "">
list.add(data);
}
}
} catch (final Exception argE) {
LOG.error(argE.getMessage(), argE);
throw new MyException(argE);
}
return list;
} ... |
- [jibx-users] AXIS2 - How to return a complex object not St... JM Delsaux
- Re: [jibx-users] AXIS2 - How to return a complex obje... Dennis Sosnoski
- RE: [jibx-users] AXIS2 - How to return a complex ... JM Delsaux
- Re: [jibx-users] AXIS2 - How to return a comp... Dennis Sosnoski
- RE: [jibx-users] AXIS2 - How to return a complex ... JM Delsaux
- [jibx-users] only get half a string with a * Aaron Smuts
- Re: [jibx-users] only get half a string w... Dennis Sosnoski
