From 16c9ddb4ff2c4e60437e8e974db6739d657b15e4 Mon Sep 17 00:00:00 2001 From: John Beisley Date: Fri, 10 Jun 2022 18:13:54 +0100 Subject: [PATCH] Fix broken envelope test. --- v2alpha/soap/envelope/envelope.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2alpha/soap/envelope/envelope.go b/v2alpha/soap/envelope/envelope.go index 00dad3e..fa9403a 100644 --- a/v2alpha/soap/envelope/envelope.go +++ b/v2alpha/soap/envelope/envelope.go @@ -157,13 +157,13 @@ func (a *Action) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { "SOAP action arg does not support non-empty namespace, got %q", token.Name.Space) } - key := token.Name.Local + key := reflect.ValueOf(token.Name.Local).Convert(keyType) value := reflect.New(valueType) if err := d.DecodeElement(value.Interface(), &token); err != nil { return fmt.Errorf( "SOAP action arg %q errored while decoding: %w", key, err) } - argsValue.SetMapIndex(reflect.ValueOf(key), reflect.Indirect(value)) + argsValue.SetMapIndex(key, reflect.Indirect(value)) case xml.Comment: case xml.ProcInst: return fmt.Errorf(