No publishReturn->message?

Michael McGinnis's Avatar

Michael McGinnis

22 Feb, 2013 11:04 PM

This comment implies that publishReturn->message will be descriptive, but for me, it's empty/nil. Is that expected? Is it more descriptive on 7.2?

<!-- The result classes -->
<!--
The base operation result class contains two members, success which will either be 
"true" or "false" and a message, which when success is "false" will contain a descriptive
 error message of why the operation failed.
-->
<snip> 
<complexType name="operationResult">
<sequence>
<element maxOccurs="1" name="success" type="xsd:string"/>
<element maxOccurs="1" name="message" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
  1. 1 Posted by Ryan Griffith on 25 Feb, 2013 01:42 PM

    Ryan Griffith's Avatar

    Hi Michael,

    I do not believe there were any changes with 7.2 in regards to the publish operation. When publishReturn->message is empty, are you getting a true or false value for publishReturn->success? As per the comment, only a false value will yield a message:

    ... a message, which when success is "false" will contain a descriptive error message of why the operation failed.

    If you are indeed getting a false value for publishReturn->success, what version of Cascade are you experiencing this in? Also, please describe or attach your script so we can have a closer look.

    Please let me know if you have any questions.

    Thanks

  2. 2 Posted by Michael McGinni... on 25 Feb, 2013 04:31 PM

    Michael McGinnis's Avatar

    It's a false value, on 7.0.7 - 8b4ec.

    
      ## Publishing index page on emergency.tamu.edu 1937dada70c2734195ef0563dba5728e
      #
        $identifier = array
        (
            'id' =>'1937dada70c2734195ef0563dba5728e',
    // test     'id' =>'01dfdeb280c2934147d9fe04b475d075',
            'type' => 'page'
        );
    
        $publishParams = array ('authentication' => $auth, 'identifier' => $identifier, 'unpublish' => false ); 
        $reply = $client->publish($publishParams);
    
        //FYI: publishes to all available destinations, live and test - can't limit this 
    
    
        //FYI: usually publishReturn->message is nil/empty
        if ($reply->publishReturn->success=='true')
            echo "\nPublished emergency index.";
        else
            echo "\nError when publishing emergency index: " . $reply->publishReturn->message;
    
  3. 3 Posted by Ryan Griffith on 25 Feb, 2013 08:27 PM

    Ryan Griffith's Avatar

    Hi Michael,

    Thank you for the additional information.

    After some local testing, it looks as though 7.2 is more detailed with the messages returned with a false publish.

    For example, in 7.0.5 I tried to provide an invalid ID and did not get a message at all, but received on in 7.2. I also tried publishing a Page set to not be publishable and received a true value for success, in 7.2 I received a false along with a message. The same occurred with attempting to publish a Page with no available Destinations. I did; however, receive a message when the authenticating use did not have permission to publish the given Asset.

    Note: the structure of the Publish request did change slightly. Check out the Web Services change log for additional information about the change.

    Please let me know if you have any questions.

    Thanks

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac