locked
Can't figure out how to use SOAP for RPC RRS feed

  • Question

  • User1831309956 posted

    I have a server I need to be able to send commands to via an ASP.net website. There is no WSDL for me to work with, so I have to figure this out on my own. I was given an example in PHP that might as well be written in Chinese since I've never worked with SOAP.... or PHP for that matter.

    function ExecuteSoapCommand($command)
    {
        try //Try to execute function
        {
        $cliente = new SoapClient(NULL,
        array(
        "location" => "http://127.0.0.1:7878/",
        "uri"   => "urn:TC",
        "style" => SOAP_RPC,
        "login" => "test",
        "password" => "testpass")
        );
    
        $result = $cliente->executeCommand(new SoapParam($command, "command"));
        
        }catch(Exception $e)
        {
           return array('sent' => false, 'message' => $e->getMessage());
         }
        return array('sent' => true, 'message' => $result);
    }

    I've searched for about a week now, and still can't wrap my head around how to do this. I found the SoapRPCMethod attribute....which I assume would have some bearing here, but have no idea how or where to start with it.

    Any help would be appreciated, even if someone could just point me in the right direction. I'm not an advanced developer by any means.

    Wednesday, October 30, 2013 6:02 PM