从PLSQL发送http请求,通过Spring集成接收并应答

从PLSQL发送http请求,通过Spring集成接收并应答,spring,plsql,httprequest,httpresponse,spring-integration,Spring,Plsql,Httprequest,Httpresponse,Spring Integration,我正在尝试从PLSQL发送http请求。它很好用 HttpRequest := UTL_HTTP.BEGIN_REQUEST (url => v_http_url, METHOD => 'POST'); utl_http.set_header(HttpRequest, 'Content-Type', 'text/xml; charset=utf-8' ); utl_http.set_header(HttpRequest, 'Content-Length', 64); utl_http

我正在尝试从PLSQL发送http请求。它很好用

HttpRequest := UTL_HTTP.BEGIN_REQUEST (url => v_http_url, METHOD => 'POST');
utl_http.set_header(HttpRequest, 'Content-Type', 'text/xml; charset=utf-8' );
utl_http.set_header(HttpRequest, 'Content-Length', 64);
utl_http.write_line(HttpRequest, 'some string');
Httpresp := utl_http.get_response(HttpRequest);
utl_http.end_request(HttpRequest);
utl_http.end_response(Httpresp);
Spring集成方面:

<int:channel id="inputChannel" />
<int:channel id="outputChannel" />

<int-http:inbound-gateway request-channel="inputChannel"
    reply-channel="outputChannel" supported-methods="POST" name="/req"
    message-converters="MyRequestConverter"
    request-payload-type="MyRequest">
</int-http:inbound-gateway>

<int:service-activator input-channel="inputChannel"
    method="getMessage" ref="dbmock"></int:service-activator>
PLSQL过程成功执行。此外,我得到一个例外,java.lang.String没有转换器

有没有办法反向使用MyRequestConverter


谢谢你的帮助

您正在将内容长度设置为64,但只发送11个字节。服务器正在等待更多数据。

我不知道这是否重要,但只有
END\u RESPONSE
END\u REQUEST
,而不是两者都有(如果您以前使用过
GET\u RESPONSE
,请使用
END\u RESPONSE
),我尝试只使用END\u RESPONSE,但运气不佳。超时发生。谢谢!我一点也不知道这有那么重要。
MyRequest readInternal(Class<? extends MyRequest > _class, HttpInputMessage message) throws IOException
void writeInternal(MyRequest request, HttpOutputMessage message)
public Object getMessage(@Headers Map<String, Object> headers, @Payload MyRequest payload)
Httpresp := utl_http.get_response(HttpRequest)