Hi.
I’m having trouble making a call to a web service using spring-ws.
I have created a service which is working on a Tomcat server with the following setup...
Web.xml
Spring-ws-servlet.xmlCode:<servlet> <servlet-name>spring-ws</servlet-name> <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>spring-ws</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping>
When using the Eclipse Web Service Explorer to test the service, the status outputs the following when directing it towards the wsdl.Code:<bean id="getConfig" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> <property name="schema" ref="getConfigSchema"/> <property name="portTypeName" value="Configuration"/> <property name="locationUri" value="https://XXX.YYY.ZZZ:1234/services/ConfigService"/> </bean> <bean id="getConfigSchema" class="org.springframework.xml.xsd.SimpleXsdSchema"> <property name="xsd" value="classpath:/XSD/XXXYYYZZZZ.xsd"/> </bean>
I can then send and receive message through the webservice without any trouble.Code:IWAB0380E Errors were encountered while validating XML schemas. XSD: The location ‘XXXYYYZZZZ.xsd' has not been resolved XSD: Attribute group reference 'http://XXX/YYY/ZZZ#MessageAttributes' is unresolved XSD: Type reference 'http://XXX/YYY/ZZZ#Status' is unresolved XSD: Attribute group reference 'http://XXX/YYY/ZZZ#MessageAttributes' is unresolved XSD: Type reference 'http://XXX/YYY/ZZZ#Status' is unresolved IWAB0381I http://111.222.333.444:8080/DFAWebservices/services/getConfig.wsdl was successfully opened.
However, when trying to invoke a service using spring, I continually receive the following output...
Using Wireshark to monitor the network traffic while the request takes place, I get a 405 error when the service tries to access http ://111.222.333.444:8080/DFAWebservices/services/XXXYYYZZZZ.xsd which I assume is the cause of the IOException and the first error when registering the wsdl with Eclipse WSE. The problem here is that the xsd file is obviously not available at this location, so I need to know how I can change this and subsequently eliminate this problem.Code:org.apache.cxf.phase.PhaseInterceptorChain doIntercept INFO: Interceptor has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:221) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178) at $Proxy57.getConfig(Unknown Source) at uk.org.barnardos.contactpoint.datafeedagent.TestWS.testService(TestWS.java:75) at uk.org.barnardos.contactpoint.datafeedagent.TestWS.main(TestWS.java:106) Caused by: java.io.IOException: Not Found at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1929) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1832) at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47) at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:159) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:591) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) ... 8 more
Any help would be very gratefully received.
Thanks in advance.
Dave.


Reply With Quote
