Hi JMi,
I'll make sure to supply some examples once the Axis2-JiBX code is
working. In principle, you'll just use the same sorts of objects as you
otherwise would with JiBX (basically anything at all, as long as the
class files are modifiable).
If you want to start working with Axis2 before that, you're probably
best off looking into the XMLBeans binding examples. I have some from
the Monday Javapolis session that I'll make available when I get a
chance. Unfortunately, I think the current XMLBeans code is ugly to
build (let alone code to).
- Dennis
JM Delsaux wrote:
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 = array[i];
list.add(data);
}
}
} catch (final Exception argE) {
LOG.error(argE.getMessage(), argE);
throw new MyException(argE);
}
return list;
}
...
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users