Requesting objects via SOAP with subterraURI impossible

Description
sbejga
Posts: 1
Joined: Mon Oct 11, 2010 8:31 am

Requesting objects via SOAP with subterraURI impossible

Postby sbejga » Sat Sep 10, 2011 8:59 pm

Hello guys,

while developing my newest application, communicating with Polarion I encountered a problem, when need to make a request with a subterra URI.
An Example, I send this Request:

Code: Select all

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:trac="http://ws.polarion.com/TrackerWebService-impl">
   <soapenv:Header>
   <ns1:sessionID xmlns:ns1="http://ws.polarion.com/session">
      6540035496660999395
   </ns1:sessionID>
   </soapenv:Header>
   <soapenv:Body>
      <trac:getWorkItemByUri>
         <trac:uri>subterra:data-service:objects:/default/Aurora${WorkItem}SAMPLE-1</trac:uri>
      </trac:getWorkItemByUri>
   </soapenv:Body>
</soapenv:Envelope>


And I get an Error of:

Code: Select all

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server.userException</faultcode>
         <faultstring>java.lang.IllegalArgumentException: normId is invalid: /default/AuroraSAMPLE-1</faultstring>
...


But the subterra URI I used is identical with the responded URI when requesting a workitem.
What is the correct way to send a SOAP request with subterraURI?

dho
Posts: 2
Joined: Mon Dec 12, 2011 8:01 am

Re: Requesting objects via SOAP with subterraURI impossible

Postby dho » Mon Dec 12, 2011 8:03 am

How did you solve this?

tobias.richter
Posts: 3
Joined: Thu Nov 24, 2011 3:28 pm

Re: Requesting objects via SOAP with subterraURI impossible

Postby tobias.richter » Wed Jan 18, 2012 4:19 pm

I think your request has to look like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://ws.polarion.com/TrackerWebService-impl" xmlns:ns1="http://ws.polarion.com/session" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://sch
emas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <ns1:sessionID SOAP-ENV:mustUnderstand="0" SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next">2084605499700754467</ns1:sessionID>
   </SOAP-ENV:Header>
   <ns1:Body xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
      <ns0:getWorkItemById>
         <ns0:projectId>projectid</ns0:projectId>
         <ns0:workitemId>workitemid</ns0:workitemId>
      </ns0:getWorkItemById>
   </ns1:Body>
</SOAP-ENV:Envelope>

moem1
Posts: 36
Joined: Wed Feb 23, 2011 4:27 pm

Re: Requesting objects via SOAP with subterraURI impossible

Postby moem1 » Fri May 18, 2012 2:51 pm

Hi Tobias,

Thanks for the example request for getWorkItemsById. Do you have an example request for getWorkItemByIdsWithFields? I can get SOAP requests to work for simple string arguments, but I don't know how to format it for a string array (like the "keys" argument for getWorkItemByIdsWithFields).

Thanks!

- Mark

Korobochka
Posts: 1
Joined: Thu Apr 30, 2015 3:00 pm

Re: Requesting objects via SOAP with subterraURI impossible

Postby Korobochka » Thu Apr 30, 2015 3:24 pm

5 years later I have the same question: how can I do this?
I am particularly interested in getTestSteps method, which requires URI, so there is no workaround.
Please suggest a solution!

stewarca
Posts: 4
Joined: Tue Mar 13, 2018 4:16 pm

Re: Requesting objects via SOAP with subterraURI impossible

Postby stewarca » Thu Apr 25, 2019 9:14 pm

Did you ever find a solution for how to send the string array?


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 6 guests