即使在函数列表中,PHP Soap函数也会出现'No such operation'

时间:2011-09-09 19:38:05

标签: php soap wsdl soap-client

尝试从PHP中运行的wsdl获取SOAP调用。查询WebCT轴服务器wsdl,我得到它具有以下功能:

Array
(
    [0] => SessionVO login(string $user, string $password, string $learningContextID)
    [1] => void logout(SessionVO $session)
    [2] => ArrayOf_xsd_long getLearningContextIDs(SessionVO $session)
    [3] => ArrayOf_xsd_long getTemplateIDs(SessionVO $session, long $learningContextID)
    [4] => ArrayOf_xsd_string getRoleIDs(SessionVO $session, long $learningContextID)
    [5] => LearningCtxtVO getLearningContext(SessionVO $session, long $learningContextID)
    [6] => ArrayOfLearningCtxtVO getLearningContextList()
    [7] => RoleVO getRoleDefinition(SessionVO $session, string $roleID)
    [8] => ArrayOfRoleVO getRoles(SessionVO $session, long $learningContextID)
    [9] => ArrayOfSourcedIDVO getLearningGroupsByIMSId(SessionVO $session, SourcedIDVO $imsid)
    [10] => ArrayOfSourcedIDVO getLearningGroupsByLCId(SessionVO $session, long $lcid)
    [11] => ArrayOfSourcedIDVO getLearningGroupMembers(SessionVO $session, long $lcid)
    [12] => TemplateVO getTemplate(SessionVO $session, long $learningObjectID)
    [13] => long getLearningContextIdByPath(SessionVO $session, string $path)
    [14] => long getLearningContextIdBySourcedId(string $source, string $id)
    [15] => string getReleaseVersion()
    [16] => boolean isCompatibleWith(string $version)
    [17] => ArrayOf_xsd_long getInstructorPersonIDs(SessionVO $session, long $lcid)
    [18] => long getParent(SessionVO $session, long $lcid)
    [19] => ArrayOf_xsd_long getChildren(SessionVO $session, long $lcid)
)

然而,当我执行以下功能时,我收到错误“没有这样的操作'getLearningGroupsByIMSId'”:

function getAllMembers($contextID = -1) {
        try {
            $learingContext = $this->context->getLearningContext($this->session,$contextID);
            print_r($learingContext);
            $groups = $this->context->getLearningGroupsByIMSId($this->session,$learingContext->sourcedID);
            print_r($groups);
            foreach($groups as $group) {
                $members = $this->context->getLearningGroupMembers($this->session,$group->sourcedID->myID);
                print_r($members);
            }
        } catch(Exception $e) {
            print_r($e);
            return false;
        }
        return $members;
    }

为什么它可能无法识别该功能的任何想法,即使它出现在功能列表中?所有其他函数似乎都不同于getLearningGroupsByLCId - 两者都给出了相同的错误。

0 个答案:

没有答案