Hi, I'm developing a client-server application with messaging transmission through JAX-WS and JAXB annotations, but I'm having some trouble on that process. I'm needing help to understand and solve a set of problems in this process.
On Axis2 1.5.4; Server JAX-WS annotated webservice. @WebService(name="Persons.Info", serviceName="Persons", portName="Info") @BindingType(value="http://www.w3.org/2003/05/soap/bindings/HTTP/") // yes, SOAP1.2 public class Info { @WebMethod public @WebResult Person aPersonInfoSerivceTest (@WebParam Person p) throws Exception { System.out.println(p); // returns Object System.out.println(p.name); // returns something correct System.out.println(p.pets); // its an ArrayList<String>, and returns Null. p.serviceTested = true; return p; } } SOAPMonitor gives me the sent message, and it is correct. I'm just unmarshalling all classes through Dispatcher client, but when service executes no error occur, and the "Person p" parameter is not created correctly. I've tried the same thing only using JAXB to marshall and unmarshall this objects, thought storing XML into files, instead of using JAXWS and Dispatcher, locally, and it works correctly. The problem occurs when mounting ArrayList from XML SOAP message. Thats the client snippet. Service service = Service.create(serviceName); service.addPort(portName, SOAPBinding.SOAP12HTTP_BINDING, endpointAddress); JAXBContext jaxbcontext = JAXBContext.newInstance(Person.class); Dispatch<Object> dispatch = service.createDispatch(portName, jaxbcontext, Service.Mode.PAYLOAD); BindingProvider bp = (BindingProvider) dispatch; Map<String, Object> rc = bp.getRequestContext(); rc.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE); rc.put(BindingProvider.SOAPACTION_URI_PROPERTY, "aServiceTest"); Object res = dispatch.invoke(per); Does someone has example files with a working example of JAXB and JAXWS service-client simple application, using ArrayLists<T> ? Thanks. Bruno.
