I want to get text from following Envelope so that I can use it as REST\_URL\_POSTFIX.

I am sending a plain text message to a JMS queue and following WSO2-ESB proxy service is used as a receiver/listener of JMS queue. I have tried following expressions but they does not work :

$body

> 
> $body/text
> 
> 
> $body/text()
> 
> 
> The SOAP 1.1 or 1.2 body element. For example, the expression
> $body/getQuote refers to the first getQuote element in a SOAP body,
> regardless of whether the message is SOAP-11 or SOAP-12.
> 
> 
> 

and

> 
> //Envelope//Body//text
> 
> 
> //Envelope//Body//text()
> 
> 
> 

INFO - (Send

```
LogMediator To: , MessageID: ID:sunnydyal-K55VM-44230-1439804805911-3:2:1:1:9, 
Direction: request, @@@@@ Message = , 
Envelope: 
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
    <axis2ns8:text xmlns:axis2ns8="http://ws.apache.org/commons/ns/payload">Test</axis2ns8:text>
</soapenv:Body>
</soapenv:Envelope>

```

@Proxy Service:

```
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="JmsToRestProxy"
       transports="jms"
       statistics="enable"
       trace="enable"
       startOnLoad="true">
   <target>
      <inSequence>
         <property name="OUT_ONLY" value="true"/>
         <property name="HTTP_METHOD" value="GET" scope="axis2" type="STRING"/>
         <property name="SOAPAction" scope="default" action="remove"/>
         <header name="Action" scope="default" action="remove"/>
         <property name="REST_URL_POSTFIX"
                   expression="//Envelope//Body//text"
                   scope="axis2"
                   type="STRING"/>
         <switch source="$axis2:HTTP_METHOD">
            <case regex="GET">
               <property name="HTTP_METHOD" value="GET" scope="axis2" type="STRING"/>
            </case>
            <case regex="POST">
               <property name="HTTP_METHOD" value="POST" scope="axis2" type="STRING"/>
            </case>
            <default/>
         </switch>
         <log level="full">
            <property name="@@@@@ Message" expression="$body/text"/>
         </log>
         <send>
            <endpoint>
               <address uri="http://localhost:8080/Rest/rest" format="rest"/>
            </endpoint>
         </send>
      </inSequence>
   </target>
   <parameter name="transport.jms.ContentType">
      <rules>
         <jmsProperty>contentType</jmsProperty>
         <default>text/plain</default>
      </rules>
   </parameter>
   <description/>
</proxy>

```