Despite being a PHP developer, I'm just now getting my first taste of web services. I was hoping to get a little help, as the book I am using is not much help. One of the companies we are doing business with gave me an WSDL XML document in the format in needs to be in (I'll post a link of it). Due to my inexperience in this particular subject, I'm not really sure what to do. I need to know how to implement the WebService interface between my system and their used car management system. Any help or direction would be so greatly appreciated, and please, don't just send a link to the php manual. I've obviously been there, as it is typically the go-to place for help. I have been reading about the curl which will help me to communicate and transfer http request. To access their system they have given me access and i have to use credentials :
The credentials are:
Group ID
Dealer Number:
User:
Password:
The WebService address is:
http://uvm-aw.bmwgroup.com/awonline/de/service2/SNWebService.php
And the WSDL is:
http://uvm-aw.bmwgroup.com/awonline/de/service2/SNWebService.php?wsdl
So my login request and response will look like this :
Login request :
<LoginRequest>
<user> user </ user>
<password> pass </ password>
<corporate_group_id> 101 </ corporate_group_id>
<dealer_number> 11111 </ dealer_number>
<dms_id> 12345678 </ dms_id>
</ Login Request>
The answer for success looks like
<LoginResponse>
<token> uiih37 </ token>
<login_id> 8487292 </ login_id>
<status>
<success> true </ success>
<code> 0 </ code>
<message/>
<browserURL/>
</ status>
</ Login Response>
trying to retrive data from wsdl not working:
$reference = array(
'Credentials' => array('UserName' => '', 'Password' => ''),
'corporate_group_id => '101',
'dealer_number' => '11111' ,
'DMS-ID' => 'A13T2D19'
);
$client = new SoapClient("http://uvm-aw.bmwgroup.com/awonline/de/service2/SNWebService.php?wsdl");
$result = $client->GetTuDetail($reference);
print_r($result);