- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
全部。我有下一个问题。我想连接到具有模拟权限的邮箱。用户管理员具有模拟权限,我知道如何在 C# 中执行此操作。我有下一个代码:
ExchangeServiceBindingProxy *proxy = new ExchangeServiceBindingProxy(endpoint.c_str());
soap *pSoap = proxy->soap;
pSoap->userid = "Admin";
pSoap->passwd = "PASSWORD";
pSoap->ntlm_challenge = "";
pSoap->authrealm = "Ursa-Minor";
pSoap->ssl_flags = SOAP_SSL_NO_AUTHENTICATION;
pSoap->keep_alive = true;
soap_mode(pSoap,SOAP_IO_KEEPALIVE);
string smtp = "User1@no-such-email.com";
pSoap->header = new struct SOAP_ENV__Header();
pSoap->header->ns3__RequestServerVersion = new _ns3__RequestServerVersion();
pSoap->header->ns3__RequestServerVersion->Version = ns3__ExchangeVersionType__Exchange2007_USCORESP1;
if(!smtp.empty())
{
pSoap->header->ns3__ExchangeImpersonation = new ns3__ExchangeImpersonationType();
pSoap->header->ns3__ExchangeImpersonation->ConnectingSID = new ns3__ConnectingSIDType();
pSoap->header->ns3__ExchangeImpersonation->ConnectingSID->union_ConnectingSIDType.PrimarySmtpAddress = &smtp;
pSoap->header->ns3__ExchangeImpersonation->ConnectingSID->__union_ConnectingSIDType = 3;
}
作为结果,我有这个请求:
POST /ews/Exchange.asmx HTTP/1.1
Host: 192.168.0.49
User-Agent: gSOAP/2.8
Content-Type: text/xml; charset=utf-8
Content-Length: 1093
Connection: keep-alive
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAGoAAAAYABgAggAAABoAGgBAAAAACAAIAFoAAAAIAAgAYgAAAAAAAACaAAAABYKBAk4ATwAtAFMAVQBDAEgALQBFAE0AQQBJAEwASQB2AGEAbgBJAHYAYQBuAKEcAIkJWxEWBsuOv7MjtBpHLDWAL8JCTJ28+8Uotrb6QFrMa88HavXFTG1ddTR1VQ==
SOAPAction: "http://schemas.microsoft.com/exchange/services/2006/messages/GetFolder"
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns3="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns1="http://schemas.microsoft.com/exchange/services/2006/messages">
<SOAP-ENV:Header>
<ns3:ExchangeImpersonation SOAP-ENV:mustUnderstand="1">
<ns3:ConnectingSID>
<ns3:PrimarySmtpAddress>User1@no-such-email.com</ns3:PrimarySmtpAddress>
</ns3:ConnectingSID>
</ns3:ExchangeImpersonation>
<ns3:RequestServerVersion SOAP-ENV:mustUnderstand="1" Version="Exchange2007_SP1"></ns3:RequestServerVersion></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetFolder xsi:type="ns1:GetFolderType"><ns1:FolderShape><ns3:BaseShape>AllProperties</ns3:BaseShape></ns1:FolderShape><ns1:FolderIds><ns3:DistinguishedFolderId Id="msgfolderroot" xsi:type="ns3:DistinguishedFolderIdType"></ns3:DistinguishedFolderId></ns1:FolderIds></ns1:GetFolder></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
看似合法,但服务器响应返回错误:
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorInternalServerError</faultcode>
<faultstring xml:lang="en-US">An internal server error occurred. The operation failed.</faultstring>
<detail>
<e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorInternalServerError</e:ResponseCode>
<e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">An internal server error occurred. The operation failed.</e:Message>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
ns3:ExchangeImpersonation> !!! THERE IS SOMETHING WRONG
<ns3:RequestServerVersion SOAP-ENV:mustUnderstand="1" Version="Exchange2007_SP1"></ns3:RequestServerVersion>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:GetFolder xsi:type="ns1:GetFolderType">
<ns1:FolderShape><ns3:BaseShape>AllProperties</ns3:BaseShape></ns1:FolderShape>
<ns1:FolderIds>
<ns3:DistinguishedFolderId Id="msgfolderroot" xsi:type="ns3:DistinguishedFolderIdType"></ns3:DistinguishedFolderId>
</ns1:FolderIds>
</ns1:GetFolder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
响应甚至没有格式正确的 xml。好吧,我现在不知道如何解决这个问题。
最佳答案
要从 wsdl2h 生成的生成 SOAP header 的源代码声明中删除 mustunderstand
属性,请使用 wsdl2h 选项 -k。
关于c++ - EWS gSoap 连接与模拟,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19674803/
我需要在 gsoap 中启用 keep alive。 我尝试通过设置 soap.keep_alive = 1 并为输入/输出模式设置保持事件标志。 但我仍然没有观察到 wireshark 中的 kee
我知道如何为 gsoap 普通代码实现 http get,但是当我使用 gsoap 和 soapcpp2 -i 生成代码时,我没有可用的 soap_serve 函数,我不知道如何/在哪里重新实现 fg
我有一些关于使用 gSOAP 的问题用于解析 XML。如果有人对此有经验,请给我一些帮助。谢谢:D 我以前从不知道 XML,现在我需要将 XML 解析为 C 中的结构。然后我发现了一些使用 gSOAP
我刚开始使用 gsoap。我只使用 c++ 取得了 4 个小成功,但是我当前的项目限制了我设置源代码生成选项来创建纯 ANSI C(不是 c++)。我似乎无法成功调用该服务,错误返回为 0xC0000
您能否举例说明您是如何使用 gSOAP 以及它在您现有架构中的集成程度如何?您是否发现 gSOAP 的开发瓶颈? 最佳答案 我们将 gSOAP 用于一组 ARM 客户端与 AXIS Web 服务服务器
我目前正在使用 gSoap 的 soapcpp2 为我自己的数据类型生成 XML 序列化器/反序列化器。 我只是在头文件中定义我的类型,然后使用以下命令行将其提交到 soapcpp2: soapcpp
第 1 步,我使用 ASP.NET (C#) 创建了一个 WebService: [WebService(Namespace = "http://tempuri.org/")] [WebSer
我使用 gsoap 在我的 C 程序中实现一些 Web 服务。 我像这样使用gsoap: int motion_detector_check_status(const char *endpoint,
我有一个 SOAP 函数,其在 gSOAP 语法中定义为 //gsoap ns service method-documentation: get foo and bar int ns__getFoo
gsoap 生成函数来分配复杂类型,如下所示:soap_new_set_ns1__Date 我找不到如何只对一个整数做同样的事情。整数是可选的,因此必须以类似的方式分配。 谢谢。 最佳答案 您可以使用
我正在使用 gSOAP 从 SOAP 网络服务请求信息 soap 网络服务返回一个对象。我在名为“dataconnector”的调用中执行请求 在数据连接器中,我可以输出返回对象的所有值但除此之外,对
我正在使用带有 g++ 和 qmake 的 gsoap 编译一个程序。经过几个小时的工作,我从编译器中得到了这个错误: /usr/share/gsoap/import/ds.h:89:2: error
我们正在将 gsoap 版本从 2.7.8 升级到最新版本 2.8.33 当我们的 make 文件使用完全相同的标志运行 soapcpp2.exe 和 wsdl2h.exe 时,我没有得到完全相同的类
我目前正在使用 gSoap 库开发应用程序,并且对正确使用库有一些误解。我已经生成了包装我自己的类的代理对象(-j 标志),如下所示。应用程序必须 24/7 全天候工作并同时连接到多个摄像头(约 50
看起来 gSoap“忘记”生成很多东西了。我用过 wsdl2h.exe -o NumOpsService.h http://192.168.2.113/numops.wsdl soapcpp2.exe
我正在尝试构建我的第一个 gSoap 应用程序。即使给出的 calc 示例也无法为我编译。我遵循了自述文件,并执行了以下操作: 使用提供的工具将 wsdl 转换为 header (wsdl2h -s
我有三个网络服务。客户端、服务器和另一个服务器。第一台服务器充当第二台服务器的客户端。现在我有两个服务在同一台机器上运行。这些是单独的服务,但一个使用另一个。但是当我同时使用这两种服务时,会出现命名空
我使用 gSOAP 工具包生成 soap 服务和客户端,它应该发送一个 int 数组,该数组按照 gSOAP 文档中的建议放入结构中: //我的服务.h struct abc { int __
我已经使用 gSOAP 开发了网络服务。其中一种方法返回 json 输出。但是浏览器需要传递 header (Access-Control-Allow-Origin)。 gSOAP 是否支持在发送数据
我有一个带有两个 eth 卡的 Linux 系统。 eth0 和 eth1。我正在创建一个发送的客户端到端点 1.2.3.4。 我使用soap_call_函数发送我的网络服务。如何选择 eth1 而不
我是一名优秀的程序员,十分优秀!