Announcement Announcement Module
Collapse
No announcement yet.
Inbound HTTP Web Service adapter? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I was going to suggest Service Activator until I read that you didn't think that fit your use-case. What is it that you do return in the reply? I guess it is just a fixed response?

    Comment


    • #17
      The response is dynamic. I think my problem with service activator was I didnt want it responsible for persisting the message. What I have now is a service activator dealing with the validation and save of users, creating and returning the response and putting a new message on a channel that links it to my outbound-channel-adapter for persisting the message. Sorted!

      Do you have any idea when 1.0.2 will be released?

      Comment


      • #18
        Originally posted by rhart View Post
        Do you have any idea when 1.0.2 will be released?
        We're aiming for next week. Other than this inbound WS support, the 2 main new features are inbound/outbound HTTP endpoints.

        Comment


        • #19
          Mark,

          I am implementing an example using the SimpleWebServiceInboundGateway. I've been able to receive messages on the web service endpoint, but I'm confused as to how to send a response to the client (referring to your comment below, it looks like the response can be easily set up). Can you help me out?

          Many Thanks,
          Bob

          Originally posted by Mark Fisher View Post
          Yes, the request/response will appear as normal to the client. The gateway handles request/reply over Spring Integration channels (typically with an anonymous reply channel), and the ultimate response Message will be sent to the client in the HTTP response.
          My configuration thus far:

          Code:
          	
          	<bean id="endpointMapping" class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
          		<property name="mappings">
          			<value>
          				{http\://www.cubrc.org/spring-ws-endpoint/schemas}TestRequest=simpleEndpoint
          			</value>
          		</property>
          	</bean>
          
          	<bean id="simpleEndpoint" class="org.springframework.integration.ws.SimpleWebServiceInboundGateway">
          		<property name="requestChannel" ref="wsRequestsChannel"/>
          	</bean>
          	
          	<int:channel id="wsRequestsChannel"/>
          
          	<!-- Consumer for the alert message handler -->
          	<bean id="incomingWsConsumer" class="org.springframework.integration.endpoint.EventDrivenConsumer">
          		<constructor-arg ref="wsRequestsChannel"/>
          		<constructor-arg ref="wsMessageHandler"/>
          	</bean>
          	
          	<bean id="wsMessageHandler" class="org.cubrc.examples.WsMessageHandler"/>
          	
          </beans>

          Comment


          • #20
            The problem is that your endpoint is incapable of sending a reply, the MessageHandler interface has one method handleMessage who's return type is void

            Code:
            package org.springframework.integration.message;
            
            import org.springframework.integration.core.Message;
            
            /**
             * Base interface for any component that handles Messages.
             * 
             * @author Mark Fisher
             */
            public interface MessageHandler {
            
            	void handleMessage(Message<?> message);
            
            }
            I used a service activator instead and returned a message from it.

            Comment


            • #21
              Originally posted by rganger View Post
              I am implementing an example using the SimpleWebServiceInboundGateway. I've been able to receive messages on the web service endpoint, but I'm confused as to how to send a response to the client (referring to your comment below, it looks like the response can be easily set up). Can you help me out?
              Thanks to all for your suggestions. I was able to successfully implement the web service endpoint using a service activator. It all makes sense and is very good. I see the spring-integration layer of the web service endpoint as being similar to the regular spring-ws way of implementing the endpoint, but adds an additional layer of abstraction to the message handling (transformers, routers, etc. could be used).

              Thanks,
              Bob

              Comment


              • #22
                I found a bug with the MarshallingWebServiceInboundGateway:

                http://jira.springframework.org/browse/INT-601

                Comment

                Working...
                X