I am trying to make a SOAP call using the SoapClient within PHP but I am having trouble sending the body parameters. The headers are being sent over just fine and there are no errors but the body is empty.
I am not very familiar with PHP so this is new to me.
Here is my login function:
function Login($username, $password, $clientaccesskey, $useraccesskey)
{
$parameters = array(
'LogOnRequest' =>
array(
'ClientAccessKey' => $clientaccesskey,
'Password' => $password,
'UserAccessKey' => $useraccesskey,
'UserName' => $username
)
);
$headers = array();
$headers[] = new SoapHeader('http://www.w3.org/2005/08/addressing', 'Action', 'http://www.ultipro.com/dataservices/bidata/2/IBIDataService/LogOn');
$headers[] = new SoapHeader('http://www.w3.org/2005/08/addressing', 'To', 'https://service4.ultipro.com/services/BiDataService');
try
{
$soapclient = new SoapClient('https://service4.ultipro.com/services/BiDataService', array('soap_version' => SOAP_1_2, 'encoding' => 'UTF-8', 'exceptions' => TRUE, 'trace' => TRUE));
$soapclient->__setSoapHeaders($headers);
$response = $soapclient->__soapCall('LogOn', array($parameters));
echo json_encode($response);
echo htmlentities($soapclient->__getLastRequest());
}
catch(SoapFault $fault){
echo $fault->faultstring;
}
}
When I run this code it appears to be talking to the server because I am getting a response:
{"LogOnResult":{"ServiceId":null,"ClientAccessKey":null,"Token":null,"Status":"Failed","StatusMessage":"User authentication failed","InstanceKey":null}}
But this is the XML that is being sent to the service:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://www.ultipro.com/dataservices/bidata/2" xmlns:ns2="http://www.w3.org/2005/08/addressing">
<env:Header>
<ns2:Action>http://www.ultipro.com/dataservices/bidata/2/IBIDataService/LogOn</ns2:Action>
<ns2:To>https://service4.ultipro.com/services/BiDataService</ns2:To>
</env:Header>
<env:Body>
<ns1:LogOn />
</env:Body>
</env:Envelope>
This is what the XML is SUPPOSED to look like:
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.ultipro.com/dataservices/bidata/2/IBIDataService/LogOn</a:Action>
<a:To s:mustUnderstand="1">https://servicehost/services/BiDataService</a:To>
</s:Header>
<s:Body>
<LogOn xmlns="http://www.ultipro.com/dataservices/bidata/2">
<logOnRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<UserName>username</UserName>
<Password>password</Password>
<ClientAccessKey>12345</ClientAccessKey>
<UserAccessKey>01234567890</UserAccessKey>
</logOnRequest>
</LogOn>
</s:Body>
</s:Envelope>
What am I doing wrong that is causing the body parameters to not be sent in the SOAP request?
I was able to achieve it using a class, the SOAPVar and the SOAPParam classes, like this:
function Login($username, $password, $clientaccesskey, $useraccesskey)
{
// Class handler for the request
class LogOnRequest {
function __construct($usr, $pwd, $cak, $uak)
{
$this->UserName = $usr;
$this->Password = $pwd;
$this->ClientAccessKey = $cak;
$this->UserAccessKey = $uak;
}
}
// Conversion to a SOAP object
$lor = new LogOnRequest($username, $password, $clientaccesskey, $useraccesskey);
$logOnRequest = new SoapVar($lor, SOAP_ENC_OBJECT, 'LogOnRequest', 'http://soapinterop.org/xsd');
$headers = array();
$headers[] = new SoapHeader('http://www.w3.org/2005/08/addressing', 'Action', 'http://www.ultipro.com/dataservices/bidata/2/IBIDataService/LogOn');
$headers[] = new SoapHeader('http://www.w3.org/2005/08/addressing', 'To', 'https://service4.ultipro.com/services/BiDataService');
try
{
$soapclient = new SoapClient('https://service4.ultipro.com/services/BiDataService', array('soap_version' => SOAP_1_2, 'encoding' => 'UTF-8', 'exceptions' => TRUE, 'trace' => TRUE));
$soapclient->__setSoapHeaders($headers);
// Direct call to the LogOn method and SOAP parameter pass
$response = $soapclient->LogOn(new SoapParam($logOnRequest, 'logOnRequest'));
echo json_encode($response);
echo htmlentities($soapclient->__getLastRequest());
}
catch(SoapFault $fault){
echo $fault->faultstring;
}
}
Which gave me the following XML request:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://soapinterop.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://www.ultipro.com/dataservices/bidata/2" xmlns:ns3="http://www.w3.org/2005/08/addressing">
<env:Header>
<ns3:Action>http://www.ultipro.com/dataservices/bidata/2/IBIDataService/LogOn</ns3:Action>
<ns3:To>https://service4.ultipro.com/services/BiDataService</ns3:To>
</env:Header>
<env:Body>
<ns2:LogOn xsi:type="ns1:LogOnRequest">
<UserName>u</UserName>
<Password>p</Password>
<ClientAccessKey>cak</ClientAccessKey>
<UserAccessKey>uak</UserAccessKey>
</ns2:LogOn>
</env:Body>
</env:Envelope>
Related
I have the below SOAP XML, Im trying to access the vehicle details with the soap header authentication. I have tried the below code. I think, Im missing something on this. Can u help
SOAPAction: "http://abcddetails.org/getVehicleDetails"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<UserIdentifierSoapHeaderIn xmlns="http://abcddetails.org/">
<UserName>string</UserName>
<Password>string</Password>
</UserIdentifierSoapHeaderIn>
</soap:Header>
<soap:Body>
<getVehicleDetails xmlns="http://abcddetails.org/">
<request>
<SystemCode>int</SystemCode>
<UserID>string</UserID>
<PlateInfo>
<PlateNo>long</PlateNo>
<PlateOrgNo>long</PlateOrgNo>
<PlateColorCode>int</PlateColorCode>
</PlateInfo>
<ChassisNo>string</ChassisNo>
</request>
</getVehicleDetails>
</soap:Body>
PHP code along with the SOAP Header, I have created as the below.
<?php
$wsdl = "http://abcddetails.org/InspectionServices.asmx?WSDL";
$client = new SoapClient($wsdl, array('trace'=>1)); // The trace param will show you errors stack
$auth = array(
'Username'=>'XXXXX',
'Password'=>'XXXXX',
);
$header = new SOAPHeader($wsdl, 'UserIdentifierSoapHeaderIn', $auth);
$client->__setSoapHeaders($header);
// web service input params
$request_param = array(
"SystemCode" => 4,
"UserID" => "TEST",
"ChassisNo" => '1N4AL3A9XHC214925'
);
$responce_param = null;
try
{
$responce_param = $client->getVehicleDetails($request_param);
//$responce_param = $client->call("webservice_methode_name", $request_param); // Alternative way to call soap method
}
catch (Exception $e)
{
echo "<h2>Exception Error!</h2>";
echo $e->getMessage();
}
print_r($responce_param);
?>
Can u guide if anything I have written wrong here in this.
You can use the __soapCall method like this:
$result = $client->__soapCall('webserviceMethodeName', ['parameters' => $params]);
In your case a soap action would be invoked like this:
$responce_param = $client->__soapCall('getVehicleDetails', ['parameters' => $request_param]);
Read more
How can I make Soap request using Curl php by using below soap format and url? I have tried avaliable solutions online and none of them worked out.
$soap_request = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:alisonwsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<soap:Header>
<credentials>
<alisonOrgId>9ReXlYlpOThe24AWisE</alisonOrgId>
<alisonOrgKey>C2owrOtRegikaroXaji</alisonOrgKey>
</credentials>
</soap:Header>
<SOAP-ENV:Body>
<q1:login xmlns:q1="urn:alisonwsdl">
<email xsi:type="xsd:string">email</email>
<firstname xsi:type="xsd:string">fname</firstname>
<lastname xsi:type="xsd:string">lname</lastname>
<city xsi:type="xsd:string">city</city>
<country xsi:type="xsd:string">country</country>
<external_id xsi:type="xsd:string"></external_id>
</q1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
Url
https://alison.com/api/service.php?wsdl
Assuming you already have php_soap extension installed, you can access the SOAP API like this:
<?php
$client = new SoapClient('https://alison.com/api/service.php?wsdl', array(
'stream_context' => stream_context_create(array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
))
));
You might want to define the header for authentication as well
$auth = array(
'alisonOrgId' => '9ReXlYlpOThe24AWisE',
'alisonOrgKey' => 'C2owrOtRegikaroXaji'
);
$header = new SoapHeader('https://alison.com/api/service.php?wsdl', 'credentials', $auth, false);
$client->__setSoapHeaders($header);
Then you can get the list of functions available
// Get function list
$functions = $client->__getFunctions ();
echo "<pre>";
var_dump ($functions);
echo "</pre>";
die;
Or call a function right away, like this:
// Run the function
$obj = $client->__soapCall("emailExists", array(
"email" => "test#email.com"
));
echo "<pre>";
var_dump ($obj);
echo "</pre>";
die;
After struggling for a week I was able to find something in this tutorial here on youtube https://www.youtube.com/watch?v=6V_myufS89A and I was able to send requests to the API successifuly, first read my xml format above before continuing with my solution
$options = array('trace'=> true, "exception" => 0);
$client = new \SoapClient('your url to wsdl',$options);
//if you have Authorization parameters in your xml like mine above use SoapVar and SoapHeader as me below
$params = new \stdClass();
$params->alisonOrgId = 'value here';
$params->alisonOrgKey = 'value here';
$authentication_parameters = new \SoapVar($params,SOAP_ENC_OBJECT);
$header = new \SoapHeader('your url to wsdl','credentials',$authentication_parameters);
$client->__setSoapHeaders(array($header));
print_r($client->__soapCall("Function here",'Function parameter here or left it as null if has no parameter'));
//or call your function by
print_r($client->yourFunction($function_parameters));
}
Hope this will help someone out there struggling with soap requests that contains authentication informations
Hy all!
I try to do DHL Express, but I get caught up very much with DHL not really wanting to help. So I would like to ask for help.
And since I do not get back tracking numbers for anything just underlying XML, so I would like to ask for help. Thank you very much for helping me.
What I try:
// The url of the service
$url = 'https://wsbexpress.dhl.com:443/sndpt/expressRateBook?WSDL';
// the soap operation which is called
$action = 'createShipmentRequest';
// the xml input of the service
$xmlrequest = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rat="http://scxgxtt.phx-dc.dhl.com/euExpressRateBook/RateMsgRequest">
<soapenv:Header>
<wsse:Security soapenv:mustunderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:id="UsernameToken-5" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>*********</wsse:Username>
<wsse:Password type="PasswordText">*******</wsse:Password>
<wsse:Nonce encodingtype="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">eUYebYfsjztETJ4Urt8AJw==</wsse:Nonce>
<wsu:Created>' . date('Y-m-d H:i:s') . '</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
<soapenv:Header/>
<soapenv:Body>
<rat:RateRequest>
<RequestedShipment>
<DropOffType>REGULAR_PICKUP</DropOffType>
<Account>407194546</Account>
<Currency>EUR</Currency>
<UnitOfMeasurement>SI</UnitOfMeasurement>
<Ship>
<Shipper>
<StreetLines>Street number 22</StreetLines>
<City>City</City>
<PostalCode>111111</PostalCode>
<CountryCode>DE</CountryCode>
</Shipper>
<Recipient>
<StreetLines>Street number 22</StreetLines>
<City>City</City>
<PostalCode>111111</PostalCode>
<CountryCode>DE</CountryCode>
</Recipient>
</Ship>
<Packages>
<RequestedPackages number="1">
<Weight>
<Value>0.5</Value>
</Weight>
<Dimensions>
<Length>3</Length>
<Width>2</Width>
<Height>1</Height>
</Dimensions>
</RequestedPackages>
</Packages>
<ShipTimestamp>2018-07-18T08:00:00 GMT+0100</ShipTimestamp>
<Content>NON_DOCUMENTS</Content>
<PaymentInfo>DAP</PaymentInfo>
</RequestedShipment>
</rat:RateRequest>
</soapenv:Body>
</soapenv:Envelope>';
try {
// the soap client accepts options, we specify the soap version
// The trace option enables tracing of request so faults can be backtraced.
// The exceptions option is a boolean value defining whether soap errors throw exceptions of type SoapFault.
$opts = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$options = array(
'encoding' => 'UTF-8',
'verifypeer' => false,
'verifyhost' => false,
'soap_version' => SOAP_1_2,
'trace' => 1,
'exceptions' => 1,
'connection_timeout' => 180,
'stream_context' => stream_context_create($opts),
'cache_wsdl' => WSDL_CACHE_NONE,
);
// create the soapclient and invoke __doRequest method
$client = new SoapClient($url, $options);
$output = $client->__doRequest($xmlrequest, $url, $action, 1);
} catch (SoapFault $fault) {
echo "<h2>SOAP Fault!</h2><p>";
echo "FaultCode: {$fault->faultcode} <br/>";
echo "FaultString: {$fault->faultstring} <br/>";
echo"</p/>";
}
echo "<h2>WSDL URL: </h2><p>";
echo $url;
echo "</p/>";
echo "<h2>Action: </h2><p>";
echo $action;
echo "</p/>";
echo "<h2>XMLRequest: </h2><p>";
echo $xmlrequest;
echo "</p/>";
if (!isset($output)) {
echo "<h2>SOAP Fault!</h2><p>";
echo "FaultCode: {$output->faultcode} <br/>";
echo "FaultString: {$output->faultstring} <br/>";
} else {
echo "<h2>Output: </h2><p>";
file_put_contents('dhl.xml', $output);
echo $output;
echo "</p/>";
}
Return: https://justpaste.it/52zqa (sorry too long)
The question is what do I get to get this xml?
Not returning the shipment number and returning the corresponding data
I think you are getting an WSDL because your URL is asking for it. Try removing the ?WSDL:
$url = 'https://wsbexpress.dhl.com:443/sndpt/expressRateBook';
References:
How to get the wsdl file from a webservice's URL
SOAP request returned wsdl instead of expected SOAP response
I have the proper SOAP request being created except that I need the LogOn node to have an xmlns attribute. This is what the attribute looks like: xmlns="http://www.ultipro.com/dataservices/bidata/2". I have used SOAPUI to test the request and it appears that if I add that xmlns then the response should be a success.
Here is my current code:
function Login($username, $password, $clientaccesskey, $useraccesskey)
{
class LogOn
{
function __construct($request)
{
$this->logOnRequest = $request;
}
}
// Class handler for the request
class logOnRequest {
function __construct($usr, $pwd, $cak, $uak)
{
$this->UserName = $usr;
$this->Password = $pwd;
$this->ClientAccessKey = $cak;
$this->UserAccessKey = $uak;
}
}
// Conversion to a SOAP object
$lor = new LogOnRequest($username, $password, $clientaccesskey, $useraccesskey);
$lo = new LogOn($lor);
$logOnRequest = new SoapVar($lor, SOAP_ENC_OBJECT, 'logOnRequest');
$loi = new SoapVar($lo, SOAP_ENC_OBJECT);
$headers = array();
$headers[] = new SoapHeader('http://www.w3.org/2005/08/addressing', 'Action', 'http://www.ultipro.com/dataservices/bidata/2/IBIDataService/LogOn');
$headers[] = new SoapHeader('http://www.w3.org/2005/08/addressing', 'To', 'https://service4.ultipro.com/services/BiDataService');
try
{
$soapclient = new SoapClient('https://service4.ultipro.com/services/BiDataService', array('soap_version' => SOAP_1_2, 'encoding' => 'UTF-8', 'exceptions' => TRUE, 'trace' => TRUE));
$soapclient->__setSoapHeaders($headers);
// Direct call to the LogOn method and SOAP parameter pass
$response = $soapclient->LogOn(new SoapParam($loi, 'LogOn'));
echo json_encode($response);
echo htmlentities($soapclient->__getLastRequest());
}
catch(SoapFault $fault){
echo $fault->faultstring;
}
}
This is what my request looks like:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://www.ultipro.com/dataservices/bidata/2" xmlns:ns2="http://www.w3.org/2005/08/addressing">
<env:Header>
<ns2:Action>http://www.ultipro.com/dataservices/bidata/2/IBIDataService/LogOn</ns2:Action>
<ns2:To>https://service4.ultipro.com/services/BiDataService</ns2:To>
</env:Header>
<env:Body>
<ns1:LogOn>
<logOnRequest>
<UserName></UserName>
<Password></Password>
<ClientAccessKey></ClientAccessKey>
<UserAccessKey></UserAccessKey>
</logOnRequest>
</ns1:LogOn>
</env:Body>
</env:Envelope>
It needs to look like this:
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://www.ultipro.com/dataservices/bidata/2" xmlns:ns2="http://www.w3.org/2005/08/addressing">
<env:Header>
<ns2:Action>http://www.ultipro.com/dataservices/bidata/2/IBIDataService/LogOn</ns2:Action>
<ns2:To>https://service4.ultipro.com/services/BiDataService</ns2:To>
</env:Header>
<env:Body>
<ns1:LogOn xmlns="http://www.ultipro.com/dataservices/bidata/2">
<logOnRequest>
<UserName></UserName>
<Password></Password>
<ClientAccessKey></ClientAccessKey>
<UserAccessKey></UserAccessKey>
</logOnRequest>
</ns1:LogOn>
</env:Body>
</env:Envelope>
I've spend hours with SOAPClient and still get no result, hope someone can help me. I'm trying to create and send to web-service following code:
POST /PortalServices/PortalServices.asmx HTTP/1.1
Host:***.***.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://***.com/CreateUser"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<UserCredentials xmlns="http://***.com/">
<UserName>string</UserName>
<PassWord>string</PassWord>
<ServiceName>string</ServiceName>
</UserCredentials>
</soap:Header>
<soap:Body>
<CreateUser xmlns="http://***.com/">
<user>
<Name>string</Name>
<Email>string</Email>
<PassWord>string</PassWord>
<WsServices>
<WsService>
<Id>int</Id>
</WsService>
</WsServices>
</user>
</CreateUser>
</soap:Body>
</soap:Envelope>
To get this xml I use the following code:
<?php
class WsService {
public $Id = "****";
}
class WsServices {
public $WsService;
public function __construct() {
$this->WsService = new WsService();
}
}
class WsUser {
public $Name = 'Sasha Lavasov';
public $Email = 'imsashko#gmail.com';
public $PassWord = 'test';
public $WsServices;
public function __construct() {
$this->WsServices = new WsService();
}
}
$ini = ini_set("soap.wsdl_cache_enabled","0");
$soap_url = 'http://***.***.com/PortalServices/PortalServices.asmx?wsdl';
$soapClient = new \SoapClient($soap_url, array(
'soap_version'=>SOAP_1_2,
'trace' => 1,
'exceptions' => true,
'cache_wsdl' => WSDL_CACHE_NONE
));
$hdd = new stdClass();
$hdd->UserName = '***';
$hdd->PassWord = '***';
$hdd->ServiceName = '***';
$hd = new SoapVar($hdd, SOAP_ENC_OBJECT);
$headers = new \SoapHeader('http://***.***.com/PortalServices', 'UserCredentials', $hd);
// Prepare Soap Client
$soapClient->__setSoapHeaders(array($headers));
$user = new WsUser();
// Setup the CreateUser parameters
$ap_param = array(
'Name' => 'Sasha Lavasov',
'WsUser' => $user
);
$param = new \SoapParam($user, 'WsUser');
// Call CreateUser ()
$error = 0;
try {
//Build user entity
$usr = new WsUser();
$wsServices = new StdClass();
$id = new StdClass();
$id->Id = '***';
$wsServices->WsService = $id;
$usr->WsServices = $wsServices;
$createUser = new stdClass();
$createUser->user = $usr;
$createUser = new SoapVar($createUser, SOAP_ENC_OBJECT, "WsUser", "http://***.***.com/PortalServices/PortalServices.asmx?op=CreateUser");
$pm = new SoapParam($createUser, "user");
$soapClient->CreateUser($pm);
//Here I get xml
var_dump( $soapClient->__getLastRequest()); die();
} catch (\SoapFault $fault) {
$error = 1;
print($fault->faultcode." - ".$fault->faultstring); die();
}
if ($error == 0) {
// DO SOMETHING
} else {
}
$res = $soapClient->__getLastResponse();
print_r($res); die();
But instead I get something like this:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://***.***.com/PortalServices/PortalServices.asmx?op=CreateUser" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://***.com/" xmlns:ns3="http://***.***.com/PortalServices">
<env:Header>
<ns3:UserCredentials>
<UserName>***</UserName>
<PassWord>***</PassWord>
<ServiceName>***</ServiceName>
</ns3:UserCredentials></env:Header>
<env:Body>
<ns2:CreateUser xsi:type="ns1:WsUser">
<user>
<Name>Sasha Lavasov</Name>
<Email>imsashko#gmail.com</Email>
<PassWord>test</PassWord>
<WsServices><WsService><Id>***</Id></WsService></WsServices>
</user>
</ns2:CreateUser>
</env:Body>
</env:Envelope>
And get FALSE as result.
In the list of server's functions (using __getFunctions()) I've got following:
CreateUserResponse CreateUser(CreateUser $parameters)
Can anyone help me or just tell where I'm wrong?
Just a suggestion.
In your good xml you've:
<UserCredentials xmlns="http://***.com/">
but in your PHP you set:
$headers = new SoapHeader('http://***.***.com/PortalServices', 'UserCredentials', $hd);
Then you've 2 different namespaces: http://***.***.com/PortalServices instead of http://***.com/