Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7759003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:31:00+00:00 2026-06-01T13:31:00+00:00

hi i need to create a bug in bugzilla using bugzilla webservices and php.

  • 0

hi i need to create a bug in bugzilla using bugzilla webservices and php. I don’t want to use any other libraries (for eg. zend, nusoap etc) as my boss wants it to be using strictly php soapclient. After trying for couple of day, I couldn’t make it work. I hope you guys can help me. I was successful first time doing this using a class avaiable at http://code.google.com/p/bugzillaphp/ . However, as we upgraded to new bugzilla (4.2) and that class was using xmlrpc request and not the webservice. So it failed. I am pasting the code, soap request and response. Please help me guys.

<?php
$user = 'your email address';
$pass = 'your password';
$uri = 'http://your site/xmlrpc.cgi';       
$client = new SoapClient(NULL,
                                       array('location' => $uri,
                                            'uri'     => $uri,
                                            'trace' => 1,
                                            'soap_version' => SOAP_1_2,

                                             'action' => ""
                                            //'exceptions' => 0
));
try
{
 $result = $client->__soapCall("User.login", array(

            'login'          => $user,
            'password'       => $pass,          
            'remember'  => 'true'
            ));
print $result;                  
}
catch (Exception $e)
 {
        print $e->getMessage();
    echo "REQUEST:\n" . $client->__getLastRequest() . "\n";
    echo "Response:\n" . $client->__getLastResponse() . "\n";
    echo "REQUEST HEADERS:\n" . $client->__getLastRequestHeaders() . "\n";
    echo "RESPONSE HEADERS:\n" . $client->__getLastResponseHeaders() . "\n";
print_r($headers);      
$headers = str_replace("application/soap+xml", "text/xml", $headers);
print_r($headers);  
 }
?>
     xml request and response, xml request headers and response headers:-

REQUEST:
 <?xml version="1.0" encoding="UTF-8"?>
 <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="htt
p://devbugz/xmlrpc.cgi" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/
soap-encoding"><env:Body><ns1:User.login env:encodingStyle="http://www.w3.org/20
03/05/soap-encoding"><param0 xsi:type="xsd:string">your email</param0><par
am1 xsi:type="xsd:string">your password</param1><param2 xsi:type="xsd:string">true</p
aram2></ns1:User.login></env:Body></env:Envelope>

Response:
<?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct><mem
ber><name>faultString</name><value><string>Application failed during request des
erialization: 32612: When using XML-RPC, you cannot send data as application/soa
p+xml; charset=utf-8; action="http://devbugz/xmlrpc.cgi#User.login". Only text/x
ml and application/xml are allowed. at F:/applications/ActiveState/Perl/v5.10.0/
site/lib/SOAP/Lite.pm line 2778.
</string></value></member><member><name>faultCode</name><value><string>Client</s
tring></value></member></struct></value></fault></methodResponse>

REQUEST HEADERS:
POST /xmlrpc.cgi HTTP/1.1
Host: devbugz
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.9
Content-Type: application/soap+xml; charset=utf-8; action="http://yoursite/xmlrpc
.cgi#User.login"
Content-Length: 569


RESPONSE HEADERS:
HTTP/1.1 200 OK
Date: Thu, 22 Mar 2012 21:08:56 GMT
Server: Apache/2.2.19 (Win32) mod_auth_sspi/1.0.4 PHP/5.2.6 DAV/2 SVN/1.6.15 mod
_ssl/2.2.19 OpenSSL/0.9.8r
SOAPServer: SOAP::Lite/Perl/0.714
Content-Length: 578
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/xml
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:31:02+00:00Added an answer on June 1, 2026 at 1:31 pm

    thanks “sas” but I figured it out. I concluded that as bugzilla webservices are implemented using xmlrpc server (xmlrpc.cgi) (not soap server), so we can not use php soapclient to call those services. I used xmlrpc client for php available at phpxmlrpc.sourceforge.net to implement the client script to call bugzilla webservices. I will post the code for this soon.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using iReport to try to create a chart for bug tracking. I need
I need to create a custom application domain to work around a bug in
i need create a variable with parent subclass. Example: Parent Class <?php class parentClass
Need to create a custom DNS name server using C which will check against
I need to create an iOS .xarchive file using a developer profile, that a
We have a bug to fix, and like any good TDD practitioner, I want
Do to an IE6 bug I need to alter some Jquery, I want to
When you create an instance of the cachefactory and then don’t use it anymore
Using PHP 5.3, I am currently writing an MVC application and need to extract
I need create custom dialog and put JPanel into it. Is it possible?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.