I have been trying to debug this, and not sure where the issue is. I can see
that the last interceptor message on the server side -
MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(Message)
does have correct message in the MessageContentList, but somehow the
MessageContentList after it comes back on the client side (I am using
JaxWsProxyFactoryBean), the MessageContentList has this array property value
coming out as null. Please help me understand what I am missing on client
side to get the correct response data.
thanks.
mule1 wrote:
>
> Hello,
>
> I am little bit stuck and need to get this working for a release and not
> sure what I am doing wrong to expose same service class for both SOAP and
> XML messaging. I am having problem with some annotations for XmlElement
> for an Array property on my response object class. If I annotate the Array
> property as "
> @XmlElementWrapper(name="Data") @XmlAnyElement", the XML messaging works
> fine returning me the correct response xml, however, with my SOAP
> messaging, the response returns but without binding my response data from
> the array property.
>
> What I have is - I have a SEI class defined that I have configured to
> expose my url as both SOAP (e.g at url /soapurl) and XML (e.g at url
> /xmlurl) using jaxb/jaxws. My SEI method and the related response class
> are as follow:
> <code>
> @WebService
> public interface CustomerWebService {
>
> @WebResult(name="CustResponse")
> public DataExchange findCustomer(Customer cust);
> }
>
> @XmlRootElement(name = "Customer")
> public class Customer extends Data {
> String name;
>
> String address;
> }
>
> @XmlRootElement(name = "DataExchange")
> public class DataExchange {
>
> private Customer[] custs;
>
> @XmlElementWrapper(name="Data") @XmlAnyElement
> private Customer[] getCusts() {
>
> }
>
> </code>
>
>
> If I see in tcpmon my request/response for SOAP, I do see that the SOAP
> message has the data content for property custs (of class Customer), but
> in the final xml, the element <Data><Customer>.....</Customer></Data>
> doesn't show up. The xml response for XML messaging is just fine with
> correct data.
>
> What do I need to do to have the SOAP message response work with having
> the XmlElement annotation still there for the Array property?
>
> Thanks.
>
--
View this message in context:
http://www.nabble.com/problem-with-xml-element-for-response-with-common-service-for-SOAP-and-XML-tf4884316.html#a13985349
Sent from the cxf-user mailing list archive at Nabble.com.