Q:

WSO2 AM doesn't pass my REST API calls to SOAP backend service

I have created a JSON REST API calling a backend SOAP service. My problem is that the API is forwarding the request as a HTTP GET and does not consider the SOAP message built by a PayloadFactory.
Here is the API config:
<metadata xmlns="http://www.wso2.org/governance/metadata">
    <overview>
        <redirectURL/>
        <sandboxURL/>
        <environments>Production and Sandbox</environments>
        <contextTemplate>/bmc/{version}</contextTemplate>
        <description/>
        <productionTps/>
        <visibleRoles/>
        <technicalOwner/>
        <faultSequence/>
        <wsdl/>
        <subscriptionAvailability/>
        <isLatest>true</isLatest>
        <tier>Unlimited</tier>
        <provider>admin</provider>
        <endpointConfig>{"production_endpoints":{"url":"https://server1.domain.se:8080/arsys/services/ARService?server=server1&amp;webService=SEB:CMDB_BaseElement","config":null},"sandbox_endpoints":{"url":"https://server1.domain.se:8080/arsys/services/ARService?server=server1&amp;webService=SEB:CMDB_BaseElement","config":null},"implementation_status":"managed","endpoint_type":"http"}</endpointConfig>
        <endpointURL/>
        <inSequence>BMCSystemJsonToSoapSeq</inSequence>
        <context>/bmc/1.0</context>
        <sandboxTps/>
        <endpointSecured>false</endpointSecured>
        <versionType>context</versionType>
        <endpointAuthDigest>false</endpointAuthDigest>
        <tenants/>
        <thumbnail/>
        <endpointPpassword/>
        <advertiseOnly>false</advertiseOnly>
        <visibility>public</visibility>
        <wadl/>
        <technicalOwnerEmail/>
        <implementation>ENDPOINT</implementation>
        <outSequence>BMCSystemJsonToSoapSeq</outSequence>
        <businessOwnerEmail/>
        <version>1.0</version>
        <apiOwner/>
        <transports>http,https</transports>
        <visibleTenants/>
        <cacheTimeout>300</cacheTimeout>
        <isDefaultVersion>false</isDefaultVersion>
        <name>BMC</name>
        <destinationStatsEnabled>Disabled</destinationStatsEnabled>
        <endpointUsername/>
        <responseCaching>Disabled</responseCaching>
        <businessOwner/>
        <status>PUBLISHED</status>
    </overview>
    <URITemplate>
        <authType0>Any</authType0>
        <urlPattern0>/system/{name}</urlPattern0>
        <httpVerb0>GET</httpVerb0>
    </URITemplate>
</metadata>

My BMCSystemJsonToSoapSeq in-sequence to produce a SOAP message looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="BMCSystemJsonToSoapSeq" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
  <payloadFactory media-type="xml">
    <format>
      <urn:GetList xmlns:urn="urn:SEB:CMDB_BaseElement">
        <urn:Qualification>CITag="$1" AND DatasetId="BMC.Asset"</urn:Qualification>
      </urn:GetList>
    </format>
    <args>
      <arg evaluator="json" expression="get-property('uri.var.name')"/>
    </args>
  </payloadFactory>
  <header scope="default">
    <urn:AuthenticationInfo xmlns:urn="urn:SEB:CMDB_BaseElement">
      <urn:userName>usr1</urn:userName>
      <urn:password>pwd1</urn:password>
    </urn:AuthenticationInfo>
  </header>
  <property name="messageType" scope="default" type="STRING" value="application/soap+xml"/>
</sequence>

Looking at the wire log:
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "GET /bmc/1.0/system/191 HTTP/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Host: localhost:8280[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Connection: keep-alive[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Accept: application/json[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Authorization: Bearer c6a72ffae28c149aef71bd43021067d3[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Accept-Encoding: gzip, deflate, sdch[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Accept-Language: sv-SE,sv;q=0.8,en-US;q=0.6,en;q=0.4[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Cookie: region3_registry_menu=visible; menuPanel=visible; menuPanelType=main; region1_configure_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG14594153721760.42895910477604415=true; MSG14594154045450.30055989572537245=true; requestedURI="../../carbon/resources/resource.jsp?region=region3&item=resource_browser_menu&path=/"; current-breadcrumb=registry_menu%2Cresource_browser_menu%23[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,345] DEBUG {org.apache.synapse.transport.http.wire} -  >> "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,448] DEBUG {org.apache.synapse.transport.http.wire} -  << "GET /arsys/services/ARService?server=server1&webService=SEB:CMDB_BaseElement/system/191 HTTP/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,448] DEBUG {org.apache.synapse.transport.http.wire} -  << "Cookie: region3_registry_menu=visible; menuPanel=visible; menuPanelType=main; region1_configure_menu=none; region4_monitor_menu=none; region5_tools_menu=none; MSG14594153721760.42895910477604415=true; MSG14594154045450.30055989572537245=true; requestedURI="../../carbon/resources/resource.jsp?region=region3&item=resource_browser_menu&path=/"; current-breadcrumb=registry_menu%2Cresource_browser_menu%23[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,448] DEBUG {org.apache.synapse.transport.http.wire} -  << "Accept: application/json[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,448] DEBUG {org.apache.synapse.transport.http.wire} -  << "Accept-Encoding: gzip, deflate, sdch[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  << "Accept-Language: sv-SE,sv;q=0.8,en-US;q=0.6,en;q=0.4[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  << "Host: server.domain.se:8080[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  << "Connection: Keep-Alive[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  << "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "HTTP/1.1 200 OK[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Server: Apache-Coyote/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Cache-Control: private[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Expires: Thu, 01 Jan 1970 01:00:00 CET[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Content-Type: text/html;charset=utf-8[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Content-Length: 133[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "Date: Thu, 31 Mar 2016 11:56:33 GMT[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "<h1>ARService</h1>[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "<p>Hi there, this is an AXIS service!</p>[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1] [] [2016-03-31 13:56:33,464] DEBUG {org.apache.synapse.transport.http.wire} -  >> "<i>Perhaps there will be a form for invoking the service here...</i>[\r][\n]" {org.apache.synapse.transport.http.wire}
TID: [-1234] [] [2016-03-31 13:56:33,464] ERROR {org.apache.synapse.util.xpath.SynapseJsonPath} -  #stringValueOf. Error evaluating JSON Path <$.get-property('uri.var.name')>. Returning empty result. Error>>> invalid path {org.apache.synapse.util.xpath.SynapseJsonPath}

Issue 1
The intial call to the API looks like this:
curl -X GET --header "Accept: application/xml" --header "Authorization: Bearer TOKEN" "https://172.28.210.192:8243/bmc/1.0/system/191"

So for some reason the API requests the backend service as:
https://server1.domain.se:8080/arsys/services/ARService?server=server1&webService=SEB:CMDB_BaseElement/system/191

Issue 2
For some reason my API request parameter can't be accessed:
TID: [-1234] [] [2016-03-31 13:56:33,464] ERROR {org.apache.synapse.util.xpath.SynapseJsonPath} -  #stringValueOf. Error evaluating JSON Path <$.get-property('uri.var.name')>. Returning empty result. Error>>> invalid path {org.apache.synapse.util.xpath.SynapseJsonPath}

Any ideas?

A:

Changed from HTTP Endpoint to Address Endpoint and it worked.

