我在使用Web服务寻址(WS-A)的Weblogic Server中托管了SOAP Web服务。我正在尝试使用WSO2 API Manager发布它。
原始请求具有完整的SOAP标头,包括Action和MessageID:
import pandas as pd
import numpy as np
import io
temp=u"""(info) text (yay!)
I love text
Text is fun
(more info) more text
lotsa text (boo!)"""
df = pd.read_csv(io.StringIO(temp), header=None, names=['original'])
print df
# original
#0 (info) text (yay!)
#1 I love text
#2 Text is fun
#3 (more info) more text
#4 lotsa text (boo!)
df['col1'] = df['original'].str.extract(r"\(([A-Za-z0-9 _]+)\)")
df['col2'] = df['original'].str.replace(r"\(([A-Za-z0-9 _]+)\)", "")
print df
# original col1 col2
#0 (info) text (yay!) info text (yay!)
#1 I love text NaN I love text
#2 Text is fun NaN Text is fun
#3 (more info) more text more info more text
#4 lotsa text (boo!) NaN lotsa text (boo!)
但是wso2-am在发送到Werblogic服务器中的最终端点之前从SOAP Header中删除了Action和MessageID字段。这是wso2-am发送的错误听众的一个例子
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>urn:es:cetelem:ws:venta:promociones:services:promocionesService:promocionesService_v03:PromocionesServicePortType:obtenerPromocionesOperacionVndRequest</wsa:Action>
<wsa:MessageID>uuid:969e636c-067f-4bed-a38a-65f0f81c295d</wsa:MessageID>
</soapenv:Header>
如何配置wso2-am以保持客户端发送的SOAP Header。
答案 0 :(得分:1)
我找到了解决方案。我在[CARBON-HOME]/repository/deployment/server/synapse-configs/default/sequences
中添加了一个新的序列中介扩展,以保留原始的WS-A头。新扩展名设置为PRESERVE_WS_ADDRESSING
属性的true。
访问https://docs.wso2.com/display/ESB460/Generic+Properties 新调解员的代码是:
<sequence xmlns="http://ws.apache.org/ns/synapse" name="WSO2AM--Ext--In">
<property name="PRESERVE_WS_ADDRESSING" value="true" scope="default" type="STRING"/>
</sequence>