I have researched all MSDN information on SoapHeaders and have built the solution the way Microsoft says to. That actually happens to be my problem. What they suggest is that you create a class derived from the SoapHeader class and include a string member to hold the value for the header. The problem is that the SoapHeader class creates the tag from the name of your derived class and then creates another tag off of your variable name within that class. I need something different, some other answer. Below is an example:
public __gc class HostArea : public SoapHeader
{
public: String * Value;
};
You attach it to your WebMethod as so:
HostArea * myHeader;
[WebMethod]
[SoapHeader(S"myHeader")]
InstantTransactionResult * InstantTransactionRequest(String * GUID, String * XMLInstantTransaction);
You call it inside the class as so:
String * sHostName = S"";
char szTempHostName[50];
GetRRNhost (szTempHostName, sizeof(szTempHostName));
sHostName = &szTempHostName[2];
myHeader->Value = sHostName;
And it Produces:
<soapenv:Header>
<c28:HostArea>
<!--Optional:-->
<c28:Value>BET</c28:Value>
</c28:HostArea>
</soapenv:Header>
This is a problem because what the receiving code on the server wants to see is this:
<soapenv:Header>
<c28:HostArea>BET</c28:HostArea>
</soapenv:Header>
Has anyone come across this issue before? Can anyone help me?