Knowledge (XXG)

Marshalling (computer science)

Source đź“ť

157:-marshalling a dry object "on the server side" ie. demarshalling (or unmarshalling) to get a live object back: the serialized object is transformed into an internal data structure ie. a live object within the target runtime. It usually corresponds to the exact inverse process of marshalling, although sometimes both ends of the process trigger specific business logic. 1005:
When the root element is not declared globally, the application assists the unmarshaller by application-provided mapping using declaredType parameters. By an order of precedence, even if the root name has a mapping to an appropriate JAXB class, the declaredType overrides the mapping. However, if the
231:
here refers to a list of URLs where the object code can be loaded from, and not source code). Hence, in order to convert the object state and codebase(s), unmarshalling must be done. The unmarshaller interface automatically converts the marshalled data containing codebase(s) into an executable Java
978:
Unmarshal methods can deserialize an entire XML document or a small part of it. When the XML root element is globally declared, these methods utilize the JAXBContext's mapping of XML root elements to JAXB mapped classes to initiate the unmarshalling. If the mappings are not sufficient and the root
410:
While this typically results in a verbose wire format, XML's fully-bracketed "start-tag", "end-tag" syntax allows provision of more accurate diagnostics and easier recovery from transmission or disk errors. In addition, because the tags occur repeatedly, one can use standard compression methods to
236:
To "marshal" an object means to record its state and codebase(s) in such a way that when the marshalled object is "unmarshalled," a copy of the original object is obtained, possibly by automatically loading the class definitions of the object. You can marshal any object that is serializable or
141:
Serialization does not necessarily have this same intent, since it is only concerned about transforming data to generate that intermediate, "dry" representation of the object (for example, into a stream of bytes) which could then be either reified in a different runtime, or simply stored in a
864:
Unmarshalling is the process of converting the XML representation of Code Snippet 1 to the default executable Java representation of Code Snippet 2, and running that very code to get a consistent, live object back. Had a different format been chosen, the unmarshalling process would have been
184:" an object means to convert its state into a byte stream in such a way that the byte stream may be converted back into a copy of the object, which is unmarshalling in essence. Different programming languages either make or don’t make the distinction between the two concepts. A few examples: 987:
The unmarshal method uses JAXBContext to unmarshal the XML data, when the root element is globally declared. The JAXBContext object always maintains a mapping of the globally declared XML element and its name to a JAXB mapped class. If the XML element name or its
243:
Any object whose methods can be invoked must implement the java.rmi.Remote interface. When such an object is invoked, its arguments are marshalled and sent from the local virtual machine to the remote one, where the arguments are unmarshalled and
382:
is full of rendering data, the API could simply store the requested rendering call in a temporary buffer and, when the command buffer is close to being empty, it can perform a switch to kernel-mode and add a number of stored commands all at once.
237:
remote (that is, implements the java.rmi.Remote interface). Marshalling is like serialization, except marshalling also records codebases. Marshalling is different from serialization in that marshalling treats remote objects specially.
402:
is one such format and means of transferring data between systems. Microsoft, for example, uses it as the basis of the file formats of the various components (Word, Excel, Access, PowerPoint, etc.) of the Microsoft Office suite (see
992:
attribute matches the JAXB mapped class, the unmarshal method transforms the XML data using the appropriate JAXB mapped class. However, if the XML element name has no match, the unmarshal process will abort and throw an
465:
developers to marshal and unmarshal C# objects. One of the advantages of C# over Java is that C# natively supports marshalling due to the inclusion of XmlSerializer class. Java, on the other hand requires a non-native
137:
allowing the object’s structure, data and state to transit from a runtime to another, leveraging an intermediate, serialized, "dry" representation (which is of second importance) circulating onto the communication
366:
to complete. During this time, the CPU is unable to perform any operations. As such, minimizing the number of times this switching operation must be performed would optimize performance to a substantive degree.
422:
Once the data is transferred to a program or an application, it needs to be converted back to an object for usage. Hence, unmarshalling is generally used in the receiver end of the implementations of
1010:
attribute of the XML data has a mapping to an appropriate JAXB class, then this takes precedence over declaredType parameter. The unmarshal methods by declaredType parameters always return a
449:
is the most common framework used by developers to marshal and unmarshal Java objects. JAXB provides for the interconversion between fundamental data types supported by Java and standard
478:
An example of unmarshalling is the conversion of an XML representation of an object to the default representation of the object in any programming language. Consider the following class:
878:
The process of unmarshalling XML data into an executable Java object is taken care of by the in-built Unmarshaller class. The unmarshal methods defined in the Unmarshaller class are
1243: 266:
When you marshal an object by value, a copy of the object is created and serialized to the server. Any method calls made on that object are done on the server
1078: 979:
elements are declared locally, the unmarshal methods use declaredType methods for the unmarshalling process. These two approaches can be understood below.
391:
Marshalling data requires some kind of data transfer, which leverages a specific data format to be chosen as the serialization target.
191:, the term "marshal" is used for a specific type of "serialization" in the Python standard library – storing internal python objects: 146:
Marshalling and serialization might thus be done differently, although some form of serialization is usually used to do marshalling.
1103: 438: 348: 370:
Linux OpenGL drivers are split in two: a kernel-driver and a user-space driver. The user-space driver does all the translation of
195:
The marshal module exists mainly to support reading and writing the “pseudo-compiled” code for Python modules of .pyc files.
1466: 462: 134: 1217: 320: 188: 161: 309: 1247: 442: 212: 165: 1268: 290: 232:
object in JAXB. Any object that can be deserialized can be unmarshalled. However, the converse need not be true.
51: 43: 423: 375: 1383: 1431: 1407: 359: 305: 1083: 297: 113:
taken as abstract, mirrored concepts mapping to any matching ends of an arbitrary communication link ie.
427: 282: 259: 224: 227:. An object that is marshalled records the state of the original object and it contains the codebase ( 1461: 879: 47: 419:(JavaScript Object Notation) are more concise, but correspondingly less robust for error recovery. 1356: 378:. To reduce the number of system calls, the user-space driver implements marshalling. If the GPU's 286: 81: 75: 882:
to accept XML from different types of input such as a File, FileInputStream, or URL. For example:
1108: 328: 1291: 412: 340: 59: 354:
This is an issue because calling kernel-mode operations from user-mode requires performing a
1098: 450: 446: 300:(COM), interface pointers must be marshalled when crossing COM apartment boundaries. In the 216: 67: 31: 315:
Additionally, marshalling is used extensively within scripts and applications that use the
1332: 1093: 404: 324: 97:, although technically serialization is one step in the process of marshalling an object. 271:
How To Marshal an Object to a Remote Server by Value by Using Visual Basic .NET (Q301116)
379: 301: 169: 114: 63: 201:
If you’re serializing and de-serializing Python objects, use the pickle module instead
117:). The point with marshalling an object is to have that object that is present in one 1455: 327:
browser is a popular application built with this framework, that additionally allows
181: 94: 1319: 160:
The accurate definition of marshalling differs across programming languages such as
55: 312:
process, is also an example of an action that requires marshalling to take place.
1218:"How To Marshal an Object to a Remote Server by Value by Using Visual Basic .NET" 1221: 363: 355: 220: 1173: 1151: 1129: 362:
to switch to "kernel mode". This is a slow operation, taking on the order of
17: 467: 66:. It is typically used when data must be moved between different parts of a 1014:
instance. The properties of this JAXBElement instance are set as follows:
430:(RPC) mechanisms to unmarshal transmitted objects in an executable form. 344: 101:
Marshalling is describing the overall intent or process to transfer some
249:
Schema for Representing Java(tm) Objects in an LDAP Directory (RFC 2713)
1303: 865:
different, but the end result in the target runtime would be the same.
73:
Marshalling simplifies complex communications, because it allows using
1195: 997:. This can be avoided by using the unmarshal by declaredType methods. 371: 172:, and in some contexts, is used interchangeably with serialization. 1088: 316: 285:(RPC) mechanisms, where it is necessary to transport data between 1079:
Free and open-source graphics device driver#Software architecture
343:
family of operating systems the entire set of device drivers for
691:<?xml version="1.0" encoding="UTF-8"?> 416: 258:, marshalling is also used to refer to serialization when using 255: 1196:"Schema for Representing Java(tm) Objects in an LDAP Directory" 1130:"What is the difference between Serialization and Marshaling?" 411:
shrink the content—all the Office file formats are created by
399: 351:
is handled by the DirectX runtime provided by Microsoft.
331:
to use XPCOM through XPConnect (Cross-Platform Connect).
281:
Marshalling is used within implementations of different
347:
are kernel-mode drivers. The user-mode portion of the
223:, marshalling is used when serializing objects for 374:commands into machine code to be submitted to the 1320:https://docs.fileformat.com/word-processing/docx/ 304:, the conversion between an unmanaged type and a 1174:"marshal — Internal Python object serialization" 1152:"marshal — Internal Python object serialization" 264: 234: 193: 1333:"Binding XML Schemas - The Java EE 5 Tutorial" 176:Marshalling in different programming languages 93:Marshalling is similar to or synonymous with 8: 470:in the form of JAXB to support marshalling. 1305:Code Quality: The Open Source Perspective 415:the raw XML. Alternative formats such as 1016: 474:From XML to an executable representation 1120: 461:XmlSerializer is the framework used by 105:object from a client to a server (with 1220:. Microsoft. July 2004. Archived from 27:Computer memory transformation process 1378: 1376: 1244:"Apartments and COM Threading Models" 46:) is the process of transforming the 7: 983:Unmarshal a global XML root element 125:program; that is, an object on the 1001:Unmarshal a local XML root element 741:Executable representation of that 25: 1104:Java Architecture for XML Binding 675:XML representation of a specific 358:, and this inevitably forces the 319:technologies provided within the 70:or from one program to another. 54:into a data format suitable for 1357:"Using the XmlSerializer Class" 1273:Windows Desktop App Development 1269:"CoInitializeEx function (COM)" 1012:JAXBElement<declaredType> 79:instead of being restricted to 62:, especially between different 142:database, a file or in memory. 121:program be present in another 1: 688:<!-- Code Snippet 1 --> 321:Mozilla application framework 129:should be transferred to the 89:Comparison with serialization 1176:. Python Software Foundation 1154:. Python Software Foundation 1384:"Unmarshaller (JAXB 2.2.3)" 1292:Interop Marshaling Overview 1066:(actual size is not known) 206:The Python Standard Library 1483: 1432:"JAXBElement (JAXB 2.2.3)" 1408:"JAXBContext (JAXB 2.2.3)" 1132:. Stack Exchange Network 908:"com.acme.foo" 884: 748: 685: 480: 424:Remote Method Invocation 1042:instanceof declaredType 153:is somewhat similar to 1322:Accessed Oct 13, 2020. 1084:Component Object Model 974:Unmarshalling XML Data 298:Component Object Model 274: 252: 209: 1467:Remote procedure call 1318:What is a DOCX file? 1020:JAXBElement Property 965:"input.xml" 869:Unmarshalling in Java 802:"Jayaraman" 428:Remote procedure call 283:remote procedure call 50:representation of an 1198:. IETF. October 1999 874:Unmarshaller in JAXB 722:"21345589" 700:"11235813" 329:scripting languages 133:which is a form of 1361:msdn.microsoft.com 1109:Calling convention 995:UnmarshalException 929:createUnmarshaller 277:Usage and examples 1070: 1069: 1051:unmarshal method 856:"Shyam" 751:// Code Snippet 2 445:Architecture for 341:Microsoft Windows 225:remote invocation 82:primitive objects 76:composite objects 16:(Redirected from 1474: 1446: 1445: 1443: 1442: 1428: 1422: 1421: 1419: 1418: 1404: 1398: 1397: 1395: 1394: 1380: 1371: 1370: 1368: 1367: 1353: 1347: 1346: 1344: 1343: 1329: 1323: 1316: 1310: 1309: 1300: 1294: 1289: 1283: 1282: 1280: 1279: 1265: 1259: 1258: 1256: 1255: 1246:. Archived from 1240: 1234: 1233: 1231: 1229: 1214: 1208: 1207: 1205: 1203: 1192: 1186: 1185: 1183: 1181: 1170: 1164: 1163: 1161: 1159: 1148: 1142: 1141: 1139: 1137: 1128:Jeffrey Hantin. 1125: 1099:Protocol Buffers 1032:xml element name 1017: 1013: 1009: 991: 969: 966: 963: 960: 957: 954: 951: 948: 945: 942: 939: 936: 933: 930: 927: 924: 921: 918: 915: 912: 909: 906: 903: 900: 897: 894: 891: 888: 860: 857: 854: 851: 848: 845: 842: 839: 836: 833: 830: 827: 824: 821: 818: 815: 812: 809: 806: 803: 800: 797: 794: 791: 788: 785: 782: 779: 776: 773: 770: 767: 764: 761: 758: 755: 752: 736: 735:</student> 733: 729: 726: 723: 720: 717: 714: 713:</student> 711: 707: 704: 701: 698: 695: 692: 689: 670: 667: 664: 661: 658: 655: 652: 649: 646: 643: 640: 637: 634: 631: 628: 625: 622: 619: 616: 613: 610: 607: 604: 601: 598: 595: 592: 589: 586: 583: 580: 577: 574: 571: 568: 565: 562: 559: 556: 553: 550: 547: 544: 541: 538: 535: 532: 529: 526: 523: 520: 517: 514: 511: 508: 505: 502: 499: 496: 493: 490: 487: 484: 308:type, as in the 272: 250: 207: 68:computer program 32:computer science 21: 1482: 1481: 1477: 1476: 1475: 1473: 1472: 1471: 1452: 1451: 1450: 1449: 1440: 1438: 1430: 1429: 1425: 1416: 1414: 1406: 1405: 1401: 1392: 1390: 1382: 1381: 1374: 1365: 1363: 1355: 1354: 1350: 1341: 1339: 1337:docs.oracle.com 1331: 1330: 1326: 1317: 1313: 1302: 1301: 1297: 1290: 1286: 1277: 1275: 1267: 1266: 1262: 1253: 1251: 1242: 1241: 1237: 1227: 1225: 1216: 1215: 1211: 1201: 1199: 1194: 1193: 1189: 1179: 1177: 1172: 1171: 1167: 1157: 1155: 1150: 1149: 1145: 1135: 1133: 1127: 1126: 1122: 1117: 1094:Pickle (Python) 1075: 1011: 1007: 1003: 989: 985: 976: 971: 970: 967: 964: 961: 958: 955: 952: 949: 946: 943: 940: 937: 934: 931: 928: 925: 922: 919: 916: 913: 910: 907: 904: 901: 898: 895: 892: 889: 886: 876: 871: 862: 861: 858: 855: 852: 849: 846: 843: 840: 837: 834: 831: 828: 825: 822: 819: 816: 813: 810: 807: 804: 801: 798: 795: 792: 789: 786: 783: 780: 777: 774: 771: 768: 765: 762: 759: 756: 753: 750: 738: 737: 734: 731: 727: 724: 721: 718: 715: 712: 709: 705: 702: 699: 696: 693: 690: 687: 672: 671: 668: 665: 662: 659: 656: 653: 650: 647: 644: 641: 638: 635: 632: 629: 626: 623: 620: 617: 614: 611: 608: 605: 602: 599: 596: 593: 590: 587: 584: 581: 578: 575: 572: 569: 566: 563: 560: 557: 554: 551: 548: 545: 542: 539: 536: 533: 530: 527: 524: 521: 518: 515: 512: 509: 506: 503: 500: 497: 494: 491: 488: 485: 482: 476: 459: 436: 405:Office Open XML 397: 395:XML vs JSON vs… 389: 337: 325:Mozilla Firefox 296:In Microsoft's 289:and/or between 279: 273: 270: 251: 248: 208: 205: 178: 151:deserialization 91: 28: 23: 22: 15: 12: 11: 5: 1480: 1478: 1470: 1469: 1464: 1454: 1453: 1448: 1447: 1423: 1399: 1372: 1348: 1324: 1311: 1295: 1284: 1260: 1235: 1209: 1187: 1165: 1143: 1119: 1118: 1116: 1113: 1112: 1111: 1106: 1101: 1096: 1091: 1086: 1081: 1074: 1071: 1068: 1067: 1061: 1057: 1056: 1049: 1045: 1044: 1039: 1035: 1034: 1029: 1025: 1024: 1021: 1002: 999: 984: 981: 975: 972: 885: 875: 872: 870: 867: 749: 747: 746: 686: 684: 683: 481: 475: 472: 458: 455: 435: 432: 396: 393: 388: 385: 380:command buffer 336: 333: 302:.NET Framework 278: 275: 268: 246: 203: 177: 174: 144: 143: 139: 90: 87: 26: 24: 14: 13: 10: 9: 6: 4: 3: 2: 1479: 1468: 1465: 1463: 1460: 1459: 1457: 1437: 1436:jaxb.java.net 1433: 1427: 1424: 1413: 1412:jaxb.java.net 1409: 1403: 1400: 1389: 1388:jaxb.java.net 1385: 1379: 1377: 1373: 1362: 1358: 1352: 1349: 1338: 1334: 1328: 1325: 1321: 1315: 1312: 1307: 1306: 1299: 1296: 1293: 1288: 1285: 1274: 1270: 1264: 1261: 1250:on 2015-09-23 1249: 1245: 1239: 1236: 1224:on 2004-11-15 1223: 1219: 1213: 1210: 1197: 1191: 1188: 1175: 1169: 1166: 1153: 1147: 1144: 1131: 1124: 1121: 1114: 1110: 1107: 1105: 1102: 1100: 1097: 1095: 1092: 1090: 1087: 1085: 1082: 1080: 1077: 1076: 1072: 1065: 1062: 1059: 1058: 1054: 1050: 1048:declaredType 1047: 1046: 1043: 1040: 1037: 1036: 1033: 1030: 1027: 1026: 1022: 1019: 1018: 1015: 1000: 998: 996: 982: 980: 973: 883: 881: 873: 868: 866: 744: 740: 739: 732:</name> 710:</name> 682: 678: 674: 673: 479: 473: 471: 469: 464: 457:XmlSerializer 456: 454: 452: 448: 444: 440: 433: 431: 429: 425: 420: 418: 414: 408: 406: 401: 394: 392: 386: 384: 381: 377: 373: 368: 365: 361: 357: 352: 350: 346: 342: 334: 332: 330: 326: 322: 318: 313: 311: 307: 303: 299: 294: 292: 288: 284: 276: 267: 263: 261: 257: 245: 241: 238: 233: 230: 226: 222: 218: 214: 202: 199: 196: 192: 190: 185: 183: 175: 173: 171: 167: 163: 158: 156: 152: 147: 140: 136: 132: 128: 124: 120: 116: 112: 108: 104: 100: 99: 98: 96: 95:serialization 88: 86: 84: 83: 78: 77: 71: 69: 65: 61: 57: 53: 49: 45: 41: 37: 33: 19: 18:Unmarshalling 1439:. Retrieved 1435: 1426: 1415:. Retrieved 1411: 1402: 1391:. Retrieved 1387: 1364:. Retrieved 1360: 1351: 1340:. Retrieved 1336: 1327: 1314: 1304: 1298: 1287: 1276:. Retrieved 1272: 1263: 1252:. Retrieved 1248:the original 1238: 1226:. Retrieved 1222:the original 1212: 1200:. Retrieved 1190: 1178:. Retrieved 1168: 1156:. Retrieved 1146: 1134:. Retrieved 1123: 1063: 1053:declaredType 1052: 1041: 1031: 1004: 994: 986: 977: 914:Unmarshaller 877: 863: 742: 728:<name> 706:<name> 680: 676: 477: 460: 453:data types. 437: 421: 409: 398: 390: 369: 364:microseconds 353: 338: 314: 295: 280: 265: 260:remote calls 253: 242: 239: 235: 228: 210: 200: 197: 194: 186: 179: 159: 154: 150: 148: 145: 130: 126: 122: 118: 110: 106: 102: 92: 80: 74: 72: 60:transmission 39: 35: 29: 1462:Persistence 902:newInstance 896:JAXBContext 887:JAXBContext 716:<student 694:<student 447:XML Binding 356:system call 135:reification 44:US spelling 36:marshalling 1456:Categories 1441:2016-09-23 1417:2016-09-23 1393:2016-09-14 1366:2016-09-23 1342:2016-09-14 1278:2013-02-22 1254:2009-06-19 1228:4 November 1202:4 November 1158:4 November 1115:References 1055:parameter 880:overloaded 451:XML schema 426:(RMI) and 40:marshaling 1180:9 October 1008:@xsi:type 990:@xsi:type 950:unmarshal 708:Jayaraman 468:glue code 287:processes 215:-related 182:serialize 149:The term 1073:See also 838:21345589 784:11235813 345:Direct3D 310:P/Invoke 269:—  247:—  229:codebase 204:—  64:runtimes 1136:23 July 850:setName 820:Student 808:Student 796:setName 766:Student 754:Student 745:object: 743:Student 677:Student 588:setName 525:getName 507:private 495:private 489:Student 413:zipping 387:Formats 339:In the 335:Example 291:threads 211:In the 138:socket. 131:server, 123:running 119:running 115:sockets 56:storage 1060:scope 1038:value 1023:Value 935:Object 679:object 594:String 567:return 552:public 534:return 522:String 519:public 483:public 372:OpenGL 323:. The 219:  189:Python 168:, and 162:Python 127:client 111:server 107:client 52:object 48:memory 1089:CORBA 1028:name 832:setID 778:setID 730:Shyam 630:setID 558:getID 486:class 317:XPCOM 244:used. 1230:2016 1204:2016 1182:2019 1160:2016 1138:2021 1064:null 959:File 944:umar 923:jcon 917:umar 890:jcon 725:> 703:> 648:this 627:void 618:name 612:name 606:this 597:name 585:void 570:this 543:name 537:this 501:name 498:char 443:Java 439:JAXB 434:JAXB 417:JSON 407:). 256:.NET 221:2713 213:Java 180:To " 170:.NET 166:Java 109:and 103:live 968:)); 956:new 938:obj 932:(); 823:(); 817:new 769:(); 763:new 719:id= 697:id= 636:int 555:int 510:int 441:or 400:XML 376:GPU 360:CPU 349:API 306:CLR 254:In 217:RFC 187:In 85:. 58:or 38:or 30:In 1458:: 1434:. 1410:. 1386:. 1375:^ 1359:. 1335:. 1271:. 911:); 859:); 844:s2 841:); 826:s2 811:s2 805:); 790:s1 787:); 772:s1 757:s1 660:ID 654:ID 639:ID 576:ID 561:() 528:() 513:ID 463:C# 293:. 262:: 240:… 198:… 164:, 155:un 34:, 1444:. 1420:. 1396:. 1369:. 1345:. 1308:. 1281:. 1257:. 1232:. 1206:. 1184:. 1162:. 1140:. 962:( 953:( 947:. 941:= 926:. 920:= 905:( 899:. 893:= 853:( 847:. 835:( 829:. 814:= 799:( 793:. 781:( 775:. 760:= 681:: 669:} 666:} 663:; 657:= 651:. 645:{ 642:) 633:( 624:} 621:; 615:= 609:. 603:{ 600:) 591:( 582:} 579:; 573:. 564:{ 549:} 546:; 540:. 531:{ 516:; 504:; 492:{ 42:( 20:)

Index

Unmarshalling
computer science
US spelling
memory
object
storage
transmission
runtimes
computer program
composite objects
primitive objects
serialization
sockets
reification
Python
Java
.NET
serialize
Python
Java
RFC
2713
remote invocation
.NET
remote calls
remote procedure call
processes
threads
Component Object Model
.NET Framework

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑