OUTPUT Fault occurred in processing, detail provided
PHPSOAP ProtocolWeb Servers
Last Comment
Dhanish pk
8/22/2022 - Mon
Julian Hansen
Is this a PHP error or an error you get back from the remote service?
Dhanish pk
ASKER
i think this is PHP error . not from remote service
Julian Hansen
It does not look like a PHP error - the latter usually is accompanies by a line number and file name.
Is that the exact error as it appears on the screen?
i tryed to connect SOAP with curl . i gett blank result.here is the code
Member_2_248744
greetings Dhanish pk, , the SOAP connection for remote function-method operations, is not simple to get to work, , for several reasons. The SOAP depends entirely on method definition and structure definitions in the XML text that can be used in code (line by line, step wise programming) "Processing" on a remote computer, in a NON HTTP data exchanges (more than a single request and response). . You seem to have written the WSDL XML as -
This does not look entirely "formatted" correctly in WSDL XML definitions, and structures? ? It has no definition for a specific "Method" and the result-return TYPE structure or the method parameters TYPES and TYPE stuctures.
In the WSDL programming processing exchanges I have attempted, for a "Client" to a remote server, PHP Got the XML document from the remote server address that will do the object creation that processes the methods defined in the WSDL XML text, that initiates the new SoapClient ( ) -
$client = new SoapClient("https://b2b.bank.com/soap/wsdl/b2bpro.wsdl");
it looks like your error message is from this lines -
} catch (SoapFault $E) {
echo $E->getMessage(); // ERROR OUTPUT
}
I do not beleive you can write the WSDL XML text yourself and get this to work as a SOAP exchange? ?
The PHP function SoapClient( ) and get a successful connection, , but for successful use of the remote server programming SOAP API , you usually need to use their provided "CODE" samples in the SOAP object explanations and demo codes.
Dear Slick812 ,Thank you for your support
the service provider will not give us any sample or demo code to achieve this task .they only give us .wsdl and Keystore file . I did this integration in java successfully . I am struggling on only in PHP.
the XML I showed in question, not a WSDL file .its a soap requestion schema which I copied from soapUI tool
Thank you.
Member_2_248744
I have looked briefly for PHP code using SOAP and the XML text for a "requestion schema", and did not find anything that I thought could be used here. I think in JAVA, you can use the "requestion schema" as the parameter's VALUES (and other things) when calling a remote method. I have never seen or heard of the XML "requestion schema" used in PHP SOAP code? But it may be usable somehow? But I do not know that usage. But In PHP using the SoapClient( ) , there is no reason or advantage I know of in using XML text instead of the array TYPE in PHP to store the VALUES of a method's parameters. In your code, you have the "requestion schema" VALUES as -
****
****
234324
200
SAR
and then in your $in Object VALUES, you Duplicate all of those
'****'
'***'
'12344'
'100'
'SAR'
which indicates to me you are on the wrong path to success in coding.
In the PHP SOAP I have used, I neede to have a working remote server WSDL XML file address in the SoapClient( ) like -
$client = new SoapClient("https://b2b.bank.com/soap/wsdl/b2bpro.wsdl");
and NOT a "requestion schema" XML file. The SoapClient( ) requires the full WSDL definitions to know what to do and how to do it on the client side exchange.
If you have done this in JAVA platform, and the -
executeRB_OLP_INITIATE_PAYMENT( )
is a correct method name, then define the method parameters complex type as a PHP array with the VALUES -
$par = array('olpIdAlias'=>'****',
'merchantId'=>'***';
'merchantRefNum'=>12344, // probably NOT a string
'paymentAmount'=>100,
'paymentCurrency'=>'SAR',
'dynamicMerchantLandingURL'=>'',
'dynamicMerchantFailureURL'=>'' );
And you can try the method as -
$response = $client->executeRB_OLP_INITIATE_PAYMENT($par);
I did NOT show the $options parameter in the SoapClient( ) , because I have no way to know what your source server SOAP connection needs for its requirements, but you may know this from the JAVA? ?
I think maybe the -
'location' => $endpoint,
may not be needed if the service WSDL file is in the address