[EWS JAVA API 1.2] Receiving answer in SOAP 1.2, however request in SOAP 1.2. Getting exception ServiceXmlDeserializationException. RRS feed

  • Question

  • Hi 

    I am using EWS JAVA API 1.2 to connect to Exchange 2007 SP3 and I am getting ServiceXmlDeserializationException with message An element node 'soap:Envelope' of the type START_ELEMENT was expected, but node '{}Envelope' of type START_ELEMENT was found.

    And for some reason I am getting response in SOAP 1.2 format.

    Request text:

    <?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:m="" xmlns:t=""><soap:Header><t:RequestServerVersion Version="Exchange2010_SP2" /></soap:Header><soap:Body><m:GetFolder><m:FolderShape><t:BaseShape>AllProperties</t:BaseShape></m:FolderShape><m:FolderIds><t:DistinguishedFolderId Id="inbox" /></m:FolderIds></m:GetFolder></soap:Body></soap:Envelope>

    Response text:

    <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd=""><soap:Header><t:ServerVersionInfo MajorVersion="8" MinorVersion="3" MajorBuildNumber="83" MinorBuildNumber="4" xmlns:t="" /></soap:Header><soap:Body><soap:Fault><soap:Code><soap:Value>soap:Sender</soap:Value><soap:Subcode><soap:Value xmlns:q0="">q0:ErrorInvalidServerVersion</soap:Value></soap:Subcode></soap:Code><soap:Reason><soap:Text xml:lang="en">The specified server version is invalid.</soap:Text></soap:Reason><detail><e:ResponseCode xmlns:e="">ErrorInvalidServerVersion</e:ResponseCode><e:Message xmlns:e="">The specified server version is invalid.</e:Message></detail></soap:Fault></soap:Body></soap:Envelope> 

    Monday, January 27, 2014 11:39 AM

All replies

  • >>I am using EWS JAVA API 1.2 to connect to Exchange 2007 SP3

    In your request you have set the server version to Exchange2010 eg

    ><t:RequestServerVersion Version="Exchange2010_SP2" /></soap:Header><soap:Body><m:GetFolder>

    So the server is reporting

    >>The specified server version is invalid.

    Which is correct for Exchange 2007 you need to set the server version to

    ><t:RequestServerVersion Version="Exchange2007_SP1" />

    (there are no EWS schema updates in 2007 SP2 or SP2 so this didn't change)


    Tuesday, January 28, 2014 4:42 AM