Hi all,
I'm a newbie to Synapse and currently going through the samples to
understand the functionality of the application.
I observed the following behavior in Synapse when trying to execute the
sample 50 included in the Synapse 0.91 distribution.
I went through the pre-requisites section of the Sample 50 and followed
all the steps correctly. Then the stockquote client was executed using
the ant script (ant stockquote).
I noticed the following messages logged in the Synapse console. (See the
bold text)
HttpConnection-8080-1] DEBUG HeaderMediator - *Setting header : To to :
http://localhost:9000/axis2/services/SecureStockQuoteService3*
[HttpConnection-8080-1] DEBUG SendMediator - Send mediator :: mediate()
[HttpConnection-8080-1] DEBUG SendMediator - Sending message to endpoint
:: name
= secure resolved address = http://localhost:
9000/axis2/services/SecureStockQuoteService3
[HttpConnection-8080-1] DEBUG SendMediator - *Sending To:
http://localhost:9000/axis2/services/SecureStockQuoteService3*
[HttpConnection-8080-1] DEBUG SendMediator - SOAPAction: urn:getQuote
[HttpConnection-8080-1] DEBUG SendMediator - Body :
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>*<wsa:To>http://localhost:9000/axis2/services/SimpleStockQuoteService</wsa:To>*<wsa:ReplyTo><wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address></wsa:ReplyTo><wsa:MessageID>urn:uuid:626983F478AE82EC4C11
68579112735</wsa:MessageID><wsa:Action>urn:getQuote</wsa:Action></soapenv:Header>
<soapenv:Body><m0:getQuote
xmlns:m0="http://services.samples/xsd"><m0:request><
m0:symbol>IBM</m0:symbol></m0:request></m0:getQuote></soapenv:Body></soapenv:Envelope>
According to the Synapse configuration file of this sample, It sets the
header http://localhost:9000/axis2/services/SecureStockQuoteService3 and
sends securely with enabled addressing. It is clearly seen in the above
Synapse debug messages. However What I'm concerned is the ws-addressing
header in the Soap envelope. It is addressed to
http://localhost:9000/axis2/services/SimpleStockQuoteService eventhough
Synapse sets the header to
http://localhost:9000/axis2/services/SecureStockQuoteService3.
I would like to know whether this is an acceptable behavior in message
transmission. The synapse_sample_50.xml file is attached here with for
your convenience.
Thanks and regards
Charitha
<!--
~ 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.
-->
<synapse xmlns="http://ws.apache.org/ns/synapse">
<!-- Connecting to endpoints with WS-Security for outgoing messages -->
<definitions>
<set-property name="sec_policy" src="file:repository/conf/sample/resources/policy/policy_3.xml"/>
<endpoint name="secure" address="http://localhost:9000/axis2/services/SecureStockQuoteService3">
<enableSec policy="sec_policy"/>
<enableAddressing/>
</endpoint>
</definitions>
<rules>
<in>
<header name="To" value="http://localhost:9000/axis2/services/SecureStockQuoteService3"/>
<send>
<endpoint ref="secure"/>
</send>
</in>
<out>
<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/>
</out>
</rules>
</synapse>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]