soap4r icon indicating copy to clipboard operation
soap4r copied to clipboard

Add "options" Argument to XSD Mapper/Mapping Methods

Open markborkum opened this issue 6 years ago • 1 comments

Non-breaking change.

Adds options = {} argument to XSD::Mapping::Mapper#obj2xml and XSD::Mapping::Mapper#xml2obj instance methods and XSD::Mapping.obj2xml and XSD::Mapping.xml2obj module methods.

Currently, XML namespaces cannot be customized because the options for the SOAP::Generator constructor are not exposed as an argument of the XSD::Mapping::Mapper#obj2xml instance method and/or the XSD::Mapping.obj2xml module method.

This commit enables the customization of XML namespaces. For example, to set the default XML namespace:

mapper.obj2xml(obj, nil, nil, { # indented for readability
  default_ns: SOAP::NS.new({
    "ex" => "http://example.com/ns#",
  }),
})

markborkum avatar Aug 18 '19 15:08 markborkum

Job #48.4

Error: test_proxy(SOAP::Auth::TestDigest): Errno::EADDRINUSE: Address already in use - bind(2) for 0.0.0.0:17172

https://travis-ci.org/rubyjedi/soap4r/jobs/573452616#L316

markborkum avatar Aug 18 '19 17:08 markborkum