Announcement Announcement Module
Collapse
No announcement yet.
ws-addressing replies to a new url but only synchronous, request completes after rely Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ws-addressing replies to a new url but only synchronous, request completes after rely

    Hi
    Hey we have search all over the net and can't find an answer please help. We use ws-addressing and can get it to reply to a new url but only in synchronous, requesting HTTP completes only after server relied to the new URL.

    To be precise...this is what currently happening
    1. Consumer starts a HTTP calls
    2. Consumer sends SOAP PO (purchase order) with ws-addressing to Provider
    3. Consumer waits for transport level code (e.g. HTTP 200)
    4. Provider receives a PO
    5. Provider processes the PO reply an ACK via RelyTo address (a different URL) to back to the consumer via a new HTTP connection
    6. Provider returns HTTP 200 to the original SOAP Request connection
    7. Communication ends

    If I bring down the "replyto" webservice server, the requesting http will be get timed out.

    This means the consumer is waiting for the reply to complete. From consumer point of view this is synchronous.

    This I expect to happen
    1. Consumer starts a HTTP calls
    2. Consumer sends SOAP PO (purchase order) with ws-addressing to Provider
    3. Consumer waits for transport level success code (e.g. HTTP 200)
    4. Provider receives a PO
    5. Provider returns transport level success code to Consumer. COMMUNICATION ENDS
    6. Provider process the PO create a SOAP reply ACK message
    7. Provider starts a new HTTP call to the consumer and send the SOAP reply
    8. Consumer return HTTP 200 code, communication ends

    I think we followed the spring documentation very well, and ws-addressing is obviously working partially as we are receiving Reply on a different server, but are we missing something in our configuration make the request asynchronous? Is this how spring behave?

    Thanks for your help in advance.
    Ray



    (--------------server configuration----------------)
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <bean id="actionEndpointMapping"
    class="org.springframework.ws.soap.addressing.serv er.SimpleActionEndpointMapping">
    <property name="postInterceptors">
    <list>
    <ref local="loggingInterceptor" />
    <!-- ref local="wsSecurityInterceptor" / -->
    <ref local="soapEnvelopeLoggingInterceptor" />
    </list>
    </property>
    <property name="mappings">
    <props>
    <prop key="purchaseorder">suppliersimEndpoint</prop>
    </props>
    </property>
    <property name="messageSenders">
    <list>
    <!--
    <bean
    class="org.springframework.ws.transport.http.Secur eMessageSender">
    <property name="keyStoreFile"
    value="classpath:supplier.p12" />
    <property name="keyStorePassword"
    value="xxx123" />
    <property name="trustStoreFile"
    value="classpath:supplier.p12" />
    <property name="trustStorePassword"
    value="xxx123" />
    </bean>
    -->
    <bean
    class="org.springframework.ws.transport.http.Commo nsHttpMessageSender">
    </bean>
    </list>
    </property>
    </bean>

    <bean id="wsSecurityInterceptor"
    class="org.springframework.ws.soap.security.xwss.X wsSecurityInterceptor">
    <property name="policyConfiguration"
    value="classpath:wss-suppliersim-config.xml" />
    <property name="callbackHandlers">
    <list>
    <!--
    <bean id="passwordValidationHandler"
    class="org.springframework.ws.soap.security.xwss.c allback.SimplePasswordValidationCallbackHandler">
    <property name="users">
    <props>
    <prop key="felix">felix</prop>
    </props>
    </property>
    </bean>
    -->
    <ref local="keyStoreHandler" />
    </list>
    </property>
    </bean>

    .....some keystore beans here but I've left out to make shorter read.....



    <bean id="loggingInterceptor"
    class="org.springframework.ws.server.endpoint.inte rceptor.PayloadLoggingInterceptor">
    <property name="logRequest" value="true" />
    <property name="logResponse" value="true" />
    </bean>

    <bean id="soapEnvelopeLoggingInterceptor"
    class="org.springframework.ws.soap.server.endpoint .interceptor.SoapEnvelopeLoggingInterceptor">
    </bean>

    <bean id="suppliersimEndpoint"
    class="com.sammy.suppliersim.ws.SupplierSimEndpoin t">
    <property name="suppliersimService" ref="suppliersimService" />
    </bean>

    <bean id="suppliersimService"
    class="com.sammy.suppliersim.service.impl.Supplier SimServiceImpl">
    </bean>
    </beans>

  • #2
    I posted a new thread on the same question it seems, sorry about that but I was more specific on the use of ws-addressing, and I didn't spot the only helpful response which itself was only newly added. (I have been browsing for an answer for weeks!)

    There was a workaround suggestion on the use client timed out. The problem with client time out that you can't distinguish the differences from a real communication/server error that resulted in a timeout. A genuine communication error of course can trigger a retry in an EAI application, which is what I am doing. So really, we need asynchronous support and have http 200 return immediate after a request is sent.

    Comment

    Working...
    X