Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <GetLineCharacteristics xmlns="http://llu.webservices.opalonline.co.uk/LineCharacteristicsWS">
- <request>
- <UserCredentials>
- <Username>user</Username>
- <Password>pass</Password>
- <AgentID>1234</AgentID>
- </UserCredentials>
- <RequestDetails xsi:type="PostcodeRequest">
- <Postcode>SW1A 1AA</Postcode>
- </RequestDetails>
- <UserConsent>Yes</UserConsent>
- <ServiceType>MPF</ServiceType>
- </request>
- </GetLineCharacteristics>
- </soap:Body>
- </soap:Envelope>
- $url2 = "https://mercuryllu.webservices.opalonline.co.uk/LineCharacteristicsWSV6/LineCharacteristicsWS.asmx?wsdl";
- $params = array(
- 'encoding' => 'UTF-8',
- 'use' => SOAP_LITERAL,
- 'trace' => 1,
- 'uri' => 'http://llu.webservices.opalonline.co.uk/LineCharacteristicsWS',
- 'connection_timeout' => 2000);
- $namespace = 'http://llu.webservices.opalonline.co.uk/LineCharacteristicsWS';
- $client2 = new SoapClient($url2, $params);
- class PostCodeRequest
- {
- function __construct($pc)
- {
- $this->Postcode = $pc;
- }
- }
- class UserCredentials
- {
- function __construct($pc, $pass, $ag)
- {
- $this->Username = $pc;
- $this->Password = $pass;
- $this->AgentID = $ag;
- }
- }
- class request
- {
- function __construct($pc, $pass, $ag, $rd)
- {
- $this->UserCredentials = $pc;
- $this->UserConsent = $pass;
- $this->ServiceType = $ag;
- $this->RequestDetails = $rd;
- }
- }
- $credentialsCls = new UserCredentials('User','pass', 9999);
- $credentials = new SoapVar($credentialsCls, SOAP_ENC_OBJECT, '',$namespace);
- $postCodeRequestCls = new PostcodeRequest('SW1A 1AA');
- $postCodeRequest = new SoapVar($postCodeRequestCls,SOAP_ENC_OBJECT,'PostcodeRequest',$namespace);
- $requestCls = new request($credentials, 'Yes', 'MPF', $postCodeRequest);
- $request = new SoapVar($requestCls, SOAP_ENC_OBJECT,'');
- $res3 = $client2->GetLineCharacteristics(new SoapParam($request, 'WhatIsThisdoingHrere'));
- header('Content-type:text/xml');
- echo $client2->__getLastRequest();
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <GetLineCharacteristics xmlns="http://llu.webservices.opalonline.co.uk/LineCharacteristicsWS">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement