Questions tagged [marshalling]

Marshalling is the process of transforming the memory representation of an object to a data format suitable for storage or transmission

Marshalling is the process of packing parameters to a message. The reverse process is called unmarshalling. The accurate definition of marshalling differs across programming languages such as Python, Java, and .NET, and in some contexts, is used interchangeably with serialization. The term is also used in RPC steps. For example marshalling in Java is the process of converting Java objects into XML format (JAXB).

Read more:

  1. Marshalling on WikiPedia
  2. Marshalling in Python
  3. Marshalling in Golang
  4. Marshalling in Java (JAXB)
  5. Marshalling in .NET
  6. Marshalling in Ruby
3730 questions
1
vote
1 answer

JAXB XML Marshalling Object Only, but Unmarshalling Requires Full Structure?

I am using the standard JAXB API to work with XML. I need to marshal and then un-marshal an object (so the result should be the same object). I first marshal into a string, and then do the opposite -- unmarshal from a string into an object. The…
gene b.
  • 10,512
  • 21
  • 115
  • 227
1
vote
2 answers

How to convert C# string[] to System.IntPtr?

I need to use a native dll struct in my application. struct da_i2k_input_file_info in the dll .h file is struct DA_I2K_EXPORT_API da_i2k_input_file_info { const WDCHAR * image_path; const WDCHAR ** image_files; int …
jacknad
  • 13,483
  • 40
  • 124
  • 194
1
vote
1 answer

Clarification for copying strings from native structures

I'm using the PInvoke stuff in order to make use of the SetupAPI functions from C++. I'm using this to get paths to USB devices conforming to the HID spec. I've got everything working but something I don't understand has me puzzled. Using this…
Andrew Falanga
  • 2,274
  • 4
  • 26
  • 51
1
vote
1 answer

Spring RestTemplate - no suitable HttpMessageConverter found for response type [..] and content type [application/xml]

I have a problem accessing a REST service with the RestTemplate. I've already managed to user the MarshallingConverter to access one other service, and everything worked fine. I have copied this functionality and generated Model classes from the XSD…
Filip Majernik
  • 7,700
  • 13
  • 45
  • 53
1
vote
1 answer

How to marshal following native C++ objects to C++/CLI?

I am a bit confused on how to marshal below mentioned C++ object to c++/CLI. Could you give me some idea? Native C++ Classes class HeaderMessage { double timestamp; string ric_code; } class TradeMessage { double price; int size; } …
Alok
  • 3,160
  • 3
  • 28
  • 47
1
vote
0 answers

Why is my char* getting cutoff at 256 characters between C# -> C++

I have to call an external library that is using some non-standard types, so I've created a C++ wrapper around this external library. To try to save some pain I've setup on of the arguments as a wchar_t*: void StartBatchJob(wchar_t* server, unsigned…
Matthew Bonig
  • 2,001
  • 2
  • 20
  • 40
1
vote
3 answers

Marshalling XML file to Java pojo/domain object

I have an old Access database that is basically one flat file. I want to migrate the data to my new whizzy, object oriented, hibernate based wonder-app. The data is available as an XML file, and I want to map to three separate java pojos. I planned…
NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
1
vote
2 answers

JAXB Marshaller initialization

I need to Marshal a JAXB object to xml format string. I'm using a SLSB and hook the code to create the Marshaller and other things in @PostConstruct annotated method. So that each time I need not load the schema and create the Marshaller. The code…
nobody
  • 1,909
  • 5
  • 31
  • 45
1
vote
2 answers

LARGE_INTEGER value gets changed while marshalling : from LARGE_INTEGER to UINT64 (C) to C#'s uint64

I try to marshal NdisGetCurrentSystemTime result to a C# program via ioctl. LARGE_INTEGER data; NdisGetCurrentSystemTime (&data ); marshal_data->time = (UINT64)(data.QuadPart / 10^6); DBGPRINT(("Time: %64u", marshal_data->time)); At C# receiver…
kagali-san
  • 2,964
  • 7
  • 48
  • 87
1
vote
3 answers

Marshalling and casting. Are them related?

Last week a young student ask me if marshalling is the same as casting. My answer was definetly no. Marshalling is seralization, the way to transform a memory representation of an objet into bytes in order to be transmitted to a network whereas…
Luixv
  • 8,590
  • 21
  • 84
  • 121
1
vote
2 answers

JAXB and XML Canonization

I wish to canonize my XML unmarshalled by JAXB in accordance with Canonical XML Spec If I write this : marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); will it work? If not, can JAXB do the job ?
Bastiflew
  • 1,136
  • 3
  • 18
  • 31
1
vote
2 answers

"Attempted to read of write protected memory..." error when marshaling a structure to a pointer

I'm testing a simple concept where I have a structure called ChatMessage that contains 2 byte arrays (MessageText length 512 and UserName length 32) and a DateTime. I pass string arguments to the ChatMessage constructor and convert them to byte…
HaLo2FrEeEk
  • 586
  • 7
  • 20
1
vote
1 answer

Using piped streams and jaxb

I cannot figure out whether I am using piped streams improperly or whether my problem is elsewhere in the issue below. I have an object (called 'adi') that I marshal into a file as shown below: final PipedInputStream pipedInputStream = new…
double07
  • 2,565
  • 2
  • 22
  • 22
1
vote
2 answers

Load, Use and the Unload an Assembly at runtime

I am working on a project where I have to load assemblies (lets call them tasks) at runtime, run the task and then be able to kill off the whole assembly so that the dll can be replaced without interrupting the main application. There are many of…
1
vote
2 answers

How can I determine the sizeof for an unmanaged array in C#?

I'm trying to optimize some code where I have a large number of arrays containing structs of different size, but based on the same interface. In certain cases the structs are larger and hold more data, othertimes they are small structs, and…
jsmars
  • 1,640
  • 5
  • 21
  • 33