I have a SOAP Header in my application. I need to add a new value of type item with key pcimask and value true to the ClientContext
my clientcontext looks like this when populated:
{EvryCardManagement.ws.card.DCSSCardCreate_V3_0.ClientContextType}
channel: "NBA"
channelField: "NBA"
credentials: "token string"
credentialsField: "string"
customerid: ""
customeridField: ""
ip: "123.456.789.123"
ipField: "123.456.789.123"
item: null
itemField: null
locale: null
localeField: null
orgid: "123456"
orgidField: "123456"
orgunit: "123456"
orgunitField: "123456"
userid: "name"
useridField: "name"
after the I need to add a new element called pcimask with a value true.
UPDATE: in the wsdl there is an element called item (within the ClientContext), and I need to add it to the SOAP Message Headers like this: <item key="pcimask" value="true"/>
In the web-service WSDL the item that I need to set is defined like this:
private itemType[] itemField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("item", IsNullable=true)]
public itemType[] item {
get {
return this.itemField;
}
set {
this.itemField = value;
}
}
and so in my code that sets these values I have this:
ClientContextType clientContext = new ClientContextType();
clientContext.userid = edb_service[0].userid;
clientContext.credentials = Common.SOToken;
//clientContext.pc
clientContext.orgid = edb_service[0].orgid;
clientContext.orgunit = edb_service[0].orgunit;
clientContext.customerid = "";
clientContext.channel = edb_service[0].channel;
clientContext.ip = edb_service[0].ip;
and after the ip element I want to set the item:
clientContext.item = edb_service[0].pcimask;
but it won't compile as it's like an array or list, and I need to add a new item so it shows up in the header xml like this:
<item key=”pcimask” value=”true”>
What do I need to do?
ClientContextTypeclass?item(within theClientContext), and I need to add it to the SOAP Message Headers like this:<item key="pcimask" value="true"/>and despite reading all over the web about Message Interceptors, and Soap Extensions, I am completely lost.Itemwhich I need to set.itemlist