【发布时间】:2016-05-19 19:17:31
【问题描述】:
我正在使用 HTTP 出站组件从 mule 调用 hybris rest 服务。 当我第一次调用服务时,我在 Set-Cookie 中获得了 JSESSIONID,但在第二次调用中,Set-Cookie 中不存在 JSESSIONID。
我尝试过使用 Rest Client 的相同场景。我直接从 rest 客户端调用 hybris 服务。Rest Client 每次在 Set-Cookie 中给我 JSESSIONID。
为什么 JSESSIONID 没有得到 HTTP 出站组件的第二次调用?
这是我的流程
<flow name="Oauth" doc:name="Oauth">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8081" doc:name="Oauth"
path="getOauth" />
<logger
message="Oauth Request : #[message.payload]"
level="INFO" doc:name="LogOuthRequest" />
<http:outbound-endpoint exchange-pattern="request-response"
host="hybrisServer" port="port" path="rest/oauth/token"
method="POST" contentType="application/x-www-form-urlencoded"
doc:name="HybrisPostRestCall">
<message-properties-transformer name="test"
doc:name="Set Content-type xml">
<add-message-property key="accept"
value="application/xml" />
</message-properties-transformer>
</http:outbound-endpoint>
<echo-component doc:name="Object2String" />
<logger message="AccessToken : #[message.payload]"
level="INFO" doc:name="LogOauthResponse" />
</flow>
【问题讨论】:
-
您可能对入站和出站标头感到困惑,请添加您的 xml 配置以获得足够的信息来帮助您。
-
嘿,我已经更新了我的问题..添加了 xml..
标签: cookies http-headers mule mule-studio