zoukankan      html  css  js  c++  java
  • 将 Servlet (HTTP POST/GET)请求发布到OSB

                                                                                                                                                                            

    转载地址:http://user.qzone.qq.com/32221895/blog/1406960844

    1        需求

     Servlet (Http post/get)请求发布到OSB,通过OSB代理服务调用Servlet(Http post/get);

    Servlet(Http post)地址:http://192.168.74.42:8082/jk/browser/auth

    Servlet(Http get)地址:http://192.168.74.42:8082/jk/browser/token

    2        问题

    参数发送不出,后台获取为空;在谷歌上看到相关的帖子受其启发,原来是要设置代理服务的消息流;

    参考的帖子(HTTP POST):https://community.oracle.com/thread/930655?tstart=0

    参考的帖子(HTTP GET):https://community.oracle.com/message/11049157#11049157

    完整成功的创建OSB服务参考本文档中“将Servlet(Http post)发布到OSB”、“将Servlet(Http get)发布到OSB”

    3        将Servlet(Http post)发布到OSB

    3.1      创建业务服务

    3.1.1   输入“服务名称”并选择“消息传送服务”;其余默认,接着点“下步”

    3.1.2   消息类型配置,将“请求消息类型”及“响应请求类型”均选择“文本”;接着点“下步”

    3.1.3   传送配置,添加“端点URI”;其余默认,接着点“下步”

     

    3.1.4   HTTP传输配置,将“高级设置”中的“使用分块传输模式”去掉;其余默认,接着点“下步”

    3.1.5   消息处理配置,默认;接着点“下步”

    3.1.6   到此业务服务配置完成,接着点“保存”完成业务服务的创建

    3.2      创建代理服务

    3.2.1   输入“服务名称”并选择“业务服务”,点“浏览”选择刚才创建的业务服务;接着点“下步”

    3.2.2   消息类型配置(文本、文本),默认;接着点“下步”

    3.2.3   传输配置,配置代理服务URL并勾选“获取所有标头”;接着点“下步”

    3.2.4   HTTP传输配置,默认;接着点“下步”

    3.2.5   消息处理配置,默认;接着点“下步”

    3.2.6   到此代理服务配置完成,接着点“保存”完成代码服务的创建

     

    3.3      编辑消息流

    3.3.1   找到刚才创建的代理服务,点此图标“编辑消息流”

    3.3.2   点击此图标选择“编辑路由”

    3.3.3   添加“请求操作”(添加操作-通信-传输标头)

    3.3.4   勾选“通过管道传递所标头”,其余默认;点击“全部保存”完成代理服务的设置

    3.3.5   点激活完成整个服务的配置

    3.4      OSB访问URL

    此时可以通过OSB代理服务地址访问了(http://192.168.74.42:8011/default/EHRBrowserAuthProxyService

    4        将Servlet(Http get)发布到OSB

    4.1      创建业务服务

    与“将Servlet(Http post)发布到OSB”的基本全部一样;仅需将“消息类型配置”中的“请求消息类型”设置为“无”、“响应请求类型”还是选择“文本”及“HTTP传输配置”中的“HTTP请求方法”选择“GET”。

    4.2      创建代理服务

    与“将Servlet(Http post)发布到OSB”的基本全部一样;仅需将“消息类型配置”中的“请求消息类型”设置为“无”、“响应请求类型”还是选择“文本”;

    4.3      编辑消息流

    4.3.1   编辑路由

    说明:编辑路由的方法,请参考“将Servlet(Http post)发布到OSB”中的。

    4.3.1.1      请求操作

    Ø  添加操作-消息处理-分配(设置详见上面的载图)

    分配:$inbound/ctx:transport/ctx:request/http:query-string/text()

    至变更:queryString

    Ø  添加操作-消息处理-插入(设置详见上面的载图)

    在变量:outbound

    中插入:

    fn-bea:inlinedXML('<http:query-stringxmlns:http="http://www.bea.com/wli/sb/transports/http"></http:query-string>')

    XPath:./ctx:transport/ctx:request

    Ø  添加操作-消息处理-插入(设置详见上面的载图)

    在变量:outbound

    中插入:$queryString

    XPath:./ctx:transport/ctx:request/http:query-string

    4.3.1.2      响应操作

    Ø  添加操作-通信-传输标头(设置详见上面的载图)

    名称:Content-Type

    将标头设置为:fn:string(“texthtml”)

    4.4      OSB访问URL

    此时可以通过OSB代理服务地址访问了(http://192.168.74.42:8011/default/EHRBrowserTokenProxyService

    ------------------------------------- 发帖要200字 start --------------------------------------

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;200;

    ------------------------------------- 发帖要200字 end --------------------------------------

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

                                                                                                                                                                     

  • 相关阅读:
    SQL 语言入门
    [转载]Sql Server 中的Login,Schema,User,Role之间的关系
    稀疏矩阵运算
    特征缩放的几种方法
    dp解出栈序列数
    神经网络解决多分类问题例:数字识别
    多分类例题
    fminunc 函数的用法
    二分类
    特征归一化、特征映射、正则化
  • 原文地址:https://www.cnblogs.com/boazy/p/3886983.html
Copyright © 2011-2022 走看看