Jump to content

Recommended Posts

Dear Php Experts,

 

We are trying to implement an API from Creditsafe, an online credit check for b2b businesses.

They are working with Wsdl / XML and webservices.

All i know is to work with PHP Soap. This we can do but then we are stuck.

 

We need help how to communicate with php to that service.

How to give input to the service and how to get output from their service to our website.

 

If someone can help us further i will send you roses :)

 

 

Best regards

Bert Alting

Cargotrax.EU

Where are you stuck? wsdl basically is SOAP, so the usage is pretty much the same.

ini_set('soap.wsdl_cache_enbled',0);
ini_set('soap.wsdl_cache_ttl',0);
try{
	$opts = array(
		'trace'		=>	true,
		'exceptions'	=>	true,
		'cache_wsdl'	=>	WSDL_CACHE_NONE,
		'soap_version'	=>	SOAP_1_2,
	);
	$client = new SoapClient($apiAddress,$opts);
	$params = new stdClass();
	$params->param_a = 'Testing';
	$params->param_b = 'Still testing';
	$results = simplexml_load_string($client->InputFunction($params)->ReturnValues);
}catch(SoapFault $e){
	print("<p>Error: {$e->getMessage()}</p>");
}

This is assuming the return values are XML-formatted.

Edited by maxxd
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.