๐Ÿ  Home > ๐Ÿ“ฆ TaskService > ๐Ÿ“‹ TaskMsgSave

TaskMsgSave

Description

new comment for the task signature string: string.Format("{0};{1};{2}", WMID, task_id, Secret)

Method Signature

public Int32 TaskMsgSave(
    String ServiceName,
    String Sign,
    String WMID,
    Int32 task_id,
    String Subj,
    String Msg,
    ref Int32 msg_id
)

Parameters

ServiceName

  • Type: String
  • Direction: input

Sign

  • Type: String
  • Direction: input

WMID

  • Type: String
  • Direction: input

task_id

  • Type: Int32
  • Direction: input

Subj

  • Type: String
  • Direction: input

Msg

  • Type: String
  • Direction: input

msg_id

  • Type: Int32
  • Direction: reference

Return Value

  • Type: Int32

Authentication

This method requires authentication signature.

Signature String Format

string.Format("{0};{1};{2}", WMID, task_id, Secret)

SOAP Request Example

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TaskMsgSave xmlns="http://mentor.web.money/taskservice">
      <ServiceName>ServiceName</ServiceName>
      <Sign>base64signature</Sign>
      <WMID>123456789012</WMID>
      <task_id>123</task_id>
      <Subj>string_value</Subj>
      <Msg>string_value</Msg>
      <msg_id>123</msg_id>
    </TaskMsgSave>
  </soap:Body>
</soap:Envelope>

SOAP Response Example

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TaskMsgSaveResponse xmlns="http://tempuri.org/">
      <TaskMsgSaveResult>123</TaskMsgSaveResult>
    </TaskMsgSaveResponse>
  </soap:Body>
</soap:Envelope>

Code Examples

C# Example

var client = new TaskService();
String ServiceName = "sample string";
String Sign = "base64signature";
String WMID = "123456789012";
Int32 task_id = 123;
String Subj = "sample string";
String Msg = "sample string";
Int32 msg_id = 123;

var result = client.TaskMsgSave(ServiceName, Sign, WMID, task_id, Subj, Msg, ref msg_id);

Python Example (using zeep)

from zeep import Client

client = Client('https://your-service.com/TaskService.asmx?WSDL')

# Prepare parameters
ServiceName = 'sample string'
Sign = 'base64signature'
WMID = '123456789012'
task_id = 123
Subj = 'sample string'
Msg = 'sample string'
msg_id = 123

result = client.service.TaskMsgSave(ServiceName, Sign, WMID, task_id, Subj, Msg, msg_id)
print(result)

JavaScript Example (using axios)

const axios = require('axios');

const soapRequest = `
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TaskMsgSave xmlns="http://mentor.web.money/taskservice">
      <ServiceName>${ServiceName}</ServiceName>
      <Sign>${Sign}</Sign>
      <WMID>${WMID}</WMID>
      <task_id>${task_id}</task_id>
      <Subj>${Subj}</Subj>
      <Msg>${Msg}</Msg>
      <msg_id>${msg_id}</msg_id>
    </TaskMsgSave>
  </soap:Body>
</soap:Envelope>`;

async function call() {
  const response = await axios.post(
  'https://mentor.web.moneyTaskService.asmx',
  soapRequest,
  {
    headers: {
      'Content-Type': 'text/xml; charset=utf-8',
      'SOAPAction': '"http://mentor.web.money/taskservice/TaskMsgSave"'
    }
  }
);

  console.log(response.data);
}
call().catch(console.error);

โฌ†๏ธ Back to TaskService | ๐Ÿ  Documentation Home | ๐Ÿ’ป Code Examples

results matching ""

    No results matching ""