JSON 嵌套数组/对象到 SOAP XML 正文 - 我在将以下 JSON 请求转换为 Dataweave 中的肥皂请求时遇到了困难。我正在附加要在数据编织 2.0 中转换的输入和输出有效负载。
输入有效载荷:
{
"accountDetails":{
"accountId":"BLM-097",
"uniqueId":"130-135",
"detailsList":{
"account":[
{
"accountType":"On-Air",
"accountId":"BLM-097",
"fullName":{
"firstName":"John",
"lastName":"Doe"
},
"privateDetails":{
"SSN":{
"number":"123456789",
"vaildDate":"9/8/2005"
}
},
"contactList":{
"contactInformation":[
{
"emailAddress":"user123@gmail.com",
"phoneNumber":"123456789"
}
]
},
"notificationPreferences":{
"notification":[
{
"notificationType":"Text",
"notificationMethod":"Email"
},
{
"notificationType":"Dial-in",
"notificationMethod":"Phone"
}
]
}
}
]
}
}
}
输出有效载荷:
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<v1:accountDetails xmlns:v1="http://placeholder/accountDetails/v1">
<v1:accountId>BLM-097</v1:accountId>
<v1:uniqueId>130-135</v1:uniqueId>
<v1:detailsList>
<v1:account>
<v1:accountType>On-Air</v1:accountType>
<v1:accountId>BLM-097</v1:accountId>
<v1:fullName>
<v1:firstName>John</v1:firstName>
<v1:lastName>Doe</v1:lastName>
</v1:fullName>
<v1:privateDetails>
<v1:SSN>
<v1:number>123456789</v1:number>
<v1:vaildDate>9/8/2005</v1:vaildDate>
</v1:SSN>
</v1:privateDetails>
<v1:contactList>
<v1:contactInformation>
<v1:emailAddress>user123@gmail.com</v1:emailAddress>
<v1:phoneNumber>123456789</v1:phoneNumber>
</v1:contactInformation>
</v1:contactList>
<v1:notificationPreferences>
<v1:notification>
<v1:notificationType>Text</v1:notificationType>
<v1:notificationMethod>Email</v1:notificationMethod>
</v1:notification>
<v1:notification>
<v1:notificationType>Dial-in</v1:notificationType>
<v1:notificationMethod>Phone</v1:notificationMethod>
</v1:notification>
</v1:notificationPreferences>
</v1:account>
</v1:detailsList>
</v1:accountDetails>
</soapenv:Body>
</soapenv:Envelope>
我尝试使用 dataweave 游乐场,但没有运气 JSON 嵌套数组/对象到 SOAP XML 正文 - 我在将以下 JSON 请求转换为 Dataweave 中的肥皂请求时遇到了困难。我正在附加要在数据编织 2.0 中转换的输入和输出有效负载。