Hi guys,
I'm building a JaxWS client to a .NET (3.5) web service. I'll skip
the agony I encountered trying to get Metro working with the service
(which uses Transport encryption and message authentication). For
now, I just hacked out the WS-I portion of the WSDL so that I can use
plain JAXWS.
Now the problem is that one of the web service operations expects a
space-separated list in a single parameter. At build-time,
wsimport/jaxb generates a binding object that employes @XmlList on one
of its properties:
8<--------------------------------------------------------------------------------------------------------
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"fooType"
})
@XmlRootElement(name = "SetFoos")
public class SetSubscriptions {
@XmlList
protected List<String> fooType;
8<--------------------------------------------------------------------------------------------------------
This is fine, but when deployed, I get "WebServiceException" as follows:
8<--------------------------------------------------------------------------------------------------------
SEVERE: WSSERVLET11: failed to parse runtime descriptor:
javax.xml.ws.WebServiceException: class
com.me.myproduct.module.partner.product.SetFoos do not have a property
of the name {
http://tempuri.org/}fooType
[java] javax.xml.ws.WebServiceException: class
com.me.myproduct.module.partner.product.SetFoos do not have a property
of the name {
http://tempuri.org/}fooType
[java] at
com.sun.xml.ws.server.sei.EndpointArgumentsBuilder$DocLit.<init>(EndpointArgumentsBuilder.java:510)
[java] at
com.sun.xml.ws.server.sei.EndpointMethodHandler.createArgumentsBuilder(EndpointMethodHandler.java:133)
[java] at
com.sun.xml.ws.server.sei.EndpointMethodHandler.<init>(EndpointMethodHandler.java:106)
[java] at
com.sun.xml.ws.server.sei.PayloadQNameBasedDispatcher.<init>(PayloadQNameBasedDispatcher.java:106)
[java] at
com.sun.xml.ws.server.sei.EndpointMethodDispatcherGetter.<init>(EndpointMethodDispatcherGetter.java:72)
8<--------------------------------------------------------------------------------------------------------
I checked out the source for JAXB-RI 2.1.6 and put it in debug. The
exception that is being thrown at line 510 of
EndpointArgumentsBuilder$DocLit is caused by the call to
getElementPropertyAccessor on the JAXBContext at line 499. The
fooType property of the SetFoos element has the @XmlList annotation,
and the binding information property impl class for the property is
"ListElementProperty", which extends PropertyImpl (via ArrayProperty).
Neither ListElementProperty nor ArrayProperty override
getElementPropertyAccessor(), so at runtime, a null value is returned
for the accessor and the exception is thrown.
I can't change the WSDL/XSD provided by our business partner. What
is the correct way to approach this? Is ListElementProperty broken?
Thanks for any input :)
-kris-