marshalling

JAXB marshal namespace prefix

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-28 06:01:52
问题 I'm developing a client to consume a web service, but for some reason my requests are not properly processed unless all namespaces are correct and without any prefix. All my classes were created using the provide XSD's and WSDL's by the service provider. NfeDadosMsg.class package br.inf.portalfiscal.nfe.wsdl.nfestatusservico4; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml

C# calling a DLL function that returns a pointer to pointer to an array of structures

陌路散爱 提交于 2021-01-28 03:30:56
问题 I have tried many different combinations of the various methods to marshal this call. This is a DLL that returns a pointer to a pointer to an array of structures. The types like debugPort are actually enums. /** * \struct debugConnectParameters * \brief Get device characterization and specify connection parameters through ST-LINK interface. */ typedef struct debugConnectParameters { debugPort dbgPort; /**< Select the type of debug interface #debugPort. */ int index; /**< Select one of the

C# calling a DLL function that returns a pointer to pointer to an array of structures

拈花ヽ惹草 提交于 2021-01-28 02:14:16
问题 I have tried many different combinations of the various methods to marshal this call. This is a DLL that returns a pointer to a pointer to an array of structures. The types like debugPort are actually enums. /** * \struct debugConnectParameters * \brief Get device characterization and specify connection parameters through ST-LINK interface. */ typedef struct debugConnectParameters { debugPort dbgPort; /**< Select the type of debug interface #debugPort. */ int index; /**< Select one of the

Marshal.Sizeof() returning unexpected value

夙愿已清 提交于 2021-01-27 12:34:55
问题 I'm debugging code in C# written by a 3rd party. The project is an old C++ project that was rewritten in C# by a contractor, and I have no access to the contractor. I authored the original C++ version. The issue is when the C# code gets the size of a structure that represents data received over a UDP connection. The struct is defined as: [StructLayout(LayoutKind.Sequential,Pack=1)] internal class PROXY_HDR { public ushort pad; public ushort label; public char flags; public ushort length;

Go json Unmarshaller is not called

不羁岁月 提交于 2020-11-29 10:37:45
问题 I'm fairly new to Golang. And I was looking for a way to do some custom stuff for marshaling and unmarshalling json . I have found the solution to implement Marshaller and Unmarshaller interfaces. Here is my struct with implemented interfaces (I have also implemented Stringer): type Data struct { Foo string `json:"foo"` bar string } func (d Data) MarshalJSON() ([]byte, error) { return []byte("{\"foo\":\"test\",\"bar\":\"data\"}"), nil } func (d Data) String() string { return fmt.Sprintf("Foo: