1 回答

TA貢獻(xiàn)1780條經(jīng)驗(yàn) 獲得超4個贊
請更改結(jié)構(gòu)命令和 XML 擴(kuò)展 :-
type Command struct {
Xmlns string `xml:"xmlns,attr"`
Test string `xml:"test"`
Someothertest string `xml:"someothertest"`
}
type XMLEnvelop struct {
XMLName xml.Name `xml:"soapenv:Envelope"`
Xmlns string `xml:"xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/,"`
CalculatePrice Command `xml:"soapenv:Body>CalculatePrice"`
}
并更改v := &XMLEnvelop{Xmlns: "namespace1", CalculatePrice: Command{Xmlns: "namespace2",Test: "somevalue", Someothertest: "somevalue"}}
- 1 回答
- 0 關(guān)注
- 78 瀏覽
添加回答
舉報(bào)