Jeff Hough Posted August 9, 2012 Posted August 9, 2012 Hello, I am trying to build a method to POST issues into MantisBT. Mantis provides a method to post using XML. However, this is my first time working with posting via XML. i am under a time crunch, so I need an answer ASAP. My Mantis installation has the XML methods described here: http://mantis.twosou...ntisconnect.php Using this, I figured the method I need to use is: mc_issue_add WIth that said, here is the calc that I constructed: Let ( [ url = "http://mantis.twosouthpaws.com/api/soap/mantisconnect.php" ; act = "mc_issue_add" ; xml = List ( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" ; "<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\">" ; " <Body>" ; " <mc_issue_add xmlns=\"http://mantis.twosouthpaws.com/api/soap/mantisconnect.php\">" ; " <mc_issue_addRequest>" ; " <username>userName</username>" ; " <password>pass</password>" ; " <issue>" ; " <issueData>" ; " <project>12</project>" ; " <category>61</category>" ; " <priority>30</priority>" ; " <severity>50</severity>" ; " <status>50</status>" ; " <reporter>2</reporter>" ; " <summary>test soap post</summary>" ; " <resolution>10</resolution>" ; " <description>testing the post method from FIC_Helper</description>" ; " <steps_to_reproduce>A. Do this B. Then this</steps_to_reproduce>" ; " <additional_information>Additional information here</additional_information>" ; " </issueData>" ; " </issue>" ; " </mc_issue_addRequest>" ; " </mc_issue_add>" ; " </Body>" ; "</Envelope>" ) ] ; PostXMLData( url ; xml ; act ) ) When I evaluate this code, this is the result I receive: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">Server</faultcode><faultactor xsi:type="xsd:string"></faultactor><faultstring xsi:type="xsd:string">Error Type: SYSTEM WARNING, Error Description: Missing argument 2 for mc_issue_add(), Stack Trace: UnknownFile L? mc_issue_add(<Array> { ['username'] => 'userName', ['password'] => 'pass', ['issue'] => <Array> { ['issueData'] => <Array> { ['project'] => '12', ['category'] => '61', ['priority'] => '30', ['severity'] => '50', ['status'] => '50', ['reporter'] => '2', ['summary'] => 'test soap post', ['resolution'] => '10', ['description'] => 'testing the post method from FIC_Helper', ['steps_to_reproduce'] => 'A. Do this B. Then this', ['additional_information'] => 'Additional information here' } } }) nusoap.php L4087 call_user_func_array(<string>'mc_issue_add', <Array> { [0] => <Array> { ['username'] => 'userName', ['password'] => 'pass', ['issue'] => <Array> { ['issueData'] => <Array> { ['project'] => '12', ['category'] => '61', ['priority'] => '30', ['severity'] => '50', ['status'] => '50', ['reporter'] => '2', ['summary'] => 'test soap post', ['resolution'] => '10', ['description'] => 'testing the post method from FIC_Helper', ['steps_to_reproduce'] => 'A. Do this B. Then this', ['additional_information'] => 'Additional information here' } } } }) nusoap.php L3718 invoke_method() mantisconnect.php L1717 service(<string>'<?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <Body> <mc_issue_add xmlns="http://mantis.twosouthpaws.com/api/soap/mantisconnect.php"> <mc_issue_addRequest> <username>userName</username> <password>pass</password> <issue> <issueData> <project>12</project> <category>61</category> <priority>30</priority> <severity>50</severity> <status>50</status> <reporter>2</reporter> <summary>test soap post</summary> <resolution>10</resolution> <description>testing the post method from FIC_Helper</description> <steps_to_reproduce>A. Do this B. Then this</steps_to_reproduce> <additional_information>Additional information here</additional_information> </issueData> </issue> </mc_issue_addRequest> </mc_issue_add> </Body> </Envelope>') </faultstring><detail xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> Any assistance would be greatly appreciated. Thanks, Jeff
Recommended Posts
This topic is 4557 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now