[jbossws-users] [JBossWS] - ws can't map ArrayList to xsd:boolean
mjea
do-not-reply at jboss.com
Fri Jan 5 04:36:36 EST 2007
I have an EJB with the following method exposed as a web service:
public Collection getStatus(Ear data) throws OspMethodException, RemoteException;
I generated the wsdl using wstools. I have the following response generated:
| ...
| <message name="EarAccessService_getStatusResponse">
| <part name="result" type="ns1:Collection"/>
| </message>
| ...
| <operation name="getStatus" parameterOrder="Ear_1">
| <input message="tns:EarAccessService_getStatus"/>
| <output message="tns:EarAccessService_getStatusResponse"/>
| <fault message="tns:OspMethodException" name="OspMethodException"/>
| </operation>
| ...
|
Now when I trigger the web service, the EJB method is correctly executed but the soap response creation fails with this error:
|
| 10:00:33 ERROR .71-8080-1 [server.StandardEndpointServlet] Error processing web service request
| javax.xml.rpc.JAXRPCException: org.jboss.xb.binding.JBossXBValueFormatException: Java value for XSD boolean type expected to be an instance of java.lang.Boolean or java.lang.Number. But the value is of type java.util.ArrayList
| at org.jboss.ws.soap.SOAPContentElement.write(SOAPContentElement.java:986)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:171)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:184)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:184)
| at org.jboss.ws.soap.SAAJElementWriter.writeElement(SAAJElementWriter.java:184)
| at org.jboss.ws.soap.SAAJElementWriter.printInternal(SAAJElementWriter.java:163)
| at org.jboss.ws.soap.SAAJElementWriter.print(SAAJElementWriter.java:142)
| at org.jboss.ws.soap.SOAPMessageImpl.writeTo(SOAPMessageImpl.java:266)
| at org.jboss.ws.server.ServiceEndpointManager.sendResponse(ServiceEndpointManager.java:409)
|
It seems it tries to map my ArrayList (a Collection of Strings to return) to a boolean. How is that possible? Is there something I missed?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998198#3998198
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998198
More information about the jbossws-users
mailing list