Sorry for bothering everybody. I figured it out. I did it like:
soap_init(&mysoap);
mysoap.header = (SOAP_ENV__Header *)soap_malloc(&mysoap, sizeof(SOAP_ENV__Header));
mysoap.header->ns3__MyHeader = (ns3__Header*)malloc(sizeof(ns3__Header));
mysoap.header->ns3__MyHeader->Value = (char*)malloc(10 * sizeof(char));
strcpy(mysoap.header->ns3__MyHeader->Value, str);
But I had to suppress the MustUnderstand attribute like the following:
SOAP_FMAC3 int SOAP_FMAC4 soap_out_SOAP_ENV__Header(struct soap *soap, const char *tag, int id, const struct SOAP_ENV__Header *a, const char *type)
{
if (soap_element_begin_out(soap, tag, soap_embedded_id(soap, id, a, SOAP_TYPE_SOAP_ENV__Header), type))
return soap->error;
//KNG
//soap->mustUnderstand = 1;
if (soap_out_PointerTons3__Header(soap, "ns3:MyHeader", -1, &a->ns3__MyHeader, ""))
return soap->error;
return soap_element_end_out(soap, tag);
}