On 11/12/06, Asankha C. Perera <[EMAIL PROTECTED]> wrote:
Phil
Let me detail out the steps I followed just a while ago to test the
sample service/s with the latest Axis2 RC2
<snip/>
Thanks, Asankha. I did essentially the steps you describe after your
first mail, running on Red Hat FC 3 and it worked fine (after googling
to find the ~ where Axis2 RC 1 is ;-).
Here is what I tried to do to get the samples to work using the axis2
deployed with Synapse (i.e., without starting a separate Axis 2):
1) Create the service aar and copy it to synapse_repository/services
2) Modify the axis2.xml in synapse_repository/conf to add
<transportReceiver name="http1"
class="org.apache.axis2.transport.http.SimpleHTTPServer">
<parameter name="port" locked="false">9000</parameter>
</transportReceiver>
and
<transportSender name="http1"
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
<parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding" locked="false">chunked</parameter>
</transportSender>
I realize this could be totally bogus ;-)
Then start synapse using bin/synapse.sh -sample 0
No matter what I do in axis2.xml, the service does not get started.
That is probably because SynpseHttpServer does init(), but not start()
on the listeners.
Then "ant stockquote" from the samples directory puts synapse into a
loop that starts throwing errors when the client gives up. The loop
looks like this:
[HTTPWorker-1] DEBUG SynapseMessageReceiver - Synapse received a new message...
[HTTPWorker-1] DEBUG SynapseMessageReceiver - Received To:
http://localhost:9000/axis2/services/SimpleStockQuoteService
[HTTPWorker-1] DEBUG SynapseMessageReceiver - SOAPAction: urn:getQuote
[HTTPWorker-1] DEBUG SynapseMessageReceiver - 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:9081B68B9BDA7C131511633455842861</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>
[HTTPWorker-1] DEBUG SynapseMediator - Synapse main mediator :: mediate()
[HTTPWorker-1] DEBUG AbstractListMediator - Implicit Sequence
<SynapseMediator> :: mediate()
[HTTPWorker-1] DEBUG LogMediator - Log mediator :: mediate()
[HTTPWorker-1] INFO LogMediator - To:
http://localhost:9000/axis2/services/SimpleStockQuoteService,
WSAction: urn:getQuote, SOAPAction: urn:getQuote, ReplyTo:
http://www.w3.org/2005/08/addressing/anonymous, MessageID:
urn:uuid:9081B68B9BDA7C131511633455842861, Envelope: <?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:9081B68B9BDA7C131511633455842861</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>
[HTTPWorker-1] DEBUG FilterMediator - Filter mediator mediate()
[HTTPWorker-1] DEBUG FilterMediator - Evaluating regular expression :
.*/StockQuote.* against source : get-property('To')
[HTTPWorker-1] DEBUG FilterMediator - Filter condition failed.. will
skip executing child mediators
[HTTPWorker-1] DEBUG FilterMediator - Filter mediator mediate()
[HTTPWorker-1] DEBUG FilterMediator - Evaluating regular expression :
http://.*stockquotes.* against source : get-property('To')
[HTTPWorker-1] DEBUG FilterMediator - Filter condition failed.. will
skip executing child mediators
[HTTPWorker-1] DEBUG FilterMediator - Filter mediator mediate()
[HTTPWorker-1] DEBUG FilterMediator - Evaluating XPath expression :
//*[wsa:Action='urn:getQuote']
[HTTPWorker-1] DEBUG FilterMediator - Filter condition satisfied..
executing child mediators
[HTTPWorker-1] DEBUG AbstractListMediator - Implicit Sequence
<FilterMediator> :: mediate()
[HTTPWorker-1] DEBUG SequenceMediator - Sequence mediator <anonymous>
:: mediate()
[HTTPWorker-1] DEBUG SequenceMediator - Sequence mediator <stockquote>
:: mediate()
[HTTPWorker-1] DEBUG AbstractListMediator - Implicit Sequence
<SequenceMediator> :: mediate()
[HTTPWorker-1] DEBUG HeaderMediator - Header mediator <Set> :: mediate()
[HTTPWorker-1] DEBUG HeaderMediator - Setting header : To to :
http://localhost:9000/axis2/home/phil/services/SimpleStockQuoteService
[HTTPWorker-1] DEBUG FilterMediator - Filter mediator mediate()
[HTTPWorker-1] DEBUG FilterMediator - Evaluating XPath expression :
//*[wsx:symbol='MSFT']
[HTTPWorker-1] DEBUG FilterMediator - Filter condition failed.. will
skip executing child mediators
[HTTPWorker-1] DEBUG SendMediator - Send mediator :: mediate()
[HTTPWorker-1] DEBUG SendMediator - Sending message using implicit
message properties..
[HTTPWorker-1] DEBUG SendMediator - Sending To:
http://localhost:9000/axis2/home/phil/services/SimpleStockQuoteService
[HTTPWorker-1] DEBUG SendMediator - SOAPAction: urn:getQuote
[HTTPWorker-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:9081B68B9BDA7C131511633455842861</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>
[HttpConnection-9000-1] DEBUG SynapseMessageReceiver - Synapse
received a new message...
Without the axis2.xml mods, you get connection refused, which makes
sense. I guess what must be happening here is that as Ruwan suggested,
Synapse "owns" all of the axis listeners, so mediation is going to
kick in for the forwarded request that comes in on 9000 and for the
first sample at least that mediation does nothing but send so is
essentially recursive. I tried to play with filters to pop out of the
loop, but a) I am still figuring out how these work and b) adding a
test for local host seemed to pollute the example.
I have not dug into standalone axis2 to see if it autoloads services
when you hit them a la tomcat. If it doesn't, that could cause a
fault, but I don't see faults until the client bails.
Sorry to cause a distraction here and that I can't be more immediately
helpful. Unless someone can find a simple way to make this work
without hacking the synapse_sample xml in distracting ways, I think it
is probably best just to doc the fact that you need to have a local
Axis2 RC1 running to get the samples to work. I would be happy to
patch the docs to reflect that if it would be helpful. For the
release, it might be best to put the Axis2 RC into a more easily
locatable place like, e.g. http://people.apache.org/builds/axis2 or
something.
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]