Jump to content
Server Maintenance This Week. ×

PostXMLData Question - Urgent


This topic is 4278 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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(&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;Body&gt;

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

&lt;mc_issue_addRequest&gt;

	 &lt;username&gt;userName&lt;/username&gt;

	 &lt;password&gt;pass&lt;/password&gt;

	 &lt;issue&gt;

	 &lt;issueData&gt;

&lt;project&gt;12&lt;/project&gt;

&lt;category&gt;61&lt;/category&gt;

&lt;priority&gt;30&lt;/priority&gt;

&lt;severity&gt;50&lt;/severity&gt;

&lt;status&gt;50&lt;/status&gt;

&lt;reporter&gt;2&lt;/reporter&gt;

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

&lt;resolution&gt;10&lt;/resolution&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;

	 &lt;/issueData&gt;

	 &lt;/issue&gt;

&lt;/mc_issue_addRequest&gt;

&lt;/mc_issue_add&gt;

&lt;/Body&gt;

&lt;/Envelope&gt;&apos;)

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

Any assistance would be greatly appreciated.

Thanks,

Jeff

Link to comment
Share on other sites

This topic is 4278 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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