Jump to content

SOAP help needed.


faisalsahar

Recommended Posts

when i send the following soap request

 

 

<?php
$authentication = array("username" => "*******", "password" => "**********", "version" => "1.1.0.0", "uoCode" => 10 );
$client = new SoapClient("http://service.babalumra.com/UO_Webservice/UO_WebService.asmx?WSDL", array("trace" => 1));
$response = $client->Authenticate($authentication);
$xml = new SimpleXMLElement($client->__getLastResponse());
$elements = $xml->xpath('//soap:Envelope/soap:Header');

$UO =  $elements[0]->OfflineHeader->UO;
$Ticket = $elements[0]->OfflineHeader->Ticket;
$UserIP = $elements[0]->OfflineHeader->UserIP;
$UserVer = $elements[0]->OfflineHeader->UserVer;
$UserId = $elements[0]->OfflineHeader->UserId;
$header = new SoapHeader('http://www.babalumra.com/BAU' 'OfflineHeader', array('UO' => $UO, 'Ticket' => $Ticket, 'UserIP' => $UserIP, 'UserVer' => $UserVer, 'UserId' => $UserId));
$client->__setSoapHeaders(array($header));

try
{
$result = $client->GetArrivalDepartueData(array("MofaNo" => 49028670, "lang" => 1));    
}
catch ( Exception $e)
{
    print_r(htmlentities($client->__getLastRequest()));
    
}

 

when looking at the xml it is generated something like this which is not accepted by the server.

 

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.babalumra.com/BAU">
<SOAP-ENV:Header>
<ns1:OfflineHeader>
<ns1:UO>10</ns1:UO>
<ns1:Ticket>E84A9D898F22276371F49BFC926D3F1E6D8F9F0B3F5AB44C4CB53AE88705FFFA069B9D</ns1:Ticket>
<ns1:UserIP>176.45.84.6</ns1:UserIP>
<ns1:UserVer>1.1.0.0</ns1:UserVer>
<ns1:UserId>100</ns1:UserId>
</ns1:OfflineHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:GetArrivalDepartueData>
<ns1:MofaNo>49028670</ns1:MofaNo>
<ns1:lang>1</ns1:lang>
</ns1:GetArrivalDepartueData>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 

I want to replace ns1 with bau

 

any suggestions .

 

 

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.