Results 1 to 10 of 19

Thread: WebServiceTransportException

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Posts
    4

    Default WebServiceTransportException

    I've followed the tutorial carefully and was able to access the WSDL from a browser. I'm building the client which seems very simple but the result ends in:

    <02.01 09:14:50> <SaajSoapMessageFactory.java:111> <Creating SAAJ 1.2 MessageFactory>
    Exception in thread "main" org.springframework.ws.client.WebServiceTransportE xception: Not Found [404]
    at org.springframework.ws.client.core.WebServiceTempl ate.handleError(WebServiceTemplate.java:483)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:407)
    at org.springframework.ws.client.core.WebServiceTempl ate.doSendAndReceive(WebServiceTemplate.java:358)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:304)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendSourceAndReceiveToResult(WebServiceTemplat e.java:289)
    at reservationClientSpring.clientTest.main(clientTest .java:17)

    This does not appear to be a classpath error and I have not been able to track down a cause (what isn't it finding?). The MessageFactory, MessageSender and DefaultUri are all being injected correctly (ie. wst is initialized). The following is the client code:

    private WebServiceTemplate wst = new WebServiceTemplate();

    public String call(String message) {
    StreamSource source = new StreamSource(new StringReader(message));
    StreamResult result = new StreamResult();
    wst.sendSourceAndReceiveToResult(source, result);
    return result.toString();
    }

    public void setDefaultUri(String defaultUri) { wst.setDefaultUri(defaultUri); }
    public void setMessageFactory(WebServiceMessageFactory messageFactory) { wst.setMessageFactory(messageFactory); }
    public void setMessageSender(WebServiceMessageSender messageSender) { wst.setMessageSender(messageSender); }

    I have tried both the SAAJ and Axiom message factories, the Spring and Jakarta message senders. The following are the config entries:

    <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMe ssageFactory" />

    <bean id="clientTest" class="reservationClientSpring.ClientTest">
    <property name="defaultUri" value="http://localhost:8080/reservationService"/>
    <property name="messageFactory" ref="messageFactory"/>
    <property name="messageSender">
    <bean class="org.springframework.ws.transport.http.HttpU rlConnectionMessageSender">
    <!-- <property name="url" value="http://localhost:8080/reservationService"/> -->
    </bean>
    </property>
    </bean>

    Interesting to note that the 'url' property resulted in an error (so I commented it out).
    Last edited by maneri; Feb 1st, 2008 at 03:36 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4

    Default No endpoint mapping found for [SaajSoapMessage statusRequest]

    I noticed this message from the service (as opposed to the client) which is leading me in a different direction. Even though 'statusRequest' exists the client does not seem to see it. I had my endpoint mapped as:

    <property name="mappings">
    <props>
    <prop key="{http://localhost:8080/reservationService}statusRequest">reservationEndpo int</prop>
    </props>
    </property>

    I also tried:

    <prop key="{http://localhost:8080/WEB-INF/shemas}statusRequest">reservationEndpoint</prop>

    but ended up using:

    <property name="defaultEndpoint" ref="reservationEndpoint"/>

    I'm not sure what the proper URI is supposed to be.
    Last edited by maneri; Feb 4th, 2008 at 10:29 AM.

  3. #3
    Join Date
    Mar 2008
    Posts
    2

    Default

    I'm getting a similar message. How does one debug this? What is not being found?



    org.springframework.ws.client.WebServiceTransportE xception: Not Found [404]
    at org.springframework.ws.client.core.WebServiceTempl ate.handleError(WebServiceTemplate.java:483)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:407)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 264)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 252)

  4. #4
    Join Date
    Jan 2008
    Posts
    4

    Default Debug

    There was no debug help, simply trial and error. I used the default mapping method which is acceptable for me (for now). The URI I'm using is http://localhost:8080/reservationService

  5. #5
    Join Date
    Mar 2008
    Posts
    2

    Default

    Our error turned out to be because the devloper was using global class variables to form the request object and send it. When I moved the global variables from the class level to the method the user of the client called to send the request, everything worked.

  6. #6
    Join Date
    Jan 2008
    Location
    Pisa, Italy
    Posts
    23

    Default org.springframework.ws.client.WebServiceTransportE xception: Not Found [404]

    Quote Originally Posted by OldSchoolio View Post
    Our error turned out to be because the devloper was using global class variables to form the request object and send it. When I moved the global variables from the class level to the method the user of the client called to send the request, everything worked.
    What?!? b

    I also have the same error and I don't know how to get through this!
    What did you do? I've no global variables... please, can you show me your code?

    Cheers,
    Ivan

  7. #7
    Join Date
    Jan 2008
    Location
    Pisa, Italy
    Posts
    23

    Default org.springframework.ws.client.WebServiceTransportE xception: Not Found [404]

    That's error is driving me crazy!
    It's the whole day I'm trying to get rid of this error:

    org.springframework.ws.client.WebServiceTransportE xception: Not Found [404]
    at org.springframework.ws.client.core.WebServiceTempl ate.handleError(WebServiceTemplate.java:475)
    at org.springframework.ws.client.core.WebServiceTempl ate.sendAndReceive(WebServiceTemplate.java:399)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 256)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 244)
    at org.springframework.ws.client.core.WebServiceTempl ate.marshalSendAndReceive(WebServiceTemplate.java: 236)
    at org.homelinux.elabor.nemo.webservice.NemoWebServic eClient.loadNetworkMap(NemoWebServiceClient.java:1 3)
    at org.homelinux.elabor.nemo.webservice.NemoWebServic eClientTestCase.testLoadNetworkMapClient(NemoWebSe rviceClientTestCase.java:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at junit.framework.TestCase.runTest(TestCase.java:164 )
    ............

    but I don't understand which is the problem!

    On the server side the wsdl is dynamically created and published correctly.
    But when I try to use my WebService I obtain that error above.
    It happens when I invoke the marshalSendAndReceive method of my client (that extends WebServiceGatewaySupport).

    I also checked the paylodMapping and it's ok...

    Where's the problem?!
    Please, help!

    Thank you anyway!
    Ivan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •