Jump to content
Sign in to follow this  
Jeff Hough

PostXMLData Question - Urgent

Recommended Posts


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:


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>" ;




	 ] ;


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/"





<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(&lt;Array&gt; { [&apos;username&apos;] =&gt; &apos;userName&apos;, [&apos;password&apos;] =&gt; &apos;pass&apos;, [&apos;issue&apos;] =&gt; &lt;Array&gt; { [&apos;issueData&apos;] =&gt; &lt;Array&gt; { [&apos;project&apos;] =&gt; &apos;12&apos;, [&apos;category&apos;] =&gt; &apos;61&apos;, [&apos;priority&apos;] =&gt; &apos;30&apos;, [&apos;severity&apos;] =&gt; &apos;50&apos;, [&apos;status&apos;] =&gt; &apos;50&apos;, [&apos;reporter&apos;] =&gt; &apos;2&apos;, [&apos;summary&apos;] =&gt; &apos;test soap post&apos;, [&apos;resolution&apos;] =&gt; &apos;10&apos;, [&apos;description&apos;] =&gt; &apos;testing the post method from FIC_Helper&apos;, [&apos;steps_to_reproduce&apos;] =&gt; &apos;A. Do this B. Then this&apos;, [&apos;additional_information&apos;] =&gt; &apos;Additional information here&apos; } } })

nusoap.php L4087 call_user_func_array(&lt;string&gt;&apos;mc_issue_add&apos;, &lt;Array&gt; { [0] =&gt; &lt;Array&gt; { [&apos;username&apos;] =&gt; &apos;userName&apos;, [&apos;password&apos;] =&gt; &apos;pass&apos;, [&apos;issue&apos;] =&gt; &lt;Array&gt; { [&apos;issueData&apos;] =&gt; &lt;Array&gt; { [&apos;project&apos;] =&gt; &apos;12&apos;, [&apos;category&apos;] =&gt; &apos;61&apos;, [&apos;priority&apos;] =&gt; &apos;30&apos;, [&apos;severity&apos;] =&gt; &apos;50&apos;, [&apos;status&apos;] =&gt; &apos;50&apos;, [&apos;reporter&apos;] =&gt; &apos;2&apos;, [&apos;summary&apos;] =&gt; &apos;test soap post&apos;, [&apos;resolution&apos;] =&gt; &apos;10&apos;, [&apos;description&apos;] =&gt; &apos;testing the post method from FIC_Helper&apos;, [&apos;steps_to_reproduce&apos;] =&gt; &apos;A. Do this B. Then this&apos;, [&apos;additional_information&apos;] =&gt; &apos;Additional information here&apos; } } } })

nusoap.php L3718 invoke_method()

mantisconnect.php L1717 service(&lt;string&gt;&apos;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;Envelope xmlns=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;


&lt;mc_issue_add xmlns=&quot;http://mantis.twosouthpaws.com/api/soap/mantisconnect.php&quot;&gt;












&lt;summary&gt;test soap post&lt;/summary&gt;


&lt;description&gt;testing the post method from FIC_Helper&lt;/description&gt;

&lt;steps_to_reproduce&gt;A. Do this B. Then this&lt;/steps_to_reproduce&gt;

&lt;additional_information&gt;Additional information here&lt;/additional_information&gt;







</faultstring><detail xsi:type="xsd:string"></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

Any assistance would be greatly appreciated.



Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

By using this site, you agree to our Terms of Use.