WSO/WSF for PHP [error] http_sender.c Error occurred in transport - What
am I doing wrong?
after thoroughly researching this topic I have decided to post a question
about this error. Does anyone have an Idea what this error is caused by?
The sample scripts run fine.
We are trying to develop a webservice client connecting over HTTPS and
using WS-Policy authentication with both encryption and signature parts.
We are using PHP 5.3.3 on Apache 2.2.3 running on Redhat Linux (Kernel
2.6.18)
This is how I create the WSF client:
$policy_xml = file_get_contents($options['policy_file']);
$policy = new WSPolicy($policy_xml);
$keystore=file_get_contents($options['client_private_key']);
$arrSecTokenOptions=array("PKCS12KeyStore"=>$keystore,
"receiverCertificate" => $pub_key);
$arrSecTokenOptions['user']=$options['user'];
$arrSecTokenOptions['password']=$options['password'];
$arrSecTokenOptions['certificate']=
ws_get_cert_from_file($options['certificate']);
$sec_token = new WSSecurityToken($arrSecTokenOptions);
$arrServiceDefinition=array('wsdl' => $wsdl,
"useWSA" => TRUE,
"policy" => $policy,
"securityToken" => $sec_token
);
$arrValidOpts=array('classmap'=>'classmap', 'to'=>'to', 'uri'=>'uri',
'CACert'=>'CACert');
foreach($options as $key=>$val){
if(!$arrServiceDefinition[$key] && $arrValidOpts[$key]){
$arrServiceDefinition[$arrValidOpts[$key]]=$val;
}
}
$this->objWSClient = new WSclient($arrServiceDefinition);
The Webservice is called like this:
$reqMessage = new WSMessage($strPayload, array("to" => $location, "action"
=> $action));
$this->objWSClient->send($reqMessage);
A call to the Webservice only results in the following log without any
response being sent:
[Wed Aug 7 18:45:01 2013] [debug] xml_signature.c(296) [oxs][xml_sig]
C14N (sig)= <ds:SignedInfo
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference
URI="#SigID-b4386670-ff80-1e21-2764"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>ArkR7aRJnWlYgUpVQ7Ej7fYGKHs=</ds:DigestValue></ds:Reference></ds:SignedInfo>
[Wed Aug 7 18:45:01 2013] [debug] sign.c(62) [openssl][sig] Signing
content <ds:SignedInfo
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod><ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod><ds:Reference
URI="#SigID-b4386670-ff80-1e21-2764"><ds:Transforms><ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform></ds:Transforms><ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod><ds:DigestValue>ArkR7aRJnWlYgUpVQ7Ej7fYGKHs=</ds:DigestValue></ds:Reference></ds:SignedInfo>
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Security for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
BinarySecurityToken for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Timestamp for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Created for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Expires for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Signature for Signature
[Wed Aug 7 18:45:01 2013] [info] [rampart][rampart_signature] Endorsing
Token is not specified. No need to endorse
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Security for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
BinarySecurityToken for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Timestamp for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Created for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Expires for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Signature for Signature
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Security for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
BinarySecurityToken for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Timestamp for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Created for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Expires for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Signature for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
SignedInfo for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
CanonicalizationMethod for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
SignatureMethod for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Reference for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Transforms for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Transform for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
DigestMethod for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
DigestValue for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
SignatureValue for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
KeyInfo for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
SecurityTokenReference for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] axiom.c(129) [rampart]Checking node
Reference for EncryptedKey
[Wed Aug 7 18:45:01 2013] [debug] http_transport_sender.c(241)
ctx_epr:http://www.softdecc.com:8081/tcmsatellite/tcmwebservice
[Wed Aug 7 18:45:01 2013] [debug] http_transport_sender.c(776) using
axis2 native http sender.
[Wed Aug 7 18:45:01 2013] [debug] http_sender.c(494)
msg_ctx_id:urn:uuid:b4375618-ff80-1e21-2762-005056b400f7
[Wed Aug 7 18:45:01 2013] [debug] http_transport_utils.c(3794) No session
map stored
[Wed Aug 7 18:45:02 2013] [error] http_sender.c(1330) Error occurred in
transport
[Wed Aug 7 18:45:02 2013] [error] http_sender.c(1355) Error occurred in
transport
[Wed Aug 7 18:45:02 2013] [error] engine.c(171) Transport sender invoke
failed
[Wed Aug 7 18:45:02 2013] [error]
/usr/src/redhat/BUILD/wso2-wsf-php-src-2.1.0/src/wsf_client.c(1696)
[WSF/PHP] Response Payload NULL( Error number and code) => : 75 :: Error
occurred in transport
[Wed Aug 7 18:45:02 2013] [info] [rampart] rampart_mod shutdown
[Wed Aug 7 18:45:02 2013] [info] [rahas] Rahas module shutdown
No comments:
Post a Comment