Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

wsse:InvalidSecurity

Hi there,

I have tried to implement a small PHP script for submitting ideas to xPD 2.0. First phase is successful (idea is submitted and guid retrieved). But when I try to upload an attachent using different webservice I get this error message:

wsse:InvalidSecurity. 00E000C4EA35007A0000035700001077000412CCC9797F64 : WS Security can only be applied on a SOAP document.

Any ideas why my second soap call is failing?

Here are both scripts for you:

submit.php (this works)

[code]

<?php

$title = $_POST['title'];

$description = $_POST['description'];

$source = $_POST['source'];

$client = new SoapClient('our_server/WSxPDService/WSxPDServiceConfig?wsdl',

array('login' => "xxx", 'password' => "xxx", 'style' => SOAP_DOCUMENT));

$header = array("description" => $description,

"owner" => "xxx",

"title" => $title,

"guid" => "",

"source" => $source,

"author" => "xxx",

"protectionLevel" => "Normal",

"relatedInsights" => "",

"relatedFacts" => ""

);

try {

$result = $client->createIdea(array("header" => $header));

} catch (SoapFault $exception) {

die("<b>Idea submission failed!</b><br>" . $exception->content);

}

$guid = $result->Response;

include("attachment.inc");

?>

[/code]

submitAttachment.php (this does not work)

[code]

<?php

$guid = $_POST['guid'];

$name = $_POST['name'];

$attachment = $_FILES['attachment']['tmp_name'];

$contents = file_get_contents($attachment);

$client = new SoapClient('our_server/WSxPDExternalIdeaAttachment/EIAttachmentConfig?wsdl ', array('login' => "xxx", 'password' => "xxx"));

try {

$result = @$client->addIdeaAttachment( $guid, $name, $contents );

} catch (SoapFault $exception) {

die("<b>Attachment upload failed!</b><br>" . $exception->faultcode . ". " . $exception->faultstring . "<br><b>" . var_dump($exception));

}

Header("Location: addAttachments.php?guid=$guid");

exit;

?>

[/code]

Br,

Johannes

Former Member
Not what you were looking for? Ask a question