An object of InwiseMessage with the following fields :
Java Code:
//get a reference to the service InwiseWebServices ws = new InwiseWebServices();
InwiseWebServicesSoap inwiseWebServicesSoap = ws.getInwiseWebServicesSoap();
//fill the security header
HeaderHandler hh = new HeaderHandler("myusername", "myPassword");
hh.setHeader(inwiseWebServicesSoap);
//create a new instance of InwiseMessage
inwise.InwiseMessage msg = new inwise.InwiseMessage();
//now set the message fields
//the message body
msg.setBody("<h2>message body</h2>");
//the message charset
msg.setCharSet( "utf-8");//this must be legall charset
//the from address
msg.setFrom( "myCompany@company.com");
//the message subject
msg.setSubject( "message subject");
//the message type
msg.setMessageType( "html");
//the reply to address
msg.setReplyTo( "replies@company.com");
//the sender name
msg.setSenderName( "Tal Giladi");
//the send id for tracking the message
msg.setSendId(388);//You need to save this value for future queries
//the recipient id, this number is for your own tracking use only and not a real id from our system
int recipientid = 343;
//the email address
String email = "email@email.com";
//custom fields to be replaced in the message
inwise.ArrayOfCustomFieldValue fields = new ArrayOfCustomFieldValue();
fields.customFieldValue = new ArrayList<CustomFieldValue>();
CustomFieldValue field1 = new CustomFieldValue();//string field
field1.setLocalName("field1");
field1.setFieldValue("my first name");
fields.customFieldValue.add(field1);
CustomFieldValue field23 = new CustomFieldValue();//date field
field23.setLocalName("field23");
field23.setFieldValue(new Date());
fields.customFieldValue.add(field23);
CustomFieldValue field28 = new CustomFieldValue();//int field
field28.setLocalName("field28");
field28.setFieldValue(30);
fields.customFieldValue.add(field28);
//call the operation
String transactionId = inwiseWebServicesSoap.sendingSendIndividualNewMessage( msg, recipientid, email,fields);
C# Code:
//get a reference to the service
InwiseWebServices.InwiseWebServices ws = new InwiseWebServices.InwiseWebServices();
//fill the security header
InwiseWebServices.SecHeader header = new InwiseWebServices.SecHeader();
header.username = "username";
header.pass = "myPassword";
ws.SecHeaderValue = header;//set credentials
//create a new instance of InwiseMessage
InwiseWebServices.InwiseMessage msg = new InwiseWebServices.InwiseMessage();
//now set the message fields
//the message body
msg.Body = "<h2>message body</h2>";
//the message charset
msg.CharSet = "utf-8";//this must be legall charset
//the from address
msg.From = "myCompany@company.com";
//the message subject
msg.Subject = "message subject";
//the message type
msg.MessageType = "html";
//the reply to address
msg.ReplyTo = "replies@company.com";
//the sender name
msg.SenderName = "Tal Giladi";
//the send id for tracking the message
msg.SendId = 388;//You need to save this value for future queries
//the recipient id, this number is for your own tracking use only and not a real id from our system
int recipientid = 343;
//the email address
string email = "email@email.com";
//custom fields to be replaced in the message
InwiseWebServices.CustomFieldValue[] fields = new InwiseWebServices.CustomFieldValue[2];
fields[0] = new InwiseWebServices.CustomFieldValue();
fields[0].LocalName = "field1";
fields[0].FieldValue = "Tal Giladi";
fields[1] = new InwiseWebServices.CustomFieldValue();
fields[1].LocalName = "field28";
fields[1].FieldValue = 30;
//call the operation
string transactionId = ws.Sending_SendIndividualNewMessage( msg, recipientid, email, fields);
VB Code:
'get a reference to the service
Dim ws As InwiseWebServices.InwiseWebServices = New InwiseWebServices.InwiseWebServices()
'fill the security header
Dim header As InwiseWebServices.SecHeader = New InwiseWebServices.SecHeader()
header.username = "username"
header.pass = "myPassword"
ws.SecHeaderValue = header 'set credentials
'create a new instance of InwiseMessage
Dim msg As InwiseWebServices.InwiseMessage = New InwiseWebServices.InwiseMessage()
'now set the message fields
'the message body
msg.Body = "message body>"
'the message charset
msg.CharSet = "utf-8" 'this must be legall charset
'the from address
msg.From = "myCompany@company.com"
'the message subject
msg.Subject = "message subject"
'the message type
msg.MessageType = "html"
'the reply to address
msg.ReplyTo = "replies@company.com"
'the sender name
msg.SenderName = "Tal Giladi"
'the send id for tracking the message
msg.SendId = 388 'You need to save this value for future queries
'the recipient id, this number is for your own tracking use only and not a real id from our system
Dim recipientid As Integer = 343
'the email address
Dim email As String = "email@email.com"
'custom fields to be replaced in the message
Dim fields() As InwiseWebServices.CustomFieldValue = New InwiseWebServices.CustomFieldValue(2) {}
fields(0) = New InwiseWebServices.CustomFieldValue()
fields(0).LocalName = "field1"
fields(0).FieldValue = "Tal Giladi"
fields(1) = New InwiseWebServices.CustomFieldValue()
fields(1).LocalName = "field28"
fields(1).FieldValue = 30
'call the operation
Dim transactionId As String = ws.Sending_SendIndividualNewMessage(msg, recipientid, email, fields)