【发布时间】:2015-09-22 11:52:56
【问题描述】:
我在 wso2 中创建了一个代理服务,在尝试访问代理服务时它显示错误为 Unsupported Media Type,但我设置了 Content-Type: application/xml .payload is in xml format,所以我将其设置为 application /xml 在源代码视图中,仍然出现相同的错误,请帮助我解决此问题
**Proxy Service:**
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="test"
transports="http,https"
statistics="enable"
trace="enable"
startOnLoad="true">
<target>
<outSequence>
<property name="Content-Type" value="application/xml"/>
<send/>
</outSequence>
<endpoint>
<address uri="http://192.35.72.369:8080/ESB_Services/DRAM/service/CreateCustomer"/>
</endpoint>
</target>
<description/>
</proxy>
**Payload:**
<customer>
<name>admin</name>
<email>admin@gmail.com</email>
<mobile_number>9904324234</mobile_number>
<address>Bangalore</address>
<zipcode>574515</zipcode>
</customer>
**ERROR:**
<TryitProxyError h:status="SOAP envelope error" xmlns:h="http://wso2.org/ns/TryitProxy">org.apache.axis2.AxisFault: Transport error: 415 Error: Unsupported Media Type</TryitProxyError>
【问题讨论】:
标签: rest soap wso2 wso2esb esb