File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Axis2/JAX-WS. How to transfer complex objects? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2/JAX-WS. How to transfer complex objects?" Watch "Axis2/JAX-WS. How to transfer complex objects?" New topic
Author

Axis2/JAX-WS. How to transfer complex objects?

Sergio Rossi
Greenhorn

Joined: Dec 22, 2010
Posts: 1
Hi all.

I have a problem. We are using AXIS2/JAX-WS
How to transfer complex object ?
I have two classes: SearchCrit and SearchCritCondition in server side:

public class SearchCrit implements Serializable{

private SearchCritCondition[] conditions;

}
public class SearchCritCondition implements Serializable{
}

And stubs in client side:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "searchCrit", propOrder = {"searchCritConditions"})
public class SearchCrit implements Serializable
{
@XmlElement
protected List<SearchCritCondition> searchCritConditions;

}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SearchCritCondition")
public class SearchCritCondition implements Serializable{

}

When I try to execute client, I get an exception:
[java] javax.xml.ws.soap.SOAPFaultException: javax.xml.bind.UnmarshalExcept
ion: unexpected element (uri:"", local:"searchCritConditions"). Expected elements are (none)
[java] at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
[java] at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createExceptio
n(SOAPFaultBuilder.java:111)
[java] at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(S
yncMethodHandler.java:108)
[java] at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(S
yncMethodHandler.java:78)
[java] at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.jav
a:107)


Can you help me understand?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Axis2/JAX-WS. How to transfer complex objects?
 
Similar Threads
JAX-WS Question
jax-ws complex nested type is killing me
web services client is not validating parameters
Generating less JAXB classes
@WebService method returning a custom class containing a HashMap / JAX-WS