0

I am trying to get all the properties (GetAllProperties) of a certain job (inJobID). All the simple strings and digits show up properly, but the XML entities are just omitted, as if they are not there.

When echoing '$jobObj->__getLastResponse()' then the XML is there, but for some reason it disappears when trying to retrieve it.

The code is very basic:

$params->inUsername ='TheUser';
$params->inPassword ='ThePassword';
$params->inJobID = 184;
$jobObj = new SoapClient('http://SERVERNAME/job_ssp.asmx?wsdl', array('trace' => 1));

$Props = $jobObj->GetAllProperties($params);
print_r ($Props-> GetAllPropertiesResult);

This is an example of an output:

stdClass Object
(
    [GetAllPropertiesResult] => stdClass Object
        (
            [Property] => Array
                (
                    [0] => stdClass Object
                        (
                            [m_Name] => jobID
                            [m_Value] => 184
                        )

                    [2] => stdClass Object
                        (
                            [m_Name] => userID
                            [m_Value] => 2
                        )

                    [21] => stdClass Object
                        (
                            [m_Name] => jobParams
                            [m_Value] => 
                        )
                )
        )
)

The jobParams is always displayed as empty.

This is how it starts: <?xml version='1.0' encoding='utf-16'?>

There is probably something extremely basic that I am missing here, but right now I am utterly baffled.

Help please?

Addition: When using var_dump it shows that there are 3,579 characters in that string, but still does not show them:

[21]=> object(stdClass)#29 (2) { ["m_Name"]=> string(9) "jobParams" ["m_Value"]=> string(3579) "" }

1 Answer 1

1
echo htmlspecialchars(print_r ($Props-> GetAllPropertiesResult, 1));
Sign up to request clarification or add additional context in comments.

1 Comment

Beautiful! I changed it a bit in order to properly show the contents: echo '<pre>'.htmlspecialchars(print_r ($Props-> GetAllPropertiesResult, 1)).'</pre>';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.