Announcement Announcement Module
Collapse
No announcement yet.
Soap response validation errors after update to 1.5.7 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Soap response validation errors after update to 1.5.7

    Hi guys and gals,

    I upgraded to the latest Spring WS release 1.5.7 and started seeing errors during response validation. When I noticed I also updated to Axiom 1.2.8 but that didn't help.

    As a workaround I can turn response validation off, or stay with 1.5.6.

    Here is the definition of my Interceptor
    Code:
    	<bean
    		class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
    		<description>
    			Detects @PayloadRoot annotations on @Endpoint bean methods.
    			All Endpoints have such annotations. It uses two
    			interceptors: one that logs the message payload, and the
    			other validates it accoring to the 'codexws.xsd' schema
    			file.
    		</description>
    		<property name="interceptors">
    			<list>
    				<!-- bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/-->
    				<bean
    					class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">
    					<property name="schema"
    						value="/WEB-INF/xsd/codexws.xsd" />
    					<property name="validateRequest" value="true" />
    					<property name="validateResponse" value="true" />
    				</bean>
    			</list>
    		</property>
    		<property name="order" value="1" />
    	</bean>
    Here is the error:
    Code:
    11:15:33,561 INFO  [STDOUT] 2009-05-22 11:15:33,559 DEBUG [org.springframework.ws.soap.server.endpoint.SoapFaultAnnotationExceptionResolver] - Resolving exception from endpoint [public javax.xml.transform.Source com.adobe.codex.ws.MetadataKeyServiceEndpoint.getMetadataKeys(java.lang.String) throws java.lang.Exception]: java.lang.ArrayIndexOutOfBoundsException: -1
    11:15:33,563 INFO  [STDOUT] 2009-05-22 11:15:33,563 DEBUG [org.springframework.ws.soap.server.endpoint.SoapFaultMappingExceptionResolver] - Resolving exception from endpoint [public javax.xml.transform.Source com.adobe.codex.ws.MetadataKeyServiceEndpoint.getMetadataKeys(java.lang.String) throws java.lang.Exception]: java.lang.ArrayIndexOutOfBoundsException: -1
    11:15:33,575 INFO  [STDOUT] 2009-05-22 11:15:33,574 DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint invocation resulted in exception - responding with Fault
    java.lang.ArrayIndexOutOfBoundsException: -1
    	at com.sun.org.apache.xerces.internal.util.NamespaceSupport.popContext(NamespaceSupport.java:184)
    	at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.endPrefixMapping(ValidatorHandlerImpl.java:373)
    	at org.springframework.xml.stream.StaxStreamXmlReader.handleEndElement(StaxStreamXmlReader.java:186)
    	at org.springframework.xml.stream.StaxStreamXmlReader.parseInternal(StaxStreamXmlReader.java:85)
    	at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:128)
    	at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:111)
    	at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.process(ValidatorImpl.java:192)
    	at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:147)
    	at javax.xml.validation.Validator.validate(Validator.java:82)
    	at org.springframework.xml.validation.Jaxp13ValidatorFactory$Jaxp13Validator.validate(Jaxp13ValidatorFactory.java:61)
    	at org.springframework.ws.server.endpoint.interceptor.AbstractValidatingInterceptor.handleResponse(AbstractValidatingInterceptor.java:216)
    	at org.springframework.ws.server.MessageDispatcher.triggerHandleResponse(MessageDispatcher.java:347)
    	at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:224)
    	at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:168)
    	at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
    	at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
    	at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:230)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    	at java.lang.Thread.run(Thread.java:613)
    Here is my message factory:
    Code:
    	<bean id="messageFactory"
    		class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
    		<property name="payloadCaching" value="true" />
    		<property name="attachmentCacheDir" value="/tmp"></property>
    	</bean>
    The response is fairly large, but not huge. Its 10k / 268lines of XML.


    I have the feeling this is a bug. Should I file a Jira issue?

    Thanks

    Jacques

  • #2
    Here is a shortened sample of the response that fails to be validated. To get the original size of the resonse just add more metadata-key nodes until the file is about 270 lines.

    The complete response is too long to post, and when I try to attch it as file to this post I get an error that says invalid file.

    Code:
    <?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
        <soapenv:Body>
            <GetMetadataKeysResponse xmlns="http://codex.corp.obade.com/codex/schemas">
                <metadatakeylist>
                    <metadatakey>
                        <id>15</id>
                        <key>Jmeter</key>
                        <constraints>
                            <productlist/>
                            <versionlist/>
                            <subproductlist/>
                            <platformlist/>
                            <compilertargetlist/>
                            <licensemodellist/>
                            <formatlist/>
                            <certificationlevellist/>
                            <statuslist/>
                            <languagelist/>
                            <dateconstraint/>
                        </constraints>
                    </metadatakey>
                    <metadatakey>
                        <id>92</id>
                        <key>InScopeKey_4</key>
                        <constraints>
                            <productlist/>
                            <versionlist/>
                            <subproductlist/>
                            <platformlist/>
                            <compilertargetlist/>
                            <licensemodellist/>
                            <formatlist/>
                            <certificationlevellist/>
                            <statuslist/>
                            <languagelist/>
                            <dateconstraint/>
                        </constraints>
                    </metadatakey>
                    <metadatakey>
                        <id>102</id>
                        <key>GenericMetadata_02</key>
                        <constraints>
                            <productlist/>
                            <versionlist/>
                            <subproductlist/>
                            <platformlist/>
                            <compilertargetlist/>
                            <licensemodellist/>
                            <formatlist/>
                            <certificationlevellist/>
                            <statuslist/>
                            <languagelist/>
                            <dateconstraint/>
                        </constraints>
                    </metadatakey>
    
                </metadatakeylist>
                <performancedata>
                    <response>4547</response>
                    <meanresponse>7525.500</meanresponse>
                </performancedata>
            </GetMetadataKeysResponse>
        </soapenv:Body>
    </soapenv:Envelope>

    Comment


    • #3
      Yes please, create a Jira issue.

      Comment


      • #4
        created issue SWS-517.

        Comment


        • #5
          Time frame on this

          I am having the same issue. How would I find out about a time frame for correction?

          Comment


          • #6
            It should be fixed in SpringWS 1.5.8 - I verified a fix with Arjen with a 1.5.8 snapshot.

            Comment

            Working...
            X