I attached to this mail my synapse configuration. Actually I am replacing the
To header by the Reply-To header as shown in the sample:
<header name="To" expression="get-property('ReplyTo')"/>
I removed this configuration line and this exception is no longer thrown. The
client receives the error message. So what is the purpose of this config line ?
The only remaining exception is :
der] WARN FaultHandler Fault handler - setting ERROR_MESSAGE :
java.net.ConnectException: Connection refused
2007-11-27 14:05:32,939 [127.0.0.1-localhost.localdomain] [HttpCoreNIOSender]
WARN FaultHandler Fault handler - setting ERROR_DETAIL : java.lang.Exception:
<soapenv:Fault
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soapenv:Server</faultcode><faultstring>java.net.ConnectException:
Connection refused</faultstring><detail /></soapenv:Fault>
....
Is it normal ?
Sihem
---------------------------------
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail <!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<definitions xmlns="http://ws.apache.org/ns/synapse">
<!-- define a string resource entry to the local registry -->
<localEntry key="sec_policy" src="file:repository/conf/sample/resources/policy/policy_3.xml"/>
<localEntry key="version">0.1</localEntry>
<localEntry key="validate_schema" src="file:repository/conf/sample/resources/proxy/CalculatorWSService_schema1.xsd"/>
<proxy name="CalculatorProxy" transports="http">
<log level="full"/>
<target inSequence="in" outSequence="out"/>
<publishWSDL uri="file:repository/conf/sample/resources/proxy/CalculatorWSService.wsdl"/>
<!-- proxy service expects to receive a signed and encrypted message as specified by the security policy -->
<!--<policy key="sec_policy"/>
<enableSec/>-->
</proxy>
<sequence name="out" onError="fault">
<log level="full">
<property name="message" expression="get-property('To')"/>
</log>
<class name="synapse.SampleMediator"/>
<header name="wsse:Security" action="remove"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
<send/>
</sequence>
<sequence name="fault">
<log level="full">
<property name="text" value="An unexpected error occured"/>
<property name="message" expression="get-property('ERROR_MESSAGE')"/>
</log>
<drop/>
</sequence>
<sequence name="myFaultHandler">
<log level="full"/>
<makefault>
<code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
<reason expression="get-property('ERROR_MESSAGE')"/>
</makefault>
<property name="RESPONSE" value="true"/>
<header name="To" expression="get-property('ReplyTo')"/>
<send/>
</sequence>
<sequence name="in" onError="myFaultHandler">
<!-- remove the wsse:Security header from the outgoing message. -->
<header name="wsse:Security" action="remove" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
<!-- filtering of messages with XPath and regex matches -->
<filter source="get-property('To')" regex=".*/Calculator.*">
<validate>
<schema key="validate_schema"/>
<on-fail>
<!-- if the request does not validate againt schema throw a fault -->
<makefault>
<code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
<reason value="Invalid custom quote request"/>
</makefault>
<property name="RESPONSE" value="true"/>
<header name="To" expression="get-property('ReplyTo')"/>
</on-fail>
</validate>
<switch source="//m0:multiply/m0:i" xmlns:m0="http://calculator.me.org/">
<case regex="10">
<!-- the property mediator sets a local property on the *current* message -->
<property name="i" value="22"/>
</case>
<case regex="20">
<property name="i" value="33"/>
</case>
<default>
<!-- it is possible to assign the result of an XPath expression as well -->
<property name="i" value="44"/>
</default>
</switch>
<log level="full">
<property name="i" expression="get-property('i')"/>
<property name="VERSION" expression="get-property('version')"/>
</log>
<!-- SEND MESSAGE TO ONE OF THIS ENDPOINT -->
<send>
<!-- DEFINE ENDPOINTS -->
<endpoint>
<!-- CONFIG FAILOVER -->
<failover>
<!-- SERVER1 -->
<endpoint name="secure1">
<address uri="http://bogus:8080/CalculatorWSApplication/CalculatorWS">
<enableAddressing/>
<suspendDurationOnFailure>60</suspendDurationOnFailure>
<timeout>
<duration>60</duration>
<action>fault</action>
</timeout>
</address>
</endpoint>
<!-- SERVER2 -->
<endpoint name="secure2">
<address uri="http://localhost:8081/CalculatorWSApplication/CalculatorWS">
<enableAddressing/>
<suspendDurationOnFailure>60</suspendDurationOnFailure>
</address>
</endpoint>
</failover>
</endpoint>
</send>
<!-- STOP FURTHER PROCESSING OF THE CURRENT MESSAGE -->
<drop/>
</filter>
<!-- STOP FURTHER PROCESSING OF THE CURRENT MESSAGE -->
<drop/>
</sequence>
</definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]