You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "stephan.lux" <st...@directline.de> on 2007/01/02 12:10:44 UTC

Re: Multiple processing of one soap call


stephan.lux wrote:
> 
> I had allready set the log level to DEBUG, but there are no error messages
> in the log file. When will the http consumer sends the response, after the
> retrieving or processing the message? 
> 
> Cheers 
> Stephan
> 
> 
> gnodet wrote:
>> 
>> The message may be delivered several times if the http provider
>> fails to receive a response and retry the http request.
>> This means that an error occurs when handling the http request.
>> Do you have a log output at debug level ?
>> 
>> On 12/29/06, stephan.lux <st...@directline.de> wrote:
>>>
>>> Hi,
>>>
>>> I have two assemblies with a http provider and a consumer deployed in
>>> servicemix 3.1 (snapshot from the 27th of december). The provider is
>>> sending
>>> a soap
>>>
>>> request to the consumer and the recipient is a servicemix-script
>>> endpoint.
>>> In the groovy script I print out the my own job id and perform a
>>> database
>>> update.
>>> If I start now one job, the id is printed four times in a period of some
>>> seconds. Then the provider throws the following exception:
>>>
>>> ERROR - HttpComponent                  - Error processing exchange
>>> InOnly[
>>>   id: ID:71011nrx-10708-1167387825729-14:0
>>>   status: Active
>>>   role: provider
>>>   service: {http://prototypes/servicemix/encashmentout}soapSender
>>>   endpoint: soapSender
>>>   in: <?xml version="1.0" encoding="UTF-8"?><tns:UpdateJob
>>> xmlns:tns="http://prototypes/servicemix/encashmentin/types"
>>> xmlns:env="ht
>>> tp://schemas.xmlsoap.org/soap/envelope/">
>>> <tns:jobId>7</tns:jobId>
>>> <tns:amount>169.22</tns:amount>
>>> </tns:UpdateJob>
>>> ]
>>> org.apache.commons.httpclient.NoHttpResponseException: The server
>>> 71011NRX
>>> failed to respond
>>>         at
>>> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1835)
>>>         at
>>> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
>>>         at
>>> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
>>>         at
>>> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
>>>         at
>>> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
>>>         at
>>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
>>>         at
>>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
>>>         at
>>> org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:168)
>>>         at
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
>>>         at
>>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
>>>         at
>>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
>>>         at
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
>>>         at
>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
>>>         at
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
>>>         at
>>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
>>>         at
>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
>>>         at
>>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
>>>         at java.lang.Thread.run(Thread.java:595)
>>>
>>> I have also tried to use localhost and/or 0.0.0.0. as servername. If I
>>> execute the webservice with the Msxml2.XMLHTTP http client I receive a
>>> status code
>>>
>>> 12029 as response. As I can remenber, with the servicemix 3.0 release I
>>> have
>>> received a 202 response...
>>>
>>> Here is my configuration of the http endpoints:
>>>         <http:endpoint  service="dlva:soapReceiver"
>>>                 endpoint="soap"
>>>                 role="consumer"
>>>                
>>> locationURI="http://${jbi.SoapConsumer.Server}:8192/EncashmentInService/"
>>>                 defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
>>>                 soap="true"
>>>                 wsdlResource="classpath:encashmentin.wsdl"
>>>                 soapAction="updateEncashmentJob">
>>>         </http:endpoint>
>>>         <http:endpoint service="dlva:soapSender"
>>>                 endpoint="soapSender"
>>>                 role="provider"
>>>                
>>> locationURI="http://${jbi.SoapProvider.Server}:8192/EncashmentInService/"
>>>                 wsdlResource="classpath:encashmentin.wsdl"
>>>                 soap="true"
>>>                 soapAction="updateEncashmentJob" />
>>>         </beans>
>>>
>>> Has anyone an idea why the message would be delivered more than one time
>>> and
>>> why the provider throws the exception even though the message was
>>> processed
>>> at
>>>
>>> the first time??? Do I have to set in the groovy script a kind of return
>>> code?
>>> Cheers,
>>> Stephan
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8088235
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -- 
>> Cheers,
>> Guillaume Nodet
>> 
>> 
> 

-- 
View this message in context: http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8122508
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Multiple processing of one soap call

Posted by Guillaume Nodet <gn...@gmail.com>.
Using exchange.setStatus(DONE) works, but you
have to also send the exchange back.  You could do:
   exchange.setStatus(DONE);
   exchangeHelper.sendExchange(exchange);

which is exactly the same than
   exchangeHelper.doneExchange(exchange);

On 1/2/07, stephan.lux <st...@directline.de> wrote:
>
>
> stephan.lux wrote:
> >
> > Oh, I have to use the exchangeHelper! I have tested before to set the done
> > state with exchange.setStatus(DONE) and this does not work.
> >
> > thanks
> > Stephan
> >
> >
> > gnodet wrote:
> >>
> >> If you receive an InOnly exchange, you need
> >> to send the exchange back with a DONE status.
> >>         exchangeHelper.doneExchange(exchange)
> >>
> >> If you receive an InOut exchange, you need to send
> >> back the response in the out message.
> >>              NormalizedMessage out = exchange.createMessage();
> >>         out.setContent(new StringSource("<world>hello</world>"));
> >>         exchange.setMessage(out, "out");
> >>         exchangeHelper.sendExchange(exchange);
> >>
> >>
> >> On 1/2/07, stephan.lux <st...@directline.de> wrote:
> >>>
> >>>
> >>> Ok, the receiver of the soap request is a groovy script, which has
> >>> implemented the ExchangeProcessor interface. Should I set something in
> >>> the
> >>> process method, that the http component sends the response?
> >>>
> >>>
> >>> gnodet wrote:
> >>> >
> >>> > The consumer will send the response after the message has been
> >>> > processed, so that it can report errors.
> >>> >
> >>> > On 1/2/07, stephan.lux <st...@directline.de> wrote:
> >>> >>
> >>> >>
> >>> >> stephan.lux wrote:
> >>> >> >
> >>> >> > I had allready set the log level to DEBUG, but there are no error
> >>> >> messages
> >>> >> > in the log file. When will the http consumer sends the response,
> >>> after
> >>> >> the
> >>> >> > retrieving or processing the message?
> >>> >> >
> >>> >> > Cheers
> >>> >> > Stephan
> >>> > --
> >>> > Cheers,
> >>> > Guillaume Nodet
> >>> >
> >>> >
> >>> </qoute>
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8123052
> >>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >> --
> >> Cheers,
> >> Guillaume Nodet
> >>
> >>
> >
>
> --
> View this message in context: http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8123224
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Multiple processing of one soap call

Posted by "stephan.lux" <st...@directline.de>.

stephan.lux wrote:
> 
> Oh, I have to use the exchangeHelper! I have tested before to set the done
> state with exchange.setStatus(DONE) and this does not work. 
> 
> thanks
> Stephan
> 
> 
> gnodet wrote:
>> 
>> If you receive an InOnly exchange, you need
>> to send the exchange back with a DONE status.
>>         exchangeHelper.doneExchange(exchange)
>> 
>> If you receive an InOut exchange, you need to send
>> back the response in the out message.
>>        	NormalizedMessage out = exchange.createMessage();
>>         out.setContent(new StringSource("<world>hello</world>"));
>>         exchange.setMessage(out, "out");
>>         exchangeHelper.sendExchange(exchange);    	
>> 
>> 
>> On 1/2/07, stephan.lux <st...@directline.de> wrote:
>>>
>>>
>>> Ok, the receiver of the soap request is a groovy script, which has
>>> implemented the ExchangeProcessor interface. Should I set something in
>>> the
>>> process method, that the http component sends the response?
>>>
>>>
>>> gnodet wrote:
>>> >
>>> > The consumer will send the response after the message has been
>>> > processed, so that it can report errors.
>>> >
>>> > On 1/2/07, stephan.lux <st...@directline.de> wrote:
>>> >>
>>> >>
>>> >> stephan.lux wrote:
>>> >> >
>>> >> > I had allready set the log level to DEBUG, but there are no error
>>> >> messages
>>> >> > in the log file. When will the http consumer sends the response,
>>> after
>>> >> the
>>> >> > retrieving or processing the message?
>>> >> >
>>> >> > Cheers
>>> >> > Stephan
>>> > --
>>> > Cheers,
>>> > Guillaume Nodet
>>> >
>>> >
>>> </qoute>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8123052
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -- 
>> Cheers,
>> Guillaume Nodet
>> 
>> 
> 

-- 
View this message in context: http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8123224
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Multiple processing of one soap call

Posted by Guillaume Nodet <gn...@gmail.com>.
If you receive an InOnly exchange, you need
to send the exchange back with a DONE status.
        exchangeHelper.doneExchange(exchange)

If you receive an InOut exchange, you need to send
back the response in the out message.
       	NormalizedMessage out = exchange.createMessage();
        out.setContent(new StringSource("<world>hello</world>"));
        exchange.setMessage(out, "out");
        exchangeHelper.sendExchange(exchange);    	


On 1/2/07, stephan.lux <st...@directline.de> wrote:
>
>
> Ok, the receiver of the soap request is a groovy script, which has
> implemented the ExchangeProcessor interface. Should I set something in the
> process method, that the http component sends the response?
>
>
> gnodet wrote:
> >
> > The consumer will send the response after the message has been
> > processed, so that it can report errors.
> >
> > On 1/2/07, stephan.lux <st...@directline.de> wrote:
> >>
> >>
> >> stephan.lux wrote:
> >> >
> >> > I had allready set the log level to DEBUG, but there are no error
> >> messages
> >> > in the log file. When will the http consumer sends the response, after
> >> the
> >> > retrieving or processing the message?
> >> >
> >> > Cheers
> >> > Stephan
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
> </qoute>
> --
> View this message in context: http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8123052
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Multiple processing of one soap call

Posted by "stephan.lux" <st...@directline.de>.

Ok, the receiver of the soap request is a groovy script, which has
implemented the ExchangeProcessor interface. Should I set something in the
process method, that the http component sends the response? 


gnodet wrote:
> 
> The consumer will send the response after the message has been
> processed, so that it can report errors.
> 
> On 1/2/07, stephan.lux <st...@directline.de> wrote:
>>
>>
>> stephan.lux wrote:
>> >
>> > I had allready set the log level to DEBUG, but there are no error
>> messages
>> > in the log file. When will the http consumer sends the response, after
>> the
>> > retrieving or processing the message?
>> >
>> > Cheers
>> > Stephan
> -- 
> Cheers,
> Guillaume Nodet
> 
> 
</qoute>
-- 
View this message in context: http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8123052
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Multiple processing of one soap call

Posted by Guillaume Nodet <gn...@gmail.com>.
The consumer will send the response after the message has been
processed, so that it can report errors.

On 1/2/07, stephan.lux <st...@directline.de> wrote:
>
>
> stephan.lux wrote:
> >
> > I had allready set the log level to DEBUG, but there are no error messages
> > in the log file. When will the http consumer sends the response, after the
> > retrieving or processing the message?
> >
> > Cheers
> > Stephan
> >
> >
> > gnodet wrote:
> >>
> >> The message may be delivered several times if the http provider
> >> fails to receive a response and retry the http request.
> >> This means that an error occurs when handling the http request.
> >> Do you have a log output at debug level ?
> >>
> >> On 12/29/06, stephan.lux <st...@directline.de> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I have two assemblies with a http provider and a consumer deployed in
> >>> servicemix 3.1 (snapshot from the 27th of december). The provider is
> >>> sending
> >>> a soap
> >>>
> >>> request to the consumer and the recipient is a servicemix-script
> >>> endpoint.
> >>> In the groovy script I print out the my own job id and perform a
> >>> database
> >>> update.
> >>> If I start now one job, the id is printed four times in a period of some
> >>> seconds. Then the provider throws the following exception:
> >>>
> >>> ERROR - HttpComponent                  - Error processing exchange
> >>> InOnly[
> >>>   id: ID:71011nrx-10708-1167387825729-14:0
> >>>   status: Active
> >>>   role: provider
> >>>   service: {http://prototypes/servicemix/encashmentout}soapSender
> >>>   endpoint: soapSender
> >>>   in: <?xml version="1.0" encoding="UTF-8"?><tns:UpdateJob
> >>> xmlns:tns="http://prototypes/servicemix/encashmentin/types"
> >>> xmlns:env="ht
> >>> tp://schemas.xmlsoap.org/soap/envelope/">
> >>> <tns:jobId>7</tns:jobId>
> >>> <tns:amount>169.22</tns:amount>
> >>> </tns:UpdateJob>
> >>> ]
> >>> org.apache.commons.httpclient.NoHttpResponseException: The server
> >>> 71011NRX
> >>> failed to respond
> >>>         at
> >>> org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1835)
> >>>         at
> >>> org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1590)
> >>>         at
> >>> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995)
> >>>         at
> >>> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
> >>>         at
> >>> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
> >>>         at
> >>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
> >>>         at
> >>> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> >>>         at
> >>> org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:168)
> >>>         at
> >>> org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
> >>>         at
> >>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
> >>>         at
> >>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
> >>>         at
> >>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
> >>>         at
> >>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
> >>>         at
> >>> org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
> >>>         at
> >>> org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
> >>>         at
> >>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
> >>>         at
> >>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
> >>>         at java.lang.Thread.run(Thread.java:595)
> >>>
> >>> I have also tried to use localhost and/or 0.0.0.0. as servername. If I
> >>> execute the webservice with the Msxml2.XMLHTTP http client I receive a
> >>> status code
> >>>
> >>> 12029 as response. As I can remenber, with the servicemix 3.0 release I
> >>> have
> >>> received a 202 response...
> >>>
> >>> Here is my configuration of the http endpoints:
> >>>         <http:endpoint  service="dlva:soapReceiver"
> >>>                 endpoint="soap"
> >>>                 role="consumer"
> >>>
> >>> locationURI="http://${jbi.SoapConsumer.Server}:8192/EncashmentInService/"
> >>>                 defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
> >>>                 soap="true"
> >>>                 wsdlResource="classpath:encashmentin.wsdl"
> >>>                 soapAction="updateEncashmentJob">
> >>>         </http:endpoint>
> >>>         <http:endpoint service="dlva:soapSender"
> >>>                 endpoint="soapSender"
> >>>                 role="provider"
> >>>
> >>> locationURI="http://${jbi.SoapProvider.Server}:8192/EncashmentInService/"
> >>>                 wsdlResource="classpath:encashmentin.wsdl"
> >>>                 soap="true"
> >>>                 soapAction="updateEncashmentJob" />
> >>>         </beans>
> >>>
> >>> Has anyone an idea why the message would be delivered more than one time
> >>> and
> >>> why the provider throws the exception even though the message was
> >>> processed
> >>> at
> >>>
> >>> the first time??? Do I have to set in the groovy script a kind of return
> >>> code?
> >>> Cheers,
> >>> Stephan
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8088235
> >>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >> --
> >> Cheers,
> >> Guillaume Nodet
> >>
> >>
> >
>
> --
> View this message in context: http://www.nabble.com/Multiple-processing-of-one-soap-call-tf2894993s12049.html#a8122508
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet