Hi,

I am trying to run spring-ws echo sample client program. I am able to view the wsdl file (http://localhost:9080/springws/echo/services/echo.wsdl) and my wsdl file looks like

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:schema="http://localhost:9080/springws/echo" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://localhost:9080/springws/echo">
- <wsdl:types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://localhost:9080/springws/echo" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://localhost:9080/springws/echo">
- <element name="echoRequest">
- <simpleType>
- <restriction base="string">
<pattern value="([A-Z]|[a-z])+" />
</restriction>
</simpleType>
</element>
<element name="echoResponse" type="string" />
</schema>
</wsdl:types>
- <wsdl:message name="echoResponse">
<wsdl:part element="schema:echoResponse" name="echoResponse" />
</wsdl:message>
- <wsdl:message name="echoRequest">
<wsdl:part element="schema:echoRequest" name="echoRequest" />
</wsdl:message>
- <wsdl:portType name="Echo">
- <wsdl:operation name="echo">
<wsdl:input message="schema:echoRequest" name="echoRequest" />
<wsdl:output message="schema:echoResponse" name="echoResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="EchoBinding" type="schema:Echo">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="echo">
<soap:operation soapAction="" />
- <wsdl:input name="echoRequest">
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output name="echoResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="EchoService">
- <wsdl:port binding="schema:EchoBinding" name="EchoPort">
<soap:address location="http://localhost:9080/springws/echo/services" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

But when i am trying to access the spring-ws i am getting error:

[4/10/08 10:09:50:888 EDT] 00000023 ServletWrappe A SRVE0242I: [IRISWS] [/springws] [spring-ws]: Initialization successful.
[4/10/08 10:09:50:903 EDT] 00000023 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet spring-ws. Exception thrown : org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is java.lang.NoSuchMethodError: java/util/Collections.emptyList()Ljava/util/List;
Caused by: java.lang.NoSuchMethodError: java/util/Collections.emptyList()Ljava/util/List;
at com.sun.xml.messaging.saaj.soap.MessageImpl.<clini t>(MessageImpl.java:755)
at java.lang.Class.initializeImpl(Native Method)
at java.lang.Class.initialize(Class.java:345)
at com.sun.xml.messaging.saaj.soap.MessageFactoryImpl .createMessage(MessageFactoryImpl.java:81)
at org.springframework.ws.soap.saaj.SaajSoapMessageFa ctory.createWebServiceMessage(SaajSoapMessageFacto ry.java:164)
at org.springframework.ws.transport.AbstractWebServic eConnection.receive(AbstractWebServiceConnection.j ava:53)
at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handleConnection(Web ServiceMessageReceiverObjectSupport.java:86)
at org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:57)
at org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:197)
at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:475)
at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:440)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:762)
at com.ibm.ws.webcontainer.webapp.WebApp.handleReques t(WebApp.java:3071)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequ est(WebGroup.java:236)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest( VirtualHost.java:210)
at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:1958)
at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:89)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.ready(HttpInboundLink.java:288)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.sendToDiscriminaters(NewConnectionIniti alReadCallback.java:207)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.complete(NewConnectionInitialReadCallba ck.java:109)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.reque stComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attem ptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.worke rRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worke r.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1471)

my applicationContext.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

<bean id="echoClient" class="com.jpmc.echo.client.EchoClient">
<property name="defaultUri" value="http://localhost:9080/springws/echo/services"/>
<property name="request" value="classpath:com/jpmc/echo/client/echo.xml"/>
</bean>

</beans>

echo.xml

<?xml version="1.0" encoding="UTF-8"?>
<echoRequest xmlns="http://localhost:9080/springws/echo/service">Hello</echoRequest>

and echoClient program is:

public class EchoClient extends WebServiceGatewaySupport {

private Resource request;

public void setRequest(Resource request) {
this.request = request;
}

public void echo() throws IOException {
System.out.println("inside echo method");
Source requestSource = new ResourceSource(request);
System.out.println("requestSource==>"+requestSourc e);
StringResult result = new StringResult();
getWebServiceTemplate().sendSourceAndReceiveToResu lt(requestSource, result);
System.out.println(result);
}

public static void main(String[] args) throws IOException {
ApplicationContext applicationContext =
new ClassPathXmlApplicationContext("applicationContext .xml", EchoClient.class);
EchoClient echoClient = (EchoClient) applicationContext.getBean("echoClient");
echoClient.echo();
}

}


Does any one has idea why i am getting the above error?

Thanks!