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
2
votes
1 answer

Yet another marshalling exception with JAXB and List

Here is my Request class which holds a generics request: import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import…
LordDoskias
  • 3,121
  • 3
  • 30
  • 44
2
votes
1 answer

Invalid structure size when marshalling c structure to .NET

I'm experiencing a problem with the following c-structure: typedef struct tagTEXTUREPROP { DWORD dwSize; DOUBLE eGloss; DOUBLE eContrast; BOOL bRepeat; DOUBLE eDropX; DOUBLE eDropY; DOUBLE ePlacingPointX; DOUBLE…
Michael
  • 25
  • 3
2
votes
1 answer

Invalid Managed/Unmanaged Type Combination With Embedded, Dynamically-Allocated Array

I have a common construct in an unmanaged Win32 C++ DLL: // FirstElemPtrContainer.h #include "stdafx.h" typedef unsigned char elem_type; // a byte typedef struct FirstElemPtrContainer { unsigned char num_elems; void *allocd_ary; }…
Buggieboy
  • 4,636
  • 4
  • 55
  • 79
2
votes
3 answers

Python - the best way to serialize data with high performance?

I need to serialize a data which requires high performance. Separated thread will be accessing it each second and must to load data to memory. There will be about 1000 - 10000 dictionary-like entries about user sessions (id, sessid, login date).…
tunarob
  • 2,768
  • 4
  • 31
  • 48
2
votes
3 answers

Array change in C++ function is not preserved in C#

I have a C# code calling a C++ function. The C++ function should fill a buffer passed with a pointer. However, the array returns empty. The import declaration is: [DllImport("ProjectLogicInterface", EntryPoint = "FillArr", CallingConvention =…
sara
  • 3,824
  • 9
  • 43
  • 71
1
vote
2 answers

JAXB unmarshalling not working

I´ve set up a project to test marshalling for another project. Marshalling is working. I get the correct xml file, but unmarshalling is NOT working. I only get the Relation name (String). The attributes and functional dependencies are missing. EDIT:…
Andreas Freitag
  • 357
  • 1
  • 7
  • 20
1
vote
1 answer

Reinterpreting UInt64 as structure

In my code I'm calculating an UInt64 value, then casting it like this: return *(Cell*)packedUInt64; Cell is a struct. Marshal.SizeOf(new Cell()) prints 8, so it should match an UInt64, but the cast above crashes with AccessViolationException. I…
Stefan Monov
  • 11,332
  • 10
  • 63
  • 120
1
vote
3 answers

Java: String to byte array conversion

I am getting some unexpected results from what I thought was a simple test. After running the following: byte [] bytes = {(byte)0x40, (byte)0xE2, (byte)0x56, (byte)0xFF, (byte)0xAD, (byte)0xDC}; String s = new String(bytes,…
Plastech
  • 757
  • 6
  • 17
1
vote
1 answer

.NET STA Com Object from MTA apartment

I'm working on a site (MVC) at the moment, which uses ajax quite heavily to request data from slow responding asynchronous resources. I have a problem though, every request has to first be authorised, and part of that authorisation is to get the…
Stono
  • 2,337
  • 2
  • 16
  • 18
1
vote
3 answers

System.AccessViolation due to Marshal.StructureToPtr

I am using Trhird party tool in my application. On some systems i get the System.AccessViolation error. Although, through code i am not able to reproduce the issue. But in the production environment it does reproduce at some time. I have the doubt…
Learner
  • 1,490
  • 2
  • 22
  • 35
1
vote
2 answers

How do I implement a Marshalling class in Java?

I need to implement a Marshalling class in Java. Basically I understand Marshalling is use to format the data so that it can be send through socket network and then unmarshalling it on server side. Correct me if I am wrong thanks. Then this 2…
user236501
  • 8,538
  • 24
  • 85
  • 119
1
vote
2 answers

JAXBElement over an ArrayList?

How to marshall a List of JAXBElement ? I've got one POJO I cannot annotate, for instance: public class APojo { private String aString; public APojo() { super(); } public String getAString() { return aString; } public void…
thomas.g
  • 3,894
  • 3
  • 29
  • 36
1
vote
2 answers

How can I tell if cbSize should be int or uint in MonitorInfo?

I'm trying to do some multi-monitor stuff using Platform Invoke. I've been using http://pinvoke.net to get me started but I've hit a problem where definitions don't agree. In MONITORINFO (user32) (and MONITORINFOEX (user32)), size is defined…
SGarratt
  • 984
  • 1
  • 8
  • 22
1
vote
2 answers

Marshalling exception with char arrays

I have some issues with marshalling script giving an exception. I have C++ structs that I try to mimic in C# for testing a system we have. The C++ struct looks like this: #pragma pack(1) typedef struct { ACE_UINT32 result; ACE_UINT32 command; …
Andreas
  • 539
  • 1
  • 5
  • 13
1
vote
1 answer

Spring-Hibernate How to do paginated marshal with JAXB xml bind

There is a really huge data set that being expected to be inserted into an xml. I decided to use jaxb.xml.bind.Marshaller. Because of that huge data, I have to select that data from db by pagination. I mean, for instance, I have to get 10.000 row…
javatar
  • 4,542
  • 14
  • 50
  • 67