0 Replies Latest reply on Jun 29, 2007 6:11 AM by keerthi b

    problem with web method  returning list

    keerthi b Newbie

      hi
      I am exposing ejb components as webservice.Initially i exposed one method as web method,that returns String.This works fine.Next i tried another method which returns array of objects.This leads to following error....

      Caused by: 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.SAAJElementWriter.printSOAPElement(SAAJElementWriter.java:91)
      at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:280)
      ... 25 more
      Caused by: 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.xb.binding.SimpleTypeBindings.marshal(SimpleTypeBindings.java:1120)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalCharacters(MarshallerImpl.java:995)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalSimpleType(MarshallerImpl.java:471)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementType(MarshallerImpl.java:415)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElement(MarshallerImpl.java:331)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementOccurence(MarshallerImpl.java:311)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:730)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroupSequence(MarshallerImpl.java:920)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroup(MarshallerImpl.java:860)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:641)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalComplexType(MarshallerImpl.java:608)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementType(MarshallerImpl.java:419)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElement(MarshallerImpl.java:331)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementOccurence(MarshallerImpl.java:311)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshallInternal(MarshallerImpl.java:210)
      at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshal(MarshallerImpl.java:168)
      at org.jboss.ws.jaxb.JBossXBMarshallerImpl.marshal(JBossXBMarshallerImpl.java:146)
      at org.jboss.ws.jaxrpc.encoding.JAXBSerializer.serialize(JAXBSerializer.java:107)
      at org.jboss.ws.soap.SOAPContentElement.getXMLFragment(SOAPContentElement.java:157)
      at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:817)
      at org.jboss.ws.soap.SOAPContentElement.handleMTOMTransitions(SOAPContentElement.java:1015)
      at org.jboss.ws.soap.SOAPContentElement.write(SOAPContentElement.java:968)
      ... 33 more


      could any body tell me what went wrong?

      in the wsdl doc,


      -





      its taking type as boolean but actaully it should be of type list....


      i dont know where i went wrong....please anybody help me