Hi Paul,

It didn't work. From the console what I ran ./wso2server.sh, I got below
error messages:

[2012-09-17 16:37:50,658] DEBUG - LogMediator End : Log mediator
[2012-09-17 16:37:50,659] DEBUG - PropertyMediator Start : Property mediator
[2012-09-17 16:37:50,659] DEBUG - PropertyMediator Setting property :
RESPONSE at scope : default to : true (i.e. constant : true)
[2012-09-17 16:37:50,660] DEBUG - PropertyMediator End : Property mediator
[2012-09-17 16:37:50,660] DEBUG - SendMediator Start : Send mediator
[2012-09-17 16:37:50,700] DEBUG - SendMediator Sending response message
using implicit message properties..
Sending To: /services/myecho/FPAVResponse
SOAPAction: null
[2012-09-17 16:37:50,702] ERROR - HttpCoreNIOSender Malformed destination
EPR : /services/myecho/FPAVResponse
java.net.MalformedURLException: no protocol: /services/myecho/FPAVResponse
at java.net.URL.<init>(URL.java:583)
at java.net.URL.<init>(URL.java:480)
at java.net.URL.<init>(URL.java:429)
at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRequest(HttpCoreNIOSender.java:370)
at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:303)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:159)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:265)
at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:84)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:170)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
at
org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:66)
at
org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:116)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:154)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
at
org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest(RESTUtil.java:89)
at
org.apache.synapse.transport.nhttp.util.RESTUtil.processPOSTRequest(RESTUtil.java:188)
at
org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:404)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
[2012-09-17 16:37:50,708] ERROR - Axis2Sender Unexpected error sending
message back
org.apache.axis2.AxisFault: Malformed destination EPR :
/services/myecho/FPAVResponse
at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.handleException(HttpCoreNIOSender.java:823)
at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRequest(HttpCoreNIOSender.java:452)
at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:303)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:159)
at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:265)
at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:84)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:170)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
at
org.apache.synapse.config.xml.AnonymousListMediator.mediate(AnonymousListMediator.java:30)
at org.apache.synapse.config.xml.SwitchCase.mediate(SwitchCase.java:66)
at
org.apache.synapse.mediators.filters.SwitchMediator.mediate(SwitchMediator.java:116)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:154)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at
org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
at
org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest(RESTUtil.java:89)
at
org.apache.synapse.transport.nhttp.util.RESTUtil.processPOSTRequest(RESTUtil.java:188)
at
org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:404)
at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.net.MalformedURLException: no protocol:
/services/myecho/FPAVResponse
at java.net.URL.<init>(URL.java:583)
at java.net.URL.<init>(URL.java:480)
at java.net.URL.<init>(URL.java:429)
at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRequest(HttpCoreNIOSender.java:370)
... 25 more
[2012-09-17 16:37:50,712]  WARN - ProxyServiceMessageReceiver Exception
encountered but no fault handler found - message dropped

Maybe it is helpful for debugging.

Thanks,
  Bin

On Tue, Sep 18, 2012 at 4:23 PM, Anjana Fernando <[email protected]> wrote:

> Hi,
>
> Also try putting "<header name="To" action="remove"/>" with the "<property
> name="RESPONSE" value="true" scope="default"/>" and see.
>
> Cheers,
> Anjana.
>
>
> On Tue, Sep 18, 2012 at 1:40 PM, Maeglin Vardamir <[email protected]>wrote:
>
>> Hi Paul,
>>
>> My sequence is like below:
>>
>> [belcon@localhost sequences]$ cat response.xml
>> <?xml version="1.0" encoding="UTF-8"?>
>> <sequence xmlns="http://ws.apache.org/ns/synapse"; name="response">
>>     <log/>
>>     <payloadFactory>
>>         <format>
>>             <ResponseMessage  message="response" />
>>         </format>
>>     </payloadFactory>
>>     <property name="RESPONSE" value="true" scope="default"/>
>>     <send/>
>> </sequence>
>>
>> My proxy configuration is like below:
>> [belcon@localhost sequences]$ cat ../proxy-services/myecho.xml
>> <?xml version="1.0" encoding="UTF-8"?>
>> <proxy xmlns="http://ws.apache.org/ns/synapse"; name="myecho"
>> transports="https http" startOnLoad="true" trace="disable">
>>     <target>
>>         <inSequence>
>>             <sequence key="response"/>
>>         </inSequence>
>>         <outSequence>
>>             <send/>
>>         </outSequence>
>>     </target>
>>     <publishWSDL uri="
>> http://64.104.170.63:8080/cesium/services/FPAVService?wsdl"/>
>> </proxy>
>>
>> What I got is like below:
>> [belcon@localhost sequences]$ cat /tmp/tmp.txt
>> <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
>> <html><head>
>> <title>502 Proxy Error</title>
>> </head><body>
>> <h1>Proxy Error</h1>
>> <p>The proxy server received an invalid
>> response from an upstream server.<br />
>> The proxy server could not handle the request <em><a
>> href="/myecho/">POST&nbsp;/myecho/</a></em>.<p>
>> Reason: <strong>Error reading from remote server</strong></p></p>
>> <hr>
>> <address>Apache/2.2.3 (Red Hat) Server at 64.104.170.63 Port
>> 4433</address>
>> </body></html>
>>
>> Did I make any mistakes?
>>
>> Thanks,
>>   Bin
>>
>> On Tue, Sep 18, 2012 at 1:50 PM, Paul Fremantle <[email protected]> wrote:
>>
>>> Maeglin
>>>
>>> Its not the Fault mediator that changes the direction :-) That just
>>> creates the message. I misremembered that sample.
>>>
>>> If you look here:
>>> http://synapse.apache.org/Synapse_Configuration_Language.html
>>>
>>> There are some well-defined properties that you can get/set on the
>>> Synapse message context scope:
>>>
>>>    - RESPONSE - 'true' means the message is to be marked as a response
>>>    message
>>>
>>> so if you use the following in the <in> sequence.
>>> <property name="RESPONSE" value="true"/>
>>> <send/>
>>> That will send the current "in message" back to the client.
>>> Paul
>>>
>>> On 18 September 2012 06:34, Maeglin Vardamir <[email protected]> wrote:
>>>
>>>> Hi Paul,
>>>>
>>>> I had already found that sample. I guess that FAULT mediator can change
>>>> the direction of the message. But I want to compose a rest xml before send
>>>> it back to the requester. I doubt that FAULT mediator can do that. So the
>>>> question is how I can redirect the message without FAULT mediator. Or how
>>>> can I compose a formatted XML in FAULT mediator?
>>>>
>>>> Thanks a lot.
>>>>
>>>> Regards,
>>>>   Bin
>>>>
>>>>
>>>> On Tue, Sep 18, 2012 at 1:26 PM, Paul Fremantle <[email protected]> wrote:
>>>>
>>>>> Maeglin
>>>>>
>>>>> You need to follow this sample:
>>>>>
>>>>> http://synapse.apache.org/Synapse_Samples.html#Sample5
>>>>>
>>>>> Hope this helps!
>>>>>
>>>>> Paul
>>>>>
>>>>> On 18 September 2012 06:07, Maeglin Vardamir <[email protected]> wrote:
>>>>>
>>>>>> Hi guys,
>>>>>>
>>>>>> I want to check some conditions in the in-sequence. Replay a
>>>>>> warning/error message when any illegal message were found. Before send 
>>>>>> any
>>>>>> messages to the requester, I use payloadFactory mediator to form the xml
>>>>>> error message. Then send it back to the requester. How can I do that? I
>>>>>> tried to add
>>>>>>
>>>>>> <send/>
>>>>>> <sequence>out</sequence>
>>>>>>
>>>>>> below the payloadFactory mediator but it didn't work.
>>>>>>
>>>>>> Thanks,
>>>>>>   Bin
>>>>>>
>>>>>> _______________________________________________
>>>>>> User mailing list
>>>>>> [email protected]
>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/user
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Paul Fremantle
>>>>> CTO and Co-Founder, WSO2
>>>>> OASIS WS-RX TC Co-chair, VP, Apache Synapse
>>>>>
>>>>> UK: +44 207 096 0336
>>>>> US: +1 646 595 7614
>>>>>
>>>>> blog: http://pzf.fremantle.org
>>>>> twitter.com/pzfreo
>>>>> [email protected]
>>>>>
>>>>> wso2.com Lean Enterprise Middleware
>>>>>
>>>>> Disclaimer: This communication may contain privileged or other
>>>>> confidential information and is intended exclusively for the addressee/s.
>>>>> If you are not the intended recipient/s, or believe that you may have
>>>>> received this communication in error, please reply to the sender 
>>>>> indicating
>>>>> that fact and delete the copy you received and in addition, you should not
>>>>> print, copy, retransmit, disseminate, or otherwise use the information
>>>>> contained in this communication. Internet communications cannot be
>>>>> guaranteed to be timely, secure, error or virus-free. The sender does not
>>>>> accept liability for any errors or omissions.
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Paul Fremantle
>>> CTO and Co-Founder, WSO2
>>> OASIS WS-RX TC Co-chair, VP, Apache Synapse
>>>
>>> UK: +44 207 096 0336
>>> US: +1 646 595 7614
>>>
>>> blog: http://pzf.fremantle.org
>>> twitter.com/pzfreo
>>> [email protected]
>>>
>>> wso2.com Lean Enterprise Middleware
>>>
>>> Disclaimer: This communication may contain privileged or other
>>> confidential information and is intended exclusively for the addressee/s.
>>> If you are not the intended recipient/s, or believe that you may have
>>> received this communication in error, please reply to the sender indicating
>>> that fact and delete the copy you received and in addition, you should not
>>> print, copy, retransmit, disseminate, or otherwise use the information
>>> contained in this communication. Internet communications cannot be
>>> guaranteed to be timely, secure, error or virus-free. The sender does not
>>> accept liability for any errors or omissions.
>>>
>>>
>>
>> _______________________________________________
>> User mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/user
>>
>>
>
>
> --
> *Anjana Fernando*
> Associate Technical Lead
> WSO2 Inc. | http://wso2.com
> lean . enterprise . middleware
>
_______________________________________________
User mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/user

Reply via email to