<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 26, 2008, at 9:12 PM, Patrick Carlow wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="EN-US" link="blue" vlink="purple"><div class="Section1"><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Hello,<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><o:p> </o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Sorry if this isn’t the right place for this, but I’m having a lot of trouble trying to get wp.newPage to work using a PHP script.<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><o:p> </o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">wp.getPageList works as expected, but wp.newPage returns the error: faultCode  401    faultString  Invalid post type<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><o:p> </o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">I don’t see anything in the doc that shows an option to set the post type.</span></font></div></div></div></span></blockquote><br></div><div><br></div><div>It would be helpful to see the script to get an idea of what's wrong.  Here's a simple test script I use for wp.newPage with out any problems:</div><div><br></div><div><div><?php</div><div>require "./IXR_Library.inc.php";</div><div>$method_name = "wp.newPage";</div><div><br></div><div>$rpc_url = "<a href="http://localhost/~joseph/wp/trunk/xmlrpc.php">http://localhost/~joseph/wp/trunk/xmlrpc.php</a>";</div><div>$blog_id    = 1;</div><div>$username   = "username";</div><div>$password   = "password";</div><div>$publish    = false;</div><div><br></div><div><div>$post = array(</div><div>    "title"         => "New Page Test",</div><div>    "description"   => "Hello there, this is a test."</div><div>);</div></div></div><div><br></div><div><br></div><div><div>$rpc = new IXR_Client( $rpc_url );</div><div>$status = $rpc->query(</div><div>    $method_name,</div><div>    $blog_id,</div><div>    $username,</div><div>    $password,</div><div>    $post,</div><div>    $publish</div><div>);</div><div><br></div><div>if( !$status ) {</div><div>    print "Error in RPC request\n";</div><div>    print_r( $rpc );</div><div>    exit;</div><div>}</div><div><br></div><div>print_r( $rpc->getResponse( ) );</div><div>print "\n";</div></div><div><br></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><br class="Apple-interchange-newline">--</div><div>Joseph Scott</div><div><a href="mailto:joseph@josephscott.org">joseph@josephscott.org</a></div><div><a href="http://josephscott.org/">http://josephscott.org/</a></div><div><br></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>