Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-337

WebServiceTemplate problem when invoking oneway style services with marshalSendAndReceive

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5.1
    • Component/s: Core
    • Labels:
      None

      Description

      With version 1.5 is now possible for oneway style services configure an endpoint bean in spring-ws-servlet.xml with only an unmarshaller as it doesn't request an unmarshaller.
      The problem is that in WebServiceTemplate using marshalSendAndReceive configuration of a marshaller is stilI required why it should be optional to cleanly support this kind of services.

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        If you specify a requestPayload on the marshalSendAndReceive() method, a Marshaller is required. If you pass null, it is not.

        See http://static.springframework.org/spring-ws/site/xref/org/springframework/ws/client/core/WebServiceTemplate.html#292

        Show
        arjen.poutsma Arjen Poutsma added a comment - If you specify a requestPayload on the marshalSendAndReceive() method, a Marshaller is required. If you pass null, it is not. See http://static.springframework.org/spring-ws/site/xref/org/springframework/ws/client/core/WebServiceTemplate.html#292
        Hide
        montebove Luciano Montebove added a comment -

        Sorry, I generated a mistake with the problem description:
        The problem is not the marshaller, as I will always use a requestPaylod in a oneway service (i.e. an event notification), but the unmarshaller.
        I don't want to specify an unmarshaller in WebServiceTemplate for a service that will return only an HTTP 200 code as a response.

        Show
        montebove Luciano Montebove added a comment - Sorry, I generated a mistake with the problem description: The problem is not the marshaller, as I will always use a requestPaylod in a oneway service (i.e. an event notification), but the unmarshaller. I don't want to specify an unmarshaller in WebServiceTemplate for a service that will return only an HTTP 200 code as a response.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Ok, that explains it. Reopening.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Ok, that explains it. Reopening.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I've written some additional unit tests, and I still can't reproduce this. An unmarshaller is only required when there is a response (indicated by a content-length > 0).

        Show
        arjen.poutsma Arjen Poutsma added a comment - I've written some additional unit tests, and I still can't reproduce this. An unmarshaller is only required when there is a response (indicated by a content-length > 0).
        Hide
        montebove Luciano Montebove added a comment -

        You are right.
        I discovered, the problem was on my side.I invoked the oneway service through a custom Web Service Proxy that generates a default "OK result" soap body for oneway service (I don't know why).
        I must pay more attention before opening an issue

        Show
        montebove Luciano Montebove added a comment - You are right. I discovered, the problem was on my side.I invoked the oneway service through a custom Web Service Proxy that generates a default "OK result" soap body for oneway service (I don't know why). I must pay more attention before opening an issue
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing issues for 1.5.1

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing issues for 1.5.1

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            montebove Luciano Montebove
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: