Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java FindItems(电子邮件)限制为最新_Java_Cxf_Exchangewebservices - Fatal编程技术网

Java FindItems(电子邮件)限制为最新

Java FindItems(电子邮件)限制为最新,java,cxf,exchangewebservices,Java,Cxf,Exchangewebservices,我试图根据“收到”或“发送”日期搜索电子邮件 这是我的要求: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <MailboxCulture xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.mi

我试图根据“收到”或“发送”日期搜索电子邮件

这是我的要求:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <MailboxCulture xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.microsoft.com/exchange/services/2006/types">de-AT</MailboxCulture>
    <RequestServerVersion xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2013" />
  </soap:Header>
  <soap:Body>
    <ns2:FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" Traversal="Shallow">
      <ns2:ItemShape>
        <BaseShape>IdOnly</BaseShape>
      </ns2:ItemShape>
      <ns2:Restriction>
        <And>
          <IsEqualTo>
            <Path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PathToUnindexedFieldType" FieldURI="item:ItemClass" />
            <FieldURIOrConstant>
              <Constant Value="IPM.NOTE" />
            </FieldURIOrConstant>
          </IsEqualTo>
          <IsGreaterThanOrEqualTo>
            <Path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PathToUnindexedFieldType" FieldURI="item:DateTimeReceived" />
            <FieldURIOrConstant>
              <Constant Value="2013-03-13T09:00:00Z" />
            </FieldURIOrConstant>
          </IsGreaterThanOrEqualTo>
          <IsLessThanOrEqualTo>
            <Path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PathToUnindexedFieldType" FieldURI="item:DateTimeReceived" />
            <FieldURIOrConstant>
              <Constant Value="2013-12-13T09:00:00Z" />
            </FieldURIOrConstant>
          </IsLessThanOrEqualTo>
        </And>
      </ns2:Restriction>
      <ns2:ParentFolderIds>
        <DistinguishedFolderId Id="inbox" />
      </ns2:ParentFolderIds>
    </ns2:FindItem>
  </soap:Body>
</soap:Envelope>

德阿特
我只
但我只得到以下错误:

WARNING: Interceptor for {http://schemas.microsoft.com/exchange/services/2006/messages}ExchangeService#{http://schemas.microsoft.com/exchange/services/2006/messages}FindItem has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Could not send Message. .. Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '503: Service Unavailable' when communicating with https://mail.rbes.local/ews/exchange.asmx 警告:拦截器用于{http://schemas.microsoft.com/exchange/services/2006/messages}交换服务#{http://schemas.microsoft.com/exchange/services/2006/messages}FindItem已引发异常,正在解除 org.apache.cxf.interceptor.Fault:无法发送消息。 .. 原因:org.apache.cxf.transport.http.HTTPException:与进行通信时http响应“503:服务不可用”https://mail.rbes.local/ews/exchange.asmx 如果我忽略了限制,我会得到一个有效的响应

有人能帮我吗

其他请求相同错误:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <MailboxCulture xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.microsoft.com/exchange/services/2006/types">de-AT</MailboxCulture>
    <RequestServerVersion xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" Version="Exchange2013" />
  </soap:Header>
  <soap:Body>
    <ns2:FindItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ns2="http://schemas.microsoft.com/exchange/services/2006/messages" Traversal="Shallow">
        <ns2:ItemShape>
            <BaseShape>IdOnly</BaseShape>
        </ns2:ItemShape>
        <ns2:Restriction>
            <IsLessThanOrEqualTo>
                <Path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="PathToUnindexedFieldType" FieldURI="item:DateTimeReceived" />
                <FieldURIOrConstant>
                    <Constant Value="2013-12-13T09:00:00Z" />
                </FieldURIOrConstant>
            </IsLessThanOrEqualTo>
        </ns2:Restriction>
        <ns2:ParentFolderIds>
            <DistinguishedFolderId Id="inbox" />
        </ns2:ParentFolderIds>
    </ns2:FindItem>
  </soap:Body>
</soap:Envelope>

德阿特
我只

使用JWebServices为Exchange发送请求有效请求生成为:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
  <t:RequestServerVersion Version="Exchange2013"/>
</soap:Header>
<soap:Body>
  <FindItem Traversal="Shallow" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
    <ItemShape>
      <t:BaseShape>IdOnly
      </t:BaseShape>
    </ItemShape>
    <Restriction>
      <t:And>
        <t:IsEqualTo>
          <t:FieldURI FieldURI="item:ItemClass" />
          <t:FieldURIOrConstant>
             <t:Constant Value="IPM.Note"/>
          </t:FieldURIOrConstant>
        </t:IsEqualTo>
        <t:IsGreaterThanOrEqualTo>
          <t:FieldURI FieldURI="item:DateTimeReceived" />
          <t:FieldURIOrConstant>
             <t:Constant Value="2013-03-12T23:00:00Z"/>
          </t:FieldURIOrConstant>
        </t:IsGreaterThanOrEqualTo>
        <t:IsLessThanOrEqualTo>
          <t:FieldURI FieldURI="item:DateTimeReceived" />
          <t:FieldURIOrConstant>
             <t:Constant Value="2013-03-12T23:00:00Z"/>
          </t:FieldURIOrConstant>
        </t:IsLessThanOrEqualTo>
      </t:And>
    </Restriction>
    <ParentFolderIds>
      <t:DistinguishedFolderId Id="inbox">
      </t:DistinguishedFolderId>
    </ParentFolderIds>
  </FindItem>
</soap:Body>
</soap:Envelope>

我只

这些嵌套的SearchExpression标记在做什么?我觉得很奇怪。顺便说一句,《微软Exchange Server 2007内部Web服务》(大卫·斯特林;本·西班牙;迈克尔·梅纳;马克·泰勒;休·厄普索尔)是一本很好的参考书。你说得对!我现在已经更正了请求,但仍然是相同的错误在您的条件下路径节点看起来也很奇怪