Announcement Announcement Module
Collapse
No announcement yet.
xpath endpoint expression not recognized Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • xpath endpoint expression not recognized

    I am getting this error when sending a request to this endpoint:
    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'endpointMapping' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: expression is required
    The expression property is there, the endpoint seems to be deployed correctly
    From the log:
    Code:
    2010-08-31 09:52:39,718 DEBUG [org.springframework.ws.server.endpoint.mapping.XPathPayloadEndpointMapping] - Mapped key [{http://localhost:8080/gstUsage}AddUsageDataRequest] onto endpoint [com.generatedsystems.ws.XPathGstUsageEndpoint@135d18b]
    The request:
    Code:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:gst="http://localhost:8080/gstUsage">
       <soapenv:Header/>
       <soapenv:Body>
          <gst:AddUsageDataRequest>
             <gst:usage>
                <gst:bank>BANKID</gst:bank>
                <gst:identifier>IDENTIFIER</gst:identifier>
                <gst:funct>INSTALL</gst:funct>
                <gst:usageTime>2010-08-14 10:00:00.090</gst:usageTime>
             </gst:usage>
          </gst:AddUsageDataRequest>
       </soapenv:Body>
    </soapenv:Envelope>
    spring-ws-servlet:

    Code:
    	<bean id="endpointMapping" class="org.springframework.ws.server.endpoint.mapping.XPathPayloadEndpointMapping">	
    		<property name="interceptors">
    			<bean id="loggingInterceptor" class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
    		</property>	
    		<property name="mappings">
    			<props>			
    				<prop key="{http://localhost:8080/gstUsage}AddUsageDataRequest">xPathGstUsageEndpoint</prop>			
    			</props>
    		</property>
    	</bean>
    Code:
    	<bean id="usageExpression" class="org.springframework.xml.xpath.XPathExpressionFactoryBean">
    		<property name="expression">
    		<value>//soapenv:Envelope/soapenv:Body/gst:AddDataUsageRequest/gst:usage</value>
    		</property>			  	
        		<property name="namespaces">
                <props>
    				<prop key="soapenv">http://schemas.xmlsoap.org/soap/envelope/</prop>            
                    <prop key="gst">http://localhost:8080/gstUsage</prop>
                </props>
            </property>  			 
    	</bean>
    	
    	<bean id="xPathGstUsageEndpoint" class="com.generatedsystems.ws.XPathGstUsageEndpoint">
    		<constructor-arg ref="usageExpression"/>
    	</bean>
    I thought that my xpath might be incorrect, but if I change the expression to be "//" then the error is about not being able to compile the xpath, so I don't think I'm even getting that far when I attempt to add the actual xpath expression, it seems for some reason that the specification of the expression property is not seen by spring for some reason?

    Thanks in advance for any assistance.
Working...
X