Genivia Home Documentation
_xop__Include Struct Reference

updated Tue Aug 27 2024 by Robert van Engelen
 
_xop__Include Struct Reference

XOP include structure with attachment data. More...

Public Attributes

unsigned char * __ptr
 pointer to binary data More...
 
int __size
 size of the binary data More...
 
char * id
 NULL to generate an id or assign this member variable a unique UUID. More...
 
char * type
 MIME type of the data. More...
 
char * options
 description of the MIME/MTOM attachment or NULL More...
 

Detailed Description

XOP include structure with attachment data.

This structure may be declared in the interface header file for soapcpp2 and defines a XOP type with optional MTOM attachment data to support the XML-binary optimized packaging https://www.w3.org/TR/xop10 format. This structure is pre-defined in gsoap/import/xop.h and is used to serialize binary data in base64 or as a DIME/MIME/MTOM attachment. An attachment is serialized when either id, type or options member variables are non-NULL.

Example:
// example .h file for soapcpp2
//gsoap ns service name: example
//gsoap ns service namespace: urn:example
#import "import/xop.h"
int ns__webmethod(struct _xop__Include *data, struct _xop__Include *result);
// example service implementation based on the above example .h file for soapcpp2
#include "soapH.h"
int main()
{
struct soap *soap = soap_new();
... // serve requests with soap_bind, soap_accept, soap_ssl_accept, and soap_serve
}
int ns__webmethod(struct soap *soap, struct _xop__Include *data, struct _xop__Include *result)
{
// strip id, type and options to return base64 data in XML
result->__ptr = data->__ptr;
result->__size = data->__size;
retult->id = NULL;
retult->type = NULL;
retult->options = NULL;
return SOAP_OK;
}
See also
xsd__base64Binary, xsd__hexBinary.

Member Data Documentation

unsigned char* _xop__Include::__ptr

pointer to binary data

int _xop__Include::__size

size of the binary data

char* _xop__Include::id

NULL to generate an id or assign this member variable a unique UUID.

char* _xop__Include::options

description of the MIME/MTOM attachment or NULL

char* _xop__Include::type

MIME type of the data.