来自WSDL文件的php Soap Server

Hi I am trying to recreate a SOAP Server for an old client because the original service is long gone

The Client is MSN Messanger 7.5

the only thing left is the service wsdl file: http://web.archive.org/web/20050311202052id_/http://appdirectory.messenger.msn.com:80/AppDirectory/AppDirectory.asmx?WSDL which the client doesn't even request

so I began writing this as per WSDL file using php's native SoapServer class in non-wsdl mode (because the client does not use it)

AppDirectory.php

<?php
require_once ('classes2/App.php');

$options= array('uri'=>'http://appdirectory.messenger.msn.com/AppDirectory/AppDirectory.php', 'location' => 'http://appdirectory.messenger.msn.com/AppDirectory/AppDirectory.php');


$server = new SoapServer(NULL, $options);
$server->setClass('AppDirectory');
$server->setObject(new AppDirectory());
$server->handle();
?>

App.php

<?php 
class AppDirectory
{

    /**
     * Gets Filtered data obout P3, P4 Apps.
     *
     * @param string $locale
     * @param int $Page
     * @param int $Kids
     * @param int $AppType
     * @access public
     * @return schema $my_xml
     */
    public function GetFilteredDataSet2($locale, $Page, $Kids, $AppType) 
    {
        $my_xml = 
        "
<Entry>
  <EntryID>1</EntryID>
  <Error>Error</Error>
  <Locale>en-us</Locale>
  <Kids>1</Kids>
  <Page>1</Page>
  <Category>50</Category>
  <Sequence>10</Sequence>
  <Name>File Sharing</Name>
  <Description>Share Files Between Two Users!</Description>
  <URL>http://dxing.si/msn/AppDirectory/P4Apps/FileSharing/en/fileSharingCtrl.htm</URL>
  <IconURL>http://example.org/example.png</IconURL>
  <PassportSiteID>0</PassportSiteID>
  <Type>Dir</Type>
  <Height>500</Height>
  <Width>500</Width>
  <Location>side</Location>
  <MinUsers>2</MinUsers>
  <MaxUsers>2</MaxUsers>
  <PassportSiteID>0</PassportSiteID>
  <EnableIP>False</EnableIP>
  <ActiveX>True</ActiveX>
  <SendFile>True</SendFile>
  <SendIM>False</SendIM>
  <ReceiveIM>False</ReceiveIM>
  <ReplaceIM>False</ReplaceIM>
  <Windows>False</Windows>
  <MaxPacketRate>120</MaxPacketRate>
  <UserProperties>False</UserProperties>  
  <ClientVersion>7.5</ClientVersion>
  <AppType>0</AppType>  
  <Hidden>false</Hidden>
</Entry>
        ";  
        return new SoapVar('<ns1:GetFilteredDataSet2Result>'.$my_xml.'</ns1:GetFilteredDataSet2Result>' ,XSD_ANYXML);
    }

}
?>

here is the client request and server response to: http://appdirectory.messenger.msn.com/AppDirectory/AppDirectory.php

===== REQUEST HERE =====
POST http://appdirectory.messenger.msn.com/AppDirectory/AppDirectory.php HTTP/1.1
Accept: */*
SOAPAction: "http://www.msn.com/webservices/Messenger/Client/GetFilteredDataSet2"
Content-Type: text/xml; charset=utf-8
Content-Length: 417
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media     Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3; .NET CLR 1.1.4322; MSN Messenger 7.5.0324)
Host: appdirectory.messenger.msn.com
Connection: Keep-Alive
Pragma: no-cache
Cookie: PreferencesMsn=eyJFeHBpcnlUaW1lIjo2MzcwNzE3NDkzMjQ4Njc4NjQsIlZlcnNpb24iOjF90; marketPref=en-xl; _EDGE_V=1; _SS=SID=00;     MUID=172ABDC4085E6ADF377BB6C10C5E6926

<?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><GetFilteredDataSet2 xmlns="http://www.msn.com/webservices/Messenger/Client"><locale>en-US</    locale><Page>1</Page><Kids>-1</Kids><AppType>0</AppType></GetFilteredDataSet2></soap:Body></soap:Envelope>
===== REQUEST HERE =====

===== RESPONSE HERE =====
HTTP/1.1 200 OK
Date: Fri, 26 Oct 2018 16:11:43 GMT
Server: Apache/2.4.23 (Win64) PHP/5.6.25
X-Powered-By: PHP/5.6.25
Content-Length: 1568
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://appdirectory.messenger.msn.com/AppDirectory/AppDirectory.php"     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/    encoding/"><SOAP-ENV:Body><ns1:GetFilteredDataSet2Response><ns1:GetFilteredDataSet2Result>
<Entry>
  <EntryID>1</EntryID>
  <Error>Error</Error>
  <Locale>en-us</Locale>
  <Kids>1</Kids>
  <Page>1</Page>
  <Category>50</Category>
  <Sequence>10</Sequence>
  <Name>File Sharing</Name>
  <Description>Share Files Between Two Users!</Description>
  <URL>http://dxing.si/msn/AppDirectory/P4Apps/FileSharing/en/fileSharingCtrl.htm</URL>
  <IconURL>http://example.org/example.png</IconURL>
  <PassportSiteID>0</PassportSiteID>
  <Type>Dir</Type>
  <Height>500</Height>
  <Width>500</Width>
  <Location>side</Location>
  <MinUsers>2</MinUsers>
  <MaxUsers>2</MaxUsers>
  <PassportSiteID>0</PassportSiteID>
  <EnableIP>False</EnableIP>
  <ActiveX>True</ActiveX>
  <SendFile>True</SendFile>
  <SendIM>False</SendIM>
  <ReceiveIM>False</ReceiveIM>
  <ReplaceIM>False</ReplaceIM>
  <Windows>False</Windows>
  <MaxPacketRate>120</MaxPacketRate>
  <UserProperties>False</UserProperties>  
  <ClientVersion>7.5</ClientVersion>
  <AppType>0</AppType>  
  <Hidden>false</Hidden>
</Entry>
        </ns1:GetFilteredDataSet2Result></ns1:GetFilteredDataSet2Response></SOAP-ENV:Body></SOAP-ENV:Envelope>
===== RESPONSE HERE =====

I know MSN calls GetFilteredDataSet2 and its not in wsdl file but I think it should return the same thing as GetFilteredDataSet

I also found a c++ client implementation of this service here: https://github.com/veso266/AppDirectory/blob/master/cpp/soap/msnappdirectoryservice.cpp (MsnAppDirectoryService::parseSoapResult method) and its header file: https://github.com/veso266/AppDirectory/blob/master/cpp/soap/msnappdirectoryservice.h

and after reading its parseSoapResult method I think I am doing the same way (outputing xml as SoapClient in MSN wants), but it does not work the onlything I get is: SoapError

which basicly says that Activities/Games aren't uvailable and I should reopen MSN

so if anyone could help me a bit, because I don't know where to even debug

also I am probably not doing something right because why would there be a <s:complexType name="Entry"> in the wsdl if I am just returning XML

Thanks for Anwsering and Best Regards