Skip to Content
avatar image
Former Member

PHP SAP SOAP

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'));

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 21, 2011 at 02:44 PM

    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

    Add comment
    10|10000 characters needed characters exceeded