Skip to content

Commit

Permalink
fix: use right targetNamespace duing request marshal
Browse files Browse the repository at this point in the history
During request marshal the namespace is not set correctly. Instead of
using from xsd:schema targetNamespace, it now uses the namespace from
wsld definitions.

Fixes: tiaguinho#48
  • Loading branch information
kcaashish committed Aug 19, 2022
1 parent 5bd4125 commit 4ffe90a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (c process) MarshalXML(e *xml.Encoder, _ xml.StartElement) error {
namespace := ""
if c.Client.Definitions.Types != nil {
schema := c.Client.Definitions.Types[0].XsdSchema[0]
namespace = schema.TargetNamespace
namespace = c.Client.Definitions.TargetNamespace
if namespace == "" && len(schema.Imports) > 0 {
namespace = schema.Imports[0].Namespace
}
Expand Down

0 comments on commit 4ffe90a

Please sign in to comment.