This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sergio Rossi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic