Hello Vinod,

I am not sure that the error happens in the backend server. We fixed the
problem and then, I switched off the services on the backend server to
simulate the faulty environment. So, this time, I will receive this error:

TID: [-1234] [] [2018-01-30 09:11:40,150]  INFO
> {org.apache.axis2.transport.http.HTTPSender} -  Unable to sendViaGet to
> url[http://<HOST>:<PORT>/parameters/name/url.service.c
> orrespondence] {org.apache.axis2.transport.http.HTTPSender}
> java.net.ConnectException: Connexion refusée (Connection refused)
>

But, even if the property you suggested, the error is blocking and the
process is finished. And this is curious that the onError attribute defined
in the sequence element in my template is removed after deployement. Is is
impossible to define custom fault sequenceq in templates?

Regards,

Thomas



2018-01-30 7:24 GMT+01:00 Vinod Kavinda <[email protected]>:

> Hi Thomas,
> I believe this error is happening on the backend server. Then you can use
> the fire and forget pattern. Try adding following property, before making
> the service invocation.
> <property name="OUT_ONLY" value="true"/>
>
> Thanks,
> Vinod
>
> On Mon, Jan 29, 2018 at 8:30 PM, Thomas LEGRAND <
> [email protected]> wrote:
>
>> Hello,
>>
>> I have a template where I *Call* a *Address* mediator. However, during
>> the runtime, I have a network problem which causes it to explode with a
>> graceful java.net.NoRouteToHostException. Of course, I will have to fix
>> the network part but, in the same time, I would like to be able to continue
>> my process.
>>
>> My template is something like:
>>
>> <template name="getCommonConfigurationParameter" xmlns="
>>> http://ws.apache.org/ns/synapse";>
>>>     <parameter name="targetParamName"/>
>>>     <parameter name="paramToSetName"/>
>>>     <sequence onError="commonServiceFaultSequence"
>>> name="getCommonConfigurationParameterSequence">
>>>         <property description="uri.var.parameterRetrievalEndpoint"
>>> expression="fn:concat($ctx:commonConfigurationUrl, '/parameters/name/',
>>> $ctx:targetParamName)" name="uri.var.parameterRetrievalEndpoint"
>>> scope="default" type="STRING"/>
>>>         <property action="remove" description="remove REST_URL_POSTFIX"
>>> name="REST_URL_POSTFIX" scope="axis2"/>
>>>         <property action="remove" description="remove Accept"
>>> name="Accept" scope="transport"/>
>>>         <property name="HTTP_METHOD" scope="axis2" type="STRING"
>>> value="GET"/>
>>>         <call blocking="true">
>>>             <endpoint>
>>>                 <address uri="${uri.var.parameterRetrievalEndpoint}">
>>>                     <timeout>
>>>                         <duration>2</duration>
>>>                         <responseAction>fault</responseAction>
>>>                     </timeout>
>>>                 </address>
>>>             </endpoint>
>>>         </call>
>>>
>> </template>
>>>
>>
>> And my "recovery" sequence, named commonServiceFaultSequence , is like
>> that:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>> <sequence name="commonServiceFaultSequence" trace="disable" xmlns="
>>> http://ws.apache.org/ns/synapse";>
>>>     <log level="custom">
>>>         <property name="message" value="TEST"/>
>>>     </log>
>>> </sequence>
>>>
>>
>> Have you got any idea?
>>
>> Regards,
>>
>> Thomas
>>
>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Vinod Kavinda
> Senior Software Engineer
> *WSO2 Inc. - lean . enterprise . middleware <http://www.wso2.com>.*
> Mobile : +94 (0) 712 415544
> Blog : http://soatechflicks.blogspot.com/
> [image: http://wso2.com/signature]
> <http://wso2.com/signature>
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to