Announcement Announcement Module
Collapse
No announcement yet.
Exception: WebServiceTransportException: Not Found [404] Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception: WebServiceTransportException: Not Found [404]

    Hi Everyone!

    I know others have experienced this issue for the different aspects each developer has surfaced, but I did not see an answer with regards to my scenario.

    I am using Spring-WS 1.5.2. I have created a contract first web service and it is running on Tomcat 6.0.16. I am using JDK 1.6.02. I am NOT using the JMS transport. I am supplying the defaultUri parameter to the methods.

    Code:
                 <bean id="messageSender" 
    	      class="org.springframework.ws.transport.http.CommonsHttpMessageSender">
    	</bean>
    	
    	<bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate">
    	   <property name="messageFactory">
    	      <bean class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory" />
    	   </property> 
    	   <property name="messageSender" ref="messageSender" />
    	</bean>
    	
    	
    	
    	<bean id="webServiceClient" 
    	      class="domain.my.metadata.webservice.client.WebServiceClient"
    	      init-method="createWebServiceRequest">
    	    <property name="defaultUri" value="http://localhost:8080/my_metadata_db/search/MyDocumentRetrievalService"/>
    	    <property name="path" value="./testdata/MySearchCriteriaRequest.xml"/>
    	    <property name="webServiceTemplate" ref="webServiceTemplate" />
    	</bean>
    I am following the guidance provided in the Spring-Web Service Reference documentation, paragraph 6.2.2.

    I have built the web service using the Spring In Action, chapter 9. I am able to get the WSDL running on Tomcat.

    When I attempt to call the web service:

    Code:
    org.springframework.ws.client.WebServiceTransportException: Not Found [404]
    	at org.springframework.ws.client.core.WebServiceTemplate.handleError(WebServiceTemplate.java:590)
    	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:514)
    	at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:465)
    	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:420)
    	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:366)
    	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:357)
    	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:347)
    	at domain.my.metadata.webservice.client.WebServiceClient.simpleSendAndReceive(WebServiceClient.java:49)
    	at domain.my.metadata.webservice.client.WebServiceClient.main(WebServiceClient.java:102)
    Any suggestions would be helpful at this point.



    Russ
    Last edited by russray; Jun 16th, 2008, 12:43 PM.

  • #2
    Just so everyone knows, I've double checked the URL. This is the same URL I am using in the WSDL for the address attribute within the <soap:address> element.

    <!-- http:// [server +: port]/[web content]/[servlet-mapping pattern]/[service name] -->

    Russ

    Comment


    • #3
      After reading through many of the messages on this forum, I found more information on how to determine what the Tomcat is sending back. I turned on TCP/IP Monitor and discovered the following information:

      Code:
      The requested resource () is not available
      Suggestions?

      Russ

      Comment


      • #4
        Looking at the following:

        Code:
        http://forum.springframework.org/showthread.php?t=49282
        I discovered:

        Code:
        No endpoint mapping found for [SaajSoapMessage {http://webservice.my.domain/schema}MySearchCriteriaRequest]
        I am guessing the MySearchCriteriaRequest.xml does not have the correct namespace.


        Russ

        Comment


        • #5
          Okay the two things I accomplished was change my payloadMapping settings and the namespace in the xsd and the request xml file. This got me pass the error! :-)

          Now I am failing on the server side with the endpointExceptionResolver displaying the defaultFault in the response.


          Code:
           org.springframework.ws.soap.client.SoapFaultClientException: Server error!
          	at org.springframework.ws.soap.client.core.SoapFaultMessageResolver.resolveFault(SoapFaultMessageResolver.java:37)
          	at org.springframework.ws.client.core.WebServiceTemplate.handleFault(WebServiceTemplate.java:699)
          	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:527)
          	at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:465)
          	at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:420)
          	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:366)
          	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:357)
          	at org.springframework.ws.client.core.WebServiceTemplate.sendSourceAndReceiveToResult(WebServiceTemplate.java:347)
          	at domain.my.metadata.webservice.client.WebServiceClient.simpleSendAndReceive(WebServiceClient.java:48)
          	at domain.my.metadata.webservice.client.WebServiceClient.main(WebServiceClient.java:103)
          I am not sure how to find Exception is causing this error so I can see the true fault.

          Suggestions?

          Russ

          Comment


          • #6
            Okay, next I turned on logging to the DEBUG level

            I discovered this:

            Code:
            " "[DEBUG]: Endpoint mapping [org.springframe[email protected]9f26c7] maps request to endpoint [[email protected]8]
            " "[DEBUG]: Testing endpoint adapter [org.sp[email protected]1349665]
            " "[DEBUG]: Endpoint invocation resulted in exception - responding with Fault
            " java.lang.IllegalArgumentException: No unmarshaller registered. Check configuration of endpoint.
            	at org.springframework.util.Assert.notNull(Assert.java:112)
            	at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.unmarshalRequest(AbstractMarshallingPayloadEndpoint.java:142)
            	at org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint.invoke(AbstractMarshallingPayloadEndpoint.java:129)
            	at org.springframework.ws.server.endpoint.adapter.MessageEndpointAdapter.invoke(MessageEndpointAdapter.java:41)
            	at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:221)
            	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:197)
            	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)
            	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:463)
            	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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
            	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
            	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:447)
            	at java.lang.Thread.run(Thread.java:619)
            "[DEBUG]: Successfully completed request
            " "[DEBUG]: Publishing event in context [o[email protected]1095c6c]: ServletRequestHandledEvent: url=[/my_metadata_db/search/MyDocumentRetrievalService]; client=[127.0.0.1]; method=[POST]; servlet=[MyDocumentRetrievalService]; session=[null]; user=[null]; time=[188ms]; status=[OK]
            " "[DEBUG]: Publishing event in context [o[email protected]db3331]: ServletRequestHandledEvent: url=[/my_metadata_db/search/MyDocumentRetrievalService]; client=[127.0.0.1]; method=[POST]; servlet=[MyDocumentRetrievalService]; session=[null]; user=[null]; time=[188ms]; status=[OK]
            "
            Russ

            Comment


            • #7
              You should configure a Marshaller and Unmarshaller on your subclass of AbstractMarshallingPayloadEndpoint.

              Comment


              • #8
                First of all, thank you!

                Once I added the marshaller and unmarshaller, I started receiving JaxbExceptions. I fixed the exceptions by adding the annotations in the Classes used in the request and response.

                I have it all working!


                Russ

                Comment


                • #9
                  debug logging takes forever to deploy

                  When I enable the DEBUG logging level it takes forever to deploy into Tomcat. How did you achieve this?

                  Comment


                  • #10
                    WebServiceTransportException:Not Found

                    Hi,

                    I am also facing same error. but not able to figure out. I have posted my sample application on below link. Please look into these and any help will be highly appreciable.

                    http://forum.springsource.org/showthread.php?t=103735

                    Comment

                    Working...
                    X