Unfortunately, that didn't resolve the problem either. regards, Karuna
On Wed, Aug 8, 2012 at 11:38 PM, Aaron Coburn <[email protected]> wrote: > Also, the username needs an affiliation, so in this case it should be: > admin@Local > > Aaron > > On Aug 8, 2012, at 1:13 PM, Karuna P Joshi wrote: > > > Thanks for the pointer Aaron. Unfortunately, that didn't work. I am still > > getting the same error. > > > > regards, > > Karuna > > > > On Wed, Aug 8, 2012 at 5:59 PM, Aaron Coburn <[email protected]> > wrote: > > > >> Karuna, > >> at first glance, you will need to put newlines after each header field > >> like this: > >> > >> $header = "Content-Type: text/xml\r\n"; > >> $header .= " X-User: admin\r\n"; > >> $header .= " X-Pass: password\r\n"; > >> $header .= " X-APIVERSION: 2\r\n"; > >> > >> I am assuming that the headers are not properly read on the VCL side and > >> so authentication isn't proceeding; otherwise, the code looks fine. > >> > >> Aaron > >> > >> > >> -- > >> Aaron Coburn > >> Systems Administrator and Programmer > >> Academic Technology Services, Amherst College > >> [email protected]<mailto:[email protected]> > >> > >> > >> > >> > >> > >> > >> On Aug 8, 2012, at 7:19 AM, Karuna P Joshi wrote: > >> > >> Hello, > >> > >> I am using VCL Sandbox installation to create a request/reservation from > >> the cloud broker interface. I am trying to use the XMLRPCaddRequest > >> function in the xmlrpcWrappers file and have ensured that I am passing > the > >> X-User, X-Pass and X-APIVERSION values in the http header. However, I > keep > >> getting " *faultString Access denied **faultCode **3*" error message. > >> > >> I noticed some messages in the archives discussing this and would > >> appreciate any pointers on next steps I should take. I am also > including my > >> code below - > >> > >> $request = xmlrpc_encode_request("XMLRPCaddRequest", array($ImageID, > >> $start, $length)); > >> $header = "Content-Type: text/xml"; > >> $header .= " X-User: admin "; > >> $header .= " X-Pass: password "; > >> $header .= " X-APIVERSION: 2"; > >> $context = stream_context_create(array('http' => array( > >> 'method' => "POST", > >> 'header' => $header, > >> 'content' => $request > >> ))); > >> $file = file_get_contents(" > https://152.46.16.138/index.php?mode=xmlrpccall > >> ", > >> false, $context); > >> $response = xmlrpc_decode($file); > >> if($response && xmlrpc_is_fault($response)) { > >> trigger_error("xmlrpc: $response[faultString] > ($response[faultCode])"); > >> } else { > >> print_r($response); > >> } > >> > >> -- > >> regards, > >> Karuna > >> ____________________ > >> Karuna Pande Joshi > >> PhD Candidate, > >> CSEE Dept, UMBC > >> [email protected]<mailto:[email protected]>, [email protected] > <mailto: > >> [email protected]> > >> > >> > > > > > > -- > > regards, > > Karuna > > ____________________ > > Karuna Pande Joshi > > PhD Candidate, > > CSEE Dept, UMBC > > [email protected], [email protected] > > -- regards, Karuna ____________________ Karuna Pande Joshi PhD Candidate, CSEE Dept, UMBC [email protected], [email protected]
