Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Web service call and JMS

  1. #11
    Join Date
    Jan 2013
    Posts
    8

    Default

    Hi,
    I'm still running into this issue and have been looking at removing the transformer and various options on the message to no avail. I'm guessing that the WebServiceTemplate is removing the details inside of TxService when converting to a SOAP message. Would you be able to point me in the direction where these log entries tally with the SI source so I can try and look though there?

    Code:
    2013-02-07 11:03:16,420 DEBUG [org.springframework.integration.ws.SimpleWebServiceOutboundGateway] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) org.springframework.integration.ws.SimpleWebServiceOutboundGateway#44a7b674 received message: [Payload=<*.client.TxService>
      <transactionId>15048875</transactionId>
      <amount>100.00</amount>
    </*.client.TxService>][Headers={timestamp=1360234996420, id=71b8a914-6a67-480a-a464-9f440439938b, history=txServiceSynchJmsIn,tx-service-fin-plat-request-channel,enricher,tx-service-fin-plat-post-head-enrich-request-channel, ws_soapAction=http://*/TxService/process, jms_timestamp=1360234997235, jms_redelivered=false, USER_NAME=higginsb, jms_correlationId=ID:JBM-6705dd05-eb0a-41b2-b885-01c87aa2eeb4, jms_replyTo=JBossQueue[txServiceResponseQueue], CONTEXT=TAX_SERVICE, jms_messageId=ID:JBM-6705dd05-eb0a-41b2-b885-01c87aa2eeb4}]
    2013-02-07 11:03:16,451 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) Opening [org.springframework.ws.transport.http.HttpUrlConnection@702cb3ab] to [http://jboss-i01:8180/FinancialPlatform/txService]
    2013-02-07 11:03:16,514 TRACE [org.springframework.ws.soap.saaj.support.SaajUtils] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) SOAPElement [org.jboss.ws.core.soap.SOAPEnvelopeImpl] implements SAAJ 1.3
    2013-02-07 11:03:16,545 TRACE [org.springframework.ws.soap.saaj.support.SaajUtils] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) SOAPElement [org.jboss.ws.core.soap.SOAPBodyImpl] implements SAAJ 1.3
    2013-02-07 11:03:16,545 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[history] WILL NOT be mapped
    2013-02-07 11:03:16,545 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[ws_soapAction] WILL be mapped, matched pattern=ws_soapAction
    2013-02-07 11:03:16,545 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_timestamp] WILL NOT be mapped
    2013-02-07 11:03:16,545 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_redelivered] WILL NOT be mapped
    2013-02-07 11:03:16,545 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[USER_NAME] WILL NOT be mapped
    2013-02-07 11:03:16,545 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_correlationId] WILL NOT be mapped
    2013-02-07 11:03:16,545 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_replyTo] WILL NOT be mapped
    2013-02-07 11:03:16,545 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[CONTEXT] WILL NOT be mapped
    2013-02-07 11:03:16,561 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_messageId] WILL NOT be mapped
    2013-02-07 11:03:16,561 TRACE [org.springframework.ws.client.MessageTracing.sent] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) Sent request [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><*.client.TxService/></env:Body></env:Envelope>]
    Thanks,
    Barry

  2. #12
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,037

    Default

    I see you sorted out your logging issues. Well, I am still struggling to understand why or how this behavior changes based on where the message originates. So, I combined the JMS and WS samples to simulate what you are doing, and all worked fine for me...

    Code:
    <jms:inbound-gateway id="jmsin"
                         request-destination="requestQueue"
                         request-channel="demoChannel"/>
    
    <channel id="demoChannel"/>
    
    <transformer input-channel="demoChannel" output-channel="fahrenheitChannel">
    	<int-groovy:script><![CDATA[
    			"<FahrenheitToCelsius xmlns=\"http://tempuri.org/\">" +
    			"    <Fahrenheit>90.0</Fahrenheit>" +
    			"</FahrenheitToCelsius>";
    		]]>
    	</int-groovy:script>
    </transformer>
    
    <channel id="fahrenheitChannel" />
    
    <chain input-channel="fahrenheitChannel">
    	<int-ws:header-enricher>
    		<int-ws:soap-action value="http://tempuri.org/FahrenheitToCelsius"/>
    	</int-ws:header-enricher>
    	<int-ws:outbound-gateway uri="http://www.w3schools.com/webservices/tempconvert.asmx"/>
    </chain>
    
    08:58:50.731 TRACE [org.springframework.jms.listener.DefaultMessageListenerContainer#0-1][org.springframework.ws.client.MessageTracing.sent] Sent request [<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><FahrenheitToCelsius xmlns="http://tempuri.org/">    <Fahrenheit>90.0</Fahrenheit></FahrenheitToCelsius></SOAP-ENV:Body></SOAP-ENV:Envelope>]
    That trace message comes out in WebServiceTemplate.sendRequest (line #613 in spring-ws 2.1.1).
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #13
    Join Date
    Jan 2013
    Posts
    8

    Default

    Thanks for getting back to me Gary,
    I appreciate you writing the snippet above. I plugged in your WS call into my call and am still seeing the same issue.

    Code:
    2013-02-07 16:00:26,429 DEBUG [org.springframework.integration.ws.SimpleWebServiceOutboundGateway] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) org.springframework.integration.ws.SimpleWebServiceOutboundGateway#5d053579 received message: [Payload=<FahrenheitToCelsius xmlns="http://tempuri.org/">    <Fahrenheit>90.0</Fahrenheit></FahrenheitToCelsius>][Headers={timestamp=1360252826429, id=d6c2e109-f378-4ec1-853a-804a41dd194b, history=taxServiceSynchJmsIn,tax-service-fin-plat-request-channel,enricher,tax-service-fin-plat-post-head-enrich-request-channel,fahrenheitChannel, ws_soapAction=http://tempuri.org/FahrenheitToCelsius, jms_timestamp=1360252792111, jms_redelivered=false, USER_NAME=higginsb, jms_correlationId=ID:JBM-179aeb96-7216-4a9e-bc21-e07f2dba5420, jms_replyTo=JBossQueue[taxServiceResponseQueue], CONTEXT=TAX_SERVICE, jms_messageId=ID:JBM-179aeb96-7216-4a9e-bc21-e07f2dba5420}]
    2013-02-07 16:00:26,461 DEBUG [org.springframework.ws.client.core.WebServiceTemplate] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) Opening [org.springframework.ws.transport.http.HttpUrlConnection@51028494] to [http://www.w3schools.com/webservices/tempconvert.asmx]
    2013-02-07 16:00:26,523 INFO  [org.quartz.plugins.history.LoggingTriggerHistoryPlugin] (transactionEngineScheduler_Worker-1) Trigger DEFAULT.transactionProcessingTrigger fired job DEFAULT.transactionProcessingDetail at: 
    					16:00:26 07/02/2013
    2013-02-07 16:00:26,648 INFO  [lu.scoteqint.messaging.transaction.engine.monitor.TransactionMonitor] (transactionEngineScheduler_Worker-1) Polling transaction queues every 1000ms for activity. Idle timeout = 60000 ,waiting...
    2013-02-07 16:00:26,663 TRACE [org.springframework.ws.soap.saaj.support.SaajUtils] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) SOAPElement [org.jboss.ws.core.soap.SOAPEnvelopeImpl] implements SAAJ 1.3
    2013-02-07 16:00:26,679 TRACE [org.springframework.ws.soap.saaj.support.SaajUtils] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) SOAPElement [org.jboss.ws.core.soap.SOAPBodyImpl] implements SAAJ 1.3
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[history] WILL NOT be mapped
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[ws_soapAction] WILL be mapped, matched pattern=ws_soapAction
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_timestamp] WILL NOT be mapped
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_redelivered] WILL NOT be mapped
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[USER_NAME] WILL NOT be mapped
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_correlationId] WILL NOT be mapped
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_replyTo] WILL NOT be mapped
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[CONTEXT] WILL NOT be mapped
    2013-02-07 16:00:26,695 DEBUG [org.springframework.integration.ws.DefaultSoapHeaderMapper] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) headerName=[jms_messageId] WILL NOT be mapped
    2013-02-07 16:00:26,710 TRACE [org.springframework.ws.client.MessageTracing.sent] (org.springframework.jms.listener.DefaultMessageListenerContainer#1-1) Sent request [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><FahrenheitToCelsius xmlns='http://tempuri.org/'/></env:Body></env:Envelope>]
    I guess I'll have to try and debug into this remotely. I appreciate you help.
    Barry

  4. #14
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,037

    Default

    Cool. In that case, I suspect the issue is with the JBoss SOAP implementation.

    If you set a breakpoint at line # 139 in SaajSoapMessageFactory, you'll see that, when running stand-alone, we get an instance of com.sun.xml.internal.messaging.saaj.soap.ver1_1.SO APMessageFactory1_1Impl from the JDK.

    The WebServiceTemplate simply delegates to the platform's SOAPMessageFactory to create the SOAPMessage so it looks like the JBoss implementation is dropping the content for some reason.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  5. #15
    Join Date
    Jan 2009
    Location
    Ukraine, Kharkov
    Posts
    645

    Default

    Hi all!

    I suspect the issue is with the JBoss SOAP implementation.
    Some time ago I caught similar issue in the IBM WAS, although it worked on JBOSS good.
    Switching to org.springframework.ws.soap.axiom.AxiomSoapMessage Factory fixed all problems!

    HTH,
    Artem

  6. #16
    Join Date
    Jan 2013
    Posts
    8

    Default

    Thank you both,
    The issue was indeed with the message factory one I defined the new message bean

    Code:
        <beans:bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
            <beans:property name="messageFactory">
                <beans:bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"/>
            </beans:property>
        </beans:bean>
    and set it on the ws gateway the SOAP message was formed correctly.
    Cheers,
    Barry

Posting Permissions

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