WSO2 ESB不处理从API店PUT请求 [英] WSO2 ESB doesn't process Put request from API store

查看:467
本文介绍了WSO2 ESB不处理从API店PUT请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用WSO2 ESB 4.7.0和WSO2 API管理器1.6.0

We are using WSO2 ESB 4.7.0 and WSO2 API Manager 1.6.0

我已经定义了ESB的API,它需要一个PUT请求,并将其处理到后端系统和发送回响应成功。

I have an API defined the ESB which takes a PUT request and processes it to a back end system and sends back the response as success.

如果我用肥皂客户端或高级REST客户端的API工作正常。
请求URL:http://:/?CurriculumAdmin /条款/ 2010 /班/ 11513 / LMSURL LMSURL = KRanthiPUTARCAPI

The API works fine if I use the soap client or Advanced Rest Client. Request URL: http://:/CurriculumAdmin/Terms/2010/Classes/11513/LMSURL?LMSURL=KRanthiPUTARCAPI

响应:
状态200 OK

Response: Status 200 OK

但是,如果我创建一个使用WSO2 API管理器API和使用尝试从那里选择,我得到一个202响应

But if I create a API using the WSO2 API manager and use the try it option from there, I get a 202 response

请求URL:
https://开头:/TestURL/v1.0/Terms/2010/Classes/11513/LMSURL LMSURL = KranthiTestAPI

Request URL: https://:/TestURL/v1.0/Terms/2010/Classes/11513/LMSURL?LMSURL=KranthiTestAPI

在哪里TestURL / v1.0是我的API上下文根/资源。

Where TestURL/v1.0 is the context root /resource for my API.

响应:
响应体

Response: Response Body

响应code
202

Response Code 202

我看到的响应来,直到ESB,但ESB不要求做任何事情,仅仅发送202响应code回..

I could see that the response comes till the ESB , but the ESB doesn't do anything with the request and simply sends a response code of 202 back..

任何建议/帮助是非常AP preciated。

Any suggestions / help are highly appreciated.

谢谢
Kranthi

Thanks Kranthi

推荐答案

的发生是由于在缺省情况下由WSO2 API管理器中设置的参数此问题。

This issue occurs due to a parameter that is set by default by the WSO2 API Manager.

转到/usr/local/wso2/wso2am-1.6.0/repository/deployment/server/synapse-configs/default/api
打开相应的API的.xml文件,并删除以下行。

Go to /usr/local/wso2/wso2am-1.6.0/repository/deployment/server/synapse-configs/default/api Open the .xml file of the corresponding API and remove the following line.

<property name="POST_TO_URI" value="true" scope="axis2"/>

此参数由API经理默认设置。 WSO2将修复其产品的API经理版本1.8.0到这个属性没有设置为默认值。

This parameter is set by API manager by default. WSO2 will make a fix to their product API manager in release 1.8.0 to NOT set this property as default.

ESB日志变更前:
TID:[0] [ESB] [2014年10月27日11:16:18068] DEBUG {} org.apache.synapse.transport.http.wire - >>PUT HTTP://:/ CurriculumAdmin /条款/ 2010 /班/ 11513 / LMSURL?LMSURL = WWW HTTP / 1.1 [\\ R] [\\ N]{} org.apache.synapse.transport.http.wire

ESB Logs Before the change : TID: [0] [ESB] [2014-10-27 11:16:18,068] DEBUG {org.apache.synapse.transport.http.wire} - >> "PUT http://:/CurriculumAdmin/Terms/2010/Classes/11513/LMSURL?LMSURL=www HTTP/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}

观察主机名和出现在发送到ESB请求端口号

Observer the hostname and portnumber appearing in the request sent to ESB

ESB日志变更后:
TID:[0] [ESB] [2014年10月27日11:24:54478] DEBUG {} org.apache.synapse.transport.http.wire - >>PUT / CurriculumAdmin /条款/ 2010 /班/ 11513 / LMSURL?LMSURL = WWW HTTP / 1.1 [\\ R] [\\ N]{} org.apache.synapse.transport.http.wire

ESB Logs After the change : TID: [0] [ESB] [2014-10-27 11:24:54,478] DEBUG {org.apache.synapse.transport.http.wire} - >> "PUT /CurriculumAdmin/Terms/2010/Classes/11513/LMSURL?LMSURL=www HTTP/1.1[\r][\n]" {org.apache.synapse.transport.http.wire}

主机名和端口号是从URL中移除。

Hostname and portnumber are removed from the URL.

这工作正常,因此问题得到解决。希望它是有用的人。

This works fine and hence the issue is resolved. Hope its useful for someone ..

谢谢
Kranthi

Thanks Kranthi

这篇关于WSO2 ESB不处理从API店PUT请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆