cancel
Showing results for 
Search instead for 
Did you mean: 

PHP SAP SOAP

Former Member
0 Kudos

I'm trying to make a connection through php to sap with soap class.

For now i can call the server successfully but when I try to access the login function, occur is an error: invalid xml. Doing tests in soapUI see that the error in this tag:

<? Xml version = "1.0" encoding = "UTF-8"?>

because in soapUI when changed to:

<? Xml version = "1.0"?>

Works perfectly.

Someone can help me to change the tag or whether the problem is the WSDL?

$wsdl="http://localhost/B1WS/WebReferences/LoginService.wsdl";

$client=new SoapClient($wsdl, array('location' => 'http://192.168.1.100/B1WS/Service.asmx',

'trace'=>1'));

$res=$client->Login(array(

'DatabaseServer' => 'localhost',

'DatabaseName' => 'xxx'',

'DatabaseType' => 'xxxx',

'DatabaseUsername' => 'xxxx',

'DatabasePassword' => 'xxxxxxx',

'CompanyUsername' => 'xxxxxxxxxx',

'CompanyPassword' => 'xxxxxx',

'Language' => 'ln_English',

'LicenseServer' => 'xxxxxxxxxxxxxxx'));

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Iu2019ve got a video of connecting PHP to SAP using SOAP that might be of some use

http://www.mattbartlett.co.uk/setting-up-soap-in-sap-and-connecting-with-php/

http://www.youtube.com/watch?v=GG85rUbhXMg

Matt