【发布时间】:2015-05-19 21:11:26
【问题描述】:
在我的代理中,我调用了一个远程休息服务,它用这样的消息回复我:
<omim version="1.0">
<entryList>
<entry>
<prefix>#</prefix>
<mimNumber>230900</mimNumber>
<status>live</status>
<titles>
<preferredTitle>GAUCHER DISEASE, TYPE II</preferredTitle>
<alternativeTitles>GD II;;</alternativeTitles>
</titles>
<clinicalSynopsis>
<inheritance>Autosomal recessive</inheritance>
<growthWeight>Poor weight gain </growthWeight>
<growthOther>Failure to thrive </growthOther>
<headAndNeckEyes>Convergent squint</headAndNeckEyes>
<headAndNeckMouth>Trismus </headAndNeckMouth>
<respiratory>Apnea</respiratory>
<respiratoryLarynx>Laryngeal spasms</respiratoryLarynx>
<respiratoryLung>Recurrent aspiration pneumonia</respiratoryLung>
<abdomenExternalFeatures>Protruberantabdomen</abdomenExternalFeatures>
<abdomenLiver>Hepatomegaly</abdomenLiver>
<abdomenSpleen>Splenomegaly</abdomenSpleen>
<abdomenGastrointestinal>Dysphagia </abdomenGastrointestinal>
<neurologicCentralNervousSystem>Progressive neurologic deterioration</neurologicCentralNervousSystem>
<hematology>Thrombocytopenia</hematology>
<laboratoryAbnormalities>Decreased acid beta galactosidase protein and activity</laboratoryAbnormalities>
<miscellaneous>Onset between 3 and 6 months of age</miscellaneous>
<molecularBasis>Caused by mutation in the acid beta-glucosidase gene</molecularBasis>
</clinicalSynopsis>
</entry>
</entryList>
</omim>
我需要从这条消息中过滤一些数据并构建一个具有这种结构的自定义消息:
<clinicalManifestation>
<nonNeurological>
$1
</nonNeurological>
</clinicalManifestation>
在哪里 $1,也许使用有效载荷工厂?应该填充一些从上一个响应消息中提取的叶子,例如:
<clinicalManifestation>
<nonNeurological>
<growthWeight>Poor weight gain </growthWeight>
<growthOther>Failure to thrive </growthOther>
<headAndNeckEyes>Convergent squint</headAndNeckEyes>
<headAndNeckMouth>Trismus </headAndNeckMouth>
<respiratory>Apnea</respiratory>
<respiratoryLarynx>Laryngeal spasms</respiratoryLarynx>
<respiratoryLung>Recurrent aspiration pneumonia</respiratoryLung>
<abdomenExternalFeatures>Protruberantabdomen</abdomenExternalFeatures>
<abdomenLiver>Hepatomegaly</abdomenLiver>
<abdomenSpleen>Splenomegaly</abdomenSpleen>
<abdomenGastrointestinal>Dysphagia </abdomenGastrointestinal>
</nonNeurological>
</clinicalManifestation>
我必须使用 arqs 声明中的特定 xpath 表达式来使用有效负载工厂(什么表达式?)。还是我必须使用其他调解员?哪一个?请给我和例子好吗?
【问题讨论】:
标签: xml xpath wso2 wso2esb mediator