Loading ...
Sorry, an error occurred while loading the content.

6601How to add authHeader to soap request ?

Expand Messages
  • Richter, Tobias
    Dec 12, 2011
      Hi *,

      I try to write a simple Perl SOAP Client for these services:


      My script looks like this now:
      my $SessionWebServicesoap = SOAP::Lite
      -> proxy($SessionWebServiceURI)
      -> uri($SessionWebServiceURI);

      my $TrackerWebServicesoap = SOAP::Lite
      -> proxy($TrackerWebServiceURI)
      -> uri($TrackerWebServiceURI);

      my $ProjectWebServicesoap = SOAP::Lite
      -> proxy($ProjectWebServiceURI)
      -> uri($ProjectWebServiceURI);

      my $response;

      print "\n";

      #get session
      my $session = $SessionWebServicesoap->logIn(
      my $sessionID = $session->{'_content'}[2][0][4]{'sessionID'};
      print "session is: ".$sessionID."\n";

      my $authHeader = SOAP::Header->name('sessionID')->value($sessionID);

      $response = $ProjectWebServicesoap->getProject("productbacklog");
      die $response->faultstring if ($response->fault);
      my $IObject = $response->result;
      print $response->result, "\n";

      $response = $TrackerWebServicesoap->createWorkItem($IObject,$authHeader);
      die $response->faultstring if ($response->fault);
      print $response->result, "\n";


      Unfortunately I always get the following error message:
      session is: 9109123277697179703
      com.polarion.platform.security.PermissionDeniedException: Permission com.polarion.persistence.object.WorkItem.key.created.modify denied for user null in context null at soap6.pl line 56.

      Do you have an idea how to add the session ID to my SOAP-Request Header?

      I think somebody had the same problem with python's suds here:

      Thank you.

      Best regards,

      This email is intended solely for the use of the individual to whom it is addressed and may contain confidential and/or privileged material. Any views or opinions presented are solely those of the author and do not necessarily represent those of AGCO. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. Neither AGCO nor the sender accepts any responsibility for viruses and it is your responsibility to scan and virus check the e-mail and its attachment(s) (if any).