|  | Home | Documentation | _xop__Include Struct Reference updated by Robert van Engelen |

_xop__Include Struct Reference
DIME attachment functions

XOP include structure with attachment data. More...

`#include <stdsoap2.h>`

## Public Attributes

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

## 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);
_xop__Include
XOP include structure with attachment data.
Definition stdsoap2.h:10091
// 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;
}
SOAP_OK
#define SOAP_OK
The soap_status code for no error (zero).
Definition stdsoap2.h:2392
_xop__Include::__size
int __size
size of the binary data
Definition stdsoap2.h:10093
_xop__Include::__ptr
unsigned char * __ptr
pointer to binary data
Definition stdsoap2.h:10092
soap
Context with the engine state.
Definition stdsoap2.h:2929

See also
  xsd__base64Binary, xsd__hexBinary.

## Member Data Documentation

## ◆ __ptr

unsigned char* _xop__Include::__ptr

pointer to binary data

## ◆ __size

int _xop__Include::__size

size of the binary data

## ◆ id

char* _xop__Include::id

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

## ◆ options

char* _xop__Include::options

description of the MIME/MTOM attachment or NULL

## ◆ type

char* _xop__Include::type

MIME type of the data.