Announcement Announcement Module
Collapse
No announcement yet.
How to test the Echo sample? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • benethridge
    started a topic How to test the Echo sample?

    How to test the Echo sample?

    This is probably going to be silly, but how do you run the Echo sample app?

    I have it cleanly war'd and deployed to tomcat, i.e. I see the:

    Spring-WS Echo
    If you see this page, the WAR deployment was successful.

    ...but I don't see a main method (in, say, EchoEndpointTest.java) or a jsp with which to kick off a test.

    Ben

  • cpires
    replied
    Problem solved, that was nothing related to XFire, just a little mistake. tks all.

    Leave a comment:


  • cpires
    replied
    Well, I decided to use XFire and now I can run the echo example and the client with no problem. I have another problem, this time with XFire. When my web services uses data of type hashtable I always have a similar problem of what was hapenning with spring-ws echo example.

    SoapUI:
    <html><head><title>Apache Tomcat/5.0.28 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: Error occured during request processing: null
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:757)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:658)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:392)
    org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:357)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    </pre></p><p><b>root cause</b> <pre>java.lang.StackOverflowError
    com.ctc.wstx.sr.BasicStreamReader.getAttributeValu e(BasicStreamReader.java:643)
    org.codehaus.xfire.util.stax.DepthXMLStreamReader. getAttributeValue(DepthXMLStreamReader.java:75)
    org.codehaus.xfire.util.stax.DepthXMLStreamReader. getAttributeValue(DepthXMLStreamReader.java:75)
    org.codehaus.xfire.aegis.stax.ElementReader.getAtt ributeReader(ElementReader.java:256)
    org.codehaus.xfire.aegis.type.basic.ObjectType.rea dObject(ObjectType.java:133)

    .... (a lot of repetitions of the same)....
    org.codehaus.xfire.aegis.type.basic.ObjectType.rea dObject(ObjectType.java:133)
    </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.0.28</h3></body></html>


    and </body> does not close tag <HR>

    Tomcat logs:

    2007-03-23 15:42:58,428 ERROR [org.springframework.web.servlet.DispatcherServlet] - Could not complete request
    javax.servlet.ServletException: Error occured during request processing: null
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:757)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:658)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:392)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:357)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invo keInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:619)


    I don't know why this happen. Should I open a new thread?

    If you want my code I can put it here

    Leave a comment:


  • cpires
    replied
    The right pane show me what is in the soapUI_answer.txt. In my tomcat logs I found this:

    StandardWrapperValve[spring-ws]: Servlet.service() for servlet spring-ws threw exception
    java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling() Lorg/w3c/dom/Node;
    at org.apache.xalan.transformer.TransformerIdentityIm pl.createResultContentHandler(TransformerIdentityI mpl.java:199)
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:329)
    at com.sun.xml.internal.messaging.saaj.util.transform .EfficientStreamingTransformer.transform(Efficient StreamingTransformer.java:390)
    at com.sun.xml.internal.messaging.saaj.soap.EnvelopeF actory.createEnvelope(EnvelopeFactory.java:102)
    at com.sun.xml.internal.messaging.saaj.soap.ver1_1.SO APPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1 Impl.java:71)
    at com.sun.xml.internal.messaging.saaj.soap.SOAPPartI mpl.getEnvelope(SOAPPartImpl.java:122)
    at org.springframework.ws.soap.saaj.Saaj13Implementat ion.getEnvelope(Saaj13Implementation.java:145)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etEnvelope(SaajSoapMessage.java:84)
    at org.springframework.ws.soap.AbstractSoapMessage.ge tSoapBody(AbstractSoapMessage.java:35)
    at org.springframework.ws.soap.AbstractSoapMessage.ge tPayloadSource(AbstractSoapMessage.java:49)
    at org.springframework.ws.server.endpoint.mapping.Pay loadRootQNameEndpointMapping.getMessagePayloadElem ent(PayloadRootQNameEndpointMapping.java:63)
    at org.springframework.ws.server.endpoint.mapping.Pay loadRootQNameEndpointMapping.resolveQName(PayloadR ootQNameEndpointMapping.java:56)
    at org.springframework.ws.server.endpoint.mapping.Abs tractQNameEndpointMapping.getLookupKeyForMessage(A bstractQNameEndpointMapping.java:32)
    at org.springframework.ws.server.endpoint.mapping.Abs tractMapBasedEndpointMapping.getEndpointInternal(A bstractMapBasedEndpointMapping.java:107)
    at org.springframework.ws.server.endpoint.mapping.Abs tractEndpointMapping.getEndpoint(AbstractEndpointM apping.java:86)
    at org.springframework.ws.server.MessageDispatcher.ge tEndpoint(MessageDispatcher.java:232)
    at org.springframework.ws.server.MessageDispatcher.di spatch(MessageDispatcher.java:185)
    at org.springframework.ws.server.MessageDispatcher.re ceive(MessageDispatcher.java:166)
    at org.springframework.ws.transport.support.WebServic eMessageReceiverObjectSupport.handle(WebServiceMes sageReceiverObjectSupport.java:78)
    at org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:60)
    at org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:125)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:360)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invo keInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invo keNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(Co yoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:619)

    Leave a comment:


  • Arjen Poutsma
    replied
    The response pane in soapUI (i.e. the right-hand pane) should show the response that the server gives you. In your case, this response consists of HTML (<HR> tags are HTML, not SOAP), so that typically means that you have an exception stack trace as well.

    What does the right-hand pane show? What is in your tomcat logs?

    Leave a comment:


  • cpires
    replied
    As when I try http://localhost:8080/echo/services I get

    javax.servlet.ServletException: Request method 'GET' not supported
    org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:64)
    org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:125)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)


    what should I do to run the client of the echo sample?

    I'm asking that because the applicationContext.xml of the client points to this url...

    <bean id="urlMessageSender" class="org.springframework.ws.transport.http.HttpU rlConnectionMessageSender">
    <property name="url" value="http://localhost:8080/echo/services"/>
    </bean>

    <bean id="commonsMessageSender" class="org.springframework.ws.transport.http.Commo nsHttpMessageSender">
    <property name="url" value="http://localhost:8080/echo/services"/>
    </bean>


    About the soapUI, it tells me that at line 32 </body> doesn't close tag <HR>. What this is supposed to mean?

    Leave a comment:


  • cpires
    replied
    I'm using tomcat as server and even after using soapUI, I don't know what to do

    Leave a comment:


  • Arjen Poutsma
    replied
    soapUI is a tool which allows you to see the request and response. The idea is that you give it a WSDL, and it will create default requests for you. You can then execute these requests (in the left-hand pane), and you will see the responses (in the right-side pane).

    Like I said before, it seems that your server gives back an (HTML) error stack trace, but the SAAJ client cannot handle that, so it gives back an exception. soapUI is basically a different client, which allows you to see what the response is. It's a good tool to test web services as well.

    Leave a comment:


  • cpires
    replied
    Originally posted by Arjen Poutsma View Post
    The first exception is actually expected behavior, because SOAP only supports POSTs, and every URL that is not 'echo.wsdl' will result in a soap call.

    The second exception seems to be related to the fact that the service is not returning a SOAP envelope, but HTML instead. You can use soapUI http://www.soapui.org to figure out what the server is returning. Just give it the WSDL url (http://localhost:8080/echo/echo.wsdl) and it's ready to go.
    what I'm supposed to do after the bold part? (sorry for the noob question)
    My objective is to run the echo client sample, so after using soapUI what I have to do?

    Leave a comment:


  • cpires
    replied
    Why is this happening with the sample? The sample is supposed to run with no problems...

    Leave a comment:


  • Arjen Poutsma
    replied
    The first exception is actually expected behavior, because SOAP only supports POSTs, and every URL that is not 'echo.wsdl' will result in a soap call.

    The second exception seems to be related to the fact that the service is not returning a SOAP envelope, but HTML instead. You can use soapUI http://www.soapui.org to figure out what the server is returning. Just give it the WSDL url (http://localhost:8080/echo/echo.wsdl) and it's ready to go.

    Leave a comment:


  • cpires
    replied
    Echo sample - problems

    I have some problems with the echo sample. 1st http://localhost:8080/echo/EchoService?wsdl and http://localhost:8080/echo/services throws this exception:


    javax.servlet.ServletException: Request method 'GET' not supported
    org.springframework.ws.transport.http.WebServiceMe ssageReceiverHandlerAdapter.handle(WebServiceMessa geReceiverHandlerAdapter.java:64)
    org.springframework.ws.transport.http.MessageDispa tcherServlet.doService(MessageDispatcherServlet.ja va:125)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)


    But http://localhost:8080/echo/echo.wsdl is ok.

    When I try the client I have this error:

    SEVERE: SAAJ0511: Unable to create envelope from given source
    Exception in thread "main" org.springframework.ws.soap.saaj.SaajSoapEnvelopeE xception: Could not access envelope: Unable to create envelope from given source: ; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionI mpl: Unable to create envelope from given source:
    Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionI mpl: Unable to create envelope from given source:
    at com.sun.xml.internal.messaging.saaj.soap.EnvelopeF actory.createEnvelope(EnvelopeFactory.java:114)
    at com.sun.xml.internal.messaging.saaj.soap.ver1_1.SO APPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1 Impl.java:71)
    at com.sun.xml.internal.messaging.saaj.soap.SOAPPartI mpl.getEnvelope(SOAPPartImpl.java:125)
    at org.springframework.ws.soap.saaj.Saaj13Implementat ion.getEnvelope(Saaj13Implementation.java:145)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etEnvelope(SaajSoapMessage.java:84)
    at org.springframework.ws.soap.AbstractSoapMessage.ge tSoapBody(AbstractSoapMessage.java:35)
    at org.springframework.ws.soap.AbstractSoapMessage.ha sFault(AbstractSoapMessage.java:63)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:200)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:173)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:151)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:145)
    at org.springframework.ws.samples.echo.client.sws.Ech oClient.echo(EchoClient.java:40)
    at org.springframework.ws.samples.echo.client.sws.Ech oClient.main(EchoClient.java:48)
    Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The element type "HR" must be terminated by the matching end-tag "</HR>".
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:501)
    at com.sun.xml.internal.messaging.saaj.util.transform .EfficientStreamingTransformer.transform(Efficient StreamingTransformer.java:390)
    at com.sun.xml.internal.messaging.saaj.soap.EnvelopeF actory.createEnvelope(EnvelopeFactory.java:102)
    ... 12 more
    Caused by: org.xml.sax.SAXParseException: The element type "HR" must be terminated by the matching end-tag "</HR>".
    at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1231)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserI mpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterI mpl.java:333)
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:484)
    ... 14 more

    CAUSE:

    javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The element type "HR" must be terminated by the matching end-tag "</HR>".
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:501)
    at com.sun.xml.internal.messaging.saaj.util.transform .EfficientStreamingTransformer.transform(Efficient StreamingTransformer.java:390)
    at com.sun.xml.internal.messaging.saaj.soap.EnvelopeF actory.createEnvelope(EnvelopeFactory.java:102)
    at com.sun.xml.internal.messaging.saaj.soap.ver1_1.SO APPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1 Impl.java:71)
    at com.sun.xml.internal.messaging.saaj.soap.SOAPPartI mpl.getEnvelope(SOAPPartImpl.java:125)
    at org.springframework.ws.soap.saaj.Saaj13Implementat ion.getEnvelope(Saaj13Implementation.java:145)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etEnvelope(SaajSoapMessage.java:84)
    at org.springframework.ws.soap.AbstractSoapMessage.ge tSoapBody(AbstractSoapMessage.java:35)
    at org.springframework.ws.soap.AbstractSoapMessage.ha sFault(AbstractSoapMessage.java:63)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:200)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:173)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:151)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:145)
    at org.springframework.ws.samples.echo.client.sws.Ech oClient.echo(EchoClient.java:40)
    at org.springframework.ws.samples.echo.client.sws.Ech oClient.main(EchoClient.java:48)
    Caused by: org.xml.sax.SAXParseException: The element type "HR" must be terminated by the matching end-tag "</HR>".
    at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1231)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserI mpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterI mpl.java:333)
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:484)
    ... 14 more
    ---------
    org.xml.sax.SAXParseException: The element type "HR" must be terminated by the matching end-tag "</HR>".
    at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(AbstractSAXParser.java:1231)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserI mpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterI mpl.java:333)
    at org.apache.xalan.transformer.TransformerIdentityIm pl.transform(TransformerIdentityImpl.java:484)
    at com.sun.xml.internal.messaging.saaj.util.transform .EfficientStreamingTransformer.transform(Efficient StreamingTransformer.java:390)
    at com.sun.xml.internal.messaging.saaj.soap.EnvelopeF actory.createEnvelope(EnvelopeFactory.java:102)
    at com.sun.xml.internal.messaging.saaj.soap.ver1_1.SO APPart1_1Impl.createEnvelopeFromSource(SOAPPart1_1 Impl.java:71)
    at com.sun.xml.internal.messaging.saaj.soap.SOAPPartI mpl.getEnvelope(SOAPPartImpl.java:125)
    at org.springframework.ws.soap.saaj.Saaj13Implementat ion.getEnvelope(Saaj13Implementation.java:145)
    at org.springframework.ws.soap.saaj.SaajSoapMessage.g etEnvelope(SaajSoapMessage.java:84)
    at org.springframework.ws.soap.AbstractSoapMessage.ge tSoapBody(AbstractSoapMessage.java:35)
    at org.springframework.ws.soap.AbstractSoapMessage.ha sFault(AbstractSoapMessage.java:63)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:200)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:173)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:151)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:145)
    at org.springframework.ws.samples.echo.client.sws.Ech oClient.echo(EchoClient.java:40)
    at org.springframework.ws.samples.echo.client.sws.Ech oClient.main(EchoClient.java:48)


    Any idea of what I can do to solve these problems?

    Leave a comment:


  • Arjen Poutsma
    replied
    I do use Xerces 2.8.1, but unfortunately you need to set some JDK properties to use it. See this issue for more info.

    Yes, XML parsing in Java is a pain .

    Cheers,

    Leave a comment:


  • xmichelle
    replied
    Michelle

    Thanks, Arjen.

    I did switch to xerces-2_8_1, but I get a different error, cvc-elt.1: Cannot find the declaration of element echo:Request. I google around, they said that it's a bug in xerces, and the work around is

    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    factory.setNamespaceAware(true);

    But I think the code in the Spring class, and I couldn't find where I can download the spring WS source code.

    Anyways, I took out the PayloadValidatingInterceptor, and it works since all the problems are related to validating xml. However, I wonder if you havn't encountered this problem, what version of xerces do you use? I tried anything lower than 2.8, it just breaks at start up. Thanks.

    Leave a comment:


  • Arjen Poutsma
    replied
    Do you get the error on the client, or on the server side?

    At any account, this seems like an XML parsing thingee. Try upgrading to the lates Xerces.

    Leave a comment:

Working...
X