求大神帮忙写个例子让我参考下,中国移动的短信彩信API网址是http://117.79.237.3:8060/webservice.asmx,但不知道该怎么样,我想用MFC写一个短信网关,往移动服务器发数据时不知道该怎么调用,大神们给个例子是最好的了
解决方案 »
- 多线程问题
- 100分,求个简单的问题
- vc2005能否链接vc6产生的lib库文件?
- 在C++中调用Lib库出问题,大家给看看,谢谢~
- GDI+里面的Image::FromFile()用的时候老出错,怎么回事?(内详)
- 请教:有了MFC类库还用得着C++标准类库吗?就是说MFC类库是否包含了C++标准类库的内容和功能?MFC类库是否可以实现C++标准类库中所有的函
- 打印中怎么手动设置打印参数,如纸张大小,打印份数等,而不弹出打印机设置对话框?
- AP层 如何和 USB HUB 通讯?
- VC++编程高手这里进(C++高手通讯录)
- 有谁知道网管软件是什么,请帮忙解释一下,用什么语言开发最好?
- 若干图片拼接和读取
- MFC中 的OnSize被调用的问题
{ soap_imode(this, imode);
soap_omode(this, omode);
soap_endpoint = NULL;
static const struct Namespace namespaces[] =
{
{"SOAP-ENV", "http://www.w3.org/2003/05/soap-envelope", "http://www.w3.org/2003/05/soap-envelope", NULL},
{"SOAP-ENC", "http://www.w3.org/2003/05/soap-encoding", "http://www.w3.org/2003/05/soap-encoding", NULL},
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
{"ns2", "http://tempuri.org/WebServiceSoap", NULL, NULL},
{"ns1", "http://tempuri.org/", NULL, NULL},
{"ns3", "http://tempuri.org/WebServiceSoap12", NULL, NULL},
{NULL, NULL, NULL, NULL}
};
this->namespaces = namespaces;
}int WebServiceSoapProxy::SendSMS(_ns1__SendSMS *ns1__SendSMS, _ns1__SendSMSResponse *ns1__SendSMSResponse)
{ struct soap *soap = this;
struct __ns2__SendSMS soap_tmp___ns2__SendSMS;
const char *soap_action = NULL;
if (!soap_endpoint)
soap_endpoint = soap_ServicePoint;
soap_action = "http://tempuri.org/SendSMS";
soap->encodingStyle = NULL;
soap_tmp___ns2__SendSMS.ns1__SendSMS = ns1__SendSMS;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns2__SendSMS(soap, &soap_tmp___ns2__SendSMS);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns2__SendSMS(soap, &soap_tmp___ns2__SendSMS, "-ns2:SendSMS", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns2__SendSMS(soap, &soap_tmp___ns2__SendSMS, "-ns2:SendSMS", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!ns1__SendSMSResponse)
return soap_closesock(soap);
ns1__SendSMSResponse->soap_default(soap);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
ns1__SendSMSResponse->soap_get(soap, "ns1:SendSMSResponse", "");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}int WebServiceSoapProxy::SendSMS_USCORER(_ns1__SendSMS_USCORER *ns1__SendSMS_USCORER, _ns1__SendSMS_USCORERResponse *ns1__SendSMS_USCORERResponse)
{ struct soap *soap = this;
struct __ns2__SendSMS_USCORER soap_tmp___ns2__SendSMS_USCORER;
const char *soap_action = NULL;
if (!soap_endpoint)
soap_endpoint = soap_ServicePoint;
soap_action = "http://tempuri.org/SendSMS_R";
soap->encodingStyle = NULL;
soap_tmp___ns2__SendSMS_USCORER.ns1__SendSMS_USCORER = ns1__SendSMS_USCORER;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns2__SendSMS_USCORER(soap, &soap_tmp___ns2__SendSMS_USCORER);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns2__SendSMS_USCORER(soap, &soap_tmp___ns2__SendSMS_USCORER, "-ns2:SendSMS_R", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns2__SendSMS_USCORER(soap, &soap_tmp___ns2__SendSMS_USCORER, "-ns2:SendSMS_R", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!ns1__SendSMS_USCORERResponse)
return soap_closesock(soap);
ns1__SendSMS_USCORERResponse->soap_default(soap);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
ns1__SendSMS_USCORERResponse->soap_get(soap, "ns1:SendSMS_RResponse", "");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}int WebServiceSoapProxy::SendSMSEx(_ns1__SendSMSEx *ns1__SendSMSEx, _ns1__SendSMSExResponse *ns1__SendSMSExResponse)
{ struct soap *soap = this;
struct __ns2__SendSMSEx soap_tmp___ns2__SendSMSEx;
const char *soap_action = NULL;
if (!soap_endpoint)
soap_endpoint = soap_ServicePoint;
soap_action = "http://tempuri.org/SendSMSEx";
soap->encodingStyle = NULL;
soap_tmp___ns2__SendSMSEx.ns1__SendSMSEx = ns1__SendSMSEx;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns2__SendSMSEx(soap, &soap_tmp___ns2__SendSMSEx);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns2__SendSMSEx(soap, &soap_tmp___ns2__SendSMSEx, "-ns2:SendSMSEx", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns2__SendSMSEx(soap, &soap_tmp___ns2__SendSMSEx, "-ns2:SendSMSEx", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!ns1__SendSMSExResponse)
return soap_closesock(soap);
ns1__SendSMSExResponse->soap_default(soap);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
ns1__SendSMSExResponse->soap_get(soap, "ns1:SendSMSExResponse", "");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}int WebServiceSoapProxy::SendSMSEx_USCORER(_ns1__SendSMSEx_USCORER *ns1__SendSMSEx_USCORER, _ns1__SendSMSEx_USCORERResponse *ns1__SendSMSEx_USCORERResponse)
{ struct soap *soap = this;
struct __ns2__SendSMSEx_USCORER soap_tmp___ns2__SendSMSEx_USCORER;
const char *soap_action = NULL;
if (!soap_endpoint)
soap_endpoint = soap_ServicePoint;
soap_action = "http://tempuri.org/SendSMSEx_R";
soap->encodingStyle = NULL;
soap_tmp___ns2__SendSMSEx_USCORER.ns1__SendSMSEx_USCORER = ns1__SendSMSEx_USCORER;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___ns2__SendSMSEx_USCORER(soap, &soap_tmp___ns2__SendSMSEx_USCORER);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns2__SendSMSEx_USCORER(soap, &soap_tmp___ns2__SendSMSEx_USCORER, "-ns2:SendSMSEx_R", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___ns2__SendSMSEx_USCORER(soap, &soap_tmp___ns2__SendSMSEx_USCORER, "-ns2:SendSMSEx_R", NULL)
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!ns1__SendSMSEx_USCORERResponse)
return soap_closesock(soap);
ns1__SendSMSEx_USCORERResponse->soap_default(soap);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
ns1__SendSMSEx_USCORERResponse->soap_get(soap, "ns1:SendSMSEx_RResponse", "");
if (soap->error)
return soap_recv_fault(soap, 0);
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}这些是什么意思啊 哪位大神能给提供下注释