Announcement Announcement Module
No announcement yet.
Error making up the response Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error making up the response


    Im having problems with my ws when the response is maked up. The request works fine, it calls to my service, and it founds good data.
    After that, Spring starts to make up the response and I have an exception:

    The exception is:

    2008-04-17 10:33:28,514 DEBUG [ ericMarshallingMethodEndpointAdapter] Marshalling [javax.xml.bind.JAXBElement@189e60f] to response payload
    2008-04-17 10:33:28,608 DEBUG [ atcher] Endpoint invocation resulted in exception - responding with Fault
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(
    at java.util.ArrayList.get(
    at Child(
    at org.apache.xml.serializer.TreeWalker.traverse(Tree
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(
    at gingInterceptor.logMessageSource(AbstractLoggingIn
    at gingInterceptor.handleResponse(AbstractLoggingInte
    at iggerHandleResponse(
    at spatch(

    I don`t know exactly what is wrong, because I copied the airlines sample.

    Part of my xsd is:

    <xs:element name="GetInfoUsuarioRequest" type="tns:Matricula"/>
    <xs:element name="GetInfoUsuarioResponse" type="tns:Usuario"/>
    <xs:element name="GetInfoGrupoRequest" type="xs:string"/>
    <xs:element name="GetInfoGrupoResponse" type="tns:Grupo"/>
    <xs:complexType name="Grupo">
    <xs:element name="dn" type="xs:string"/>
    <xs:element name="nombre" type="xs:string"/>
    <xs:element name="grupos" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="usuarios" type="tns:Matricula" minOccurs="0" maxOccurs="unbounded"/>
    <xs:complexType name="Usuario">
    <xs:element name="matricula" type="xs:string"/>
    <xs:element name="nombre" type="xs:string"/>
    <xs:element name="apellidos" type="xs:string"/>
    <xs:element name="telefono" type="tns:Extension"/>
    <xs:element name="mail" type="xs:string"/>
    <xs:element name="unidad" type="xs:string"/>
    <xs:element name="grupos" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>

    Parts of my beans declaration are:

    <bean id="marshallingEndpoint" class="">
    <constructor-arg ref="ldapService"/>
    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
    The JAXB 2 Marshaller is used by the endpoints.
    <property name="contextPath" value="es.cyii.ldap.schema"/>
    <bean class=" ter.PayloadEndpointAdapter">
    <!-- Fin de End Point -->

    <!-- End Point Mapping -->
    <bean class=" ing.PayloadRootAnnotationMethodEndpointMapping">
    <property name="interceptors">
    <bean class=" rceptor.PayloadLoggingInterceptor"/>
    <bean class=" .interceptor.PayloadValidatingInterceptor">
    <property name="schema" value="/WEB-INF/ldap.xsd"/>
    <property name="validateRequest" value="true"/>
    <property name="validateResponse" value="false"/>
    <property name="order" value="1"/>
    <!-- Fin de End Point Mapping -->

    <!-- End Point Adapters -->
    <bean class=" ter.GenericMarshallingMethodEndpointAdapter">
    This adapter allows for methods that need and returns marshalled objects. The MarshallingEndpoint
    uses JAXB 2 objects.
    <constructor-arg ref="marshaller"/>
    <!-- Fin de EndPoint Adapters -->

    We would appreciate very much any help, because this question is very urgent for us. If you need more information, or something
    is not very well expressed, please, ask me, and I give all the information I have.

    Thank you in advance,

  • #2
    It's in the FAQ.