FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Not understood error...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Not understood error... [message #178146] Sun, 13 May 2012 14:24 Go to previous message
taltene is currently offline  taltene
Messages: 3
Registered: May 2012
Karma:
Junior Member
Hi,

I've got the following value in properties file.
This is how I read it:

----------------------------------------------------------

Function ReadValueByKey ($PropFile, $PropKey) {

$bCheckFlag = false;

$Prop_Key = "_resp_".(strtolower($PropKey));
$Prop_File = file($PropFile);

unset($Prop_Value);

for($Counter = 0; $Counter < sizeof($Prop_File) && ($bCheckFlag == false); $Counter++) {

$Prop_Temp = trim($Prop_File[$Counter]);

$Prop_Tmp = strtolower($Prop_Temp);

if (substr_count($Prop_Tmp, $Prop_Key . "=") > 0) {
$Prop_Value = substr($Prop_Temp, strlen($Prop_Key . "="));
while($Counter != sizeof($Prop_File))
{
$sLine = trim($Prop_File[$Counter++]);
$sLine = strtolower($sLine);
if ($bCheckFlag == true) {
if(substr_count($sLine, "_resp_") < 1){
if($sLine != ""){
$Prop_Value = $Prop_Value."\n".$sLine;
}
}else
break;
}else{
$bCheckFlag = true;
}
}
}
} // end for

//print("Prop_Value=".$Prop_Value."\n\n");
print($Prop_Value);

return $Prop_Value;
}
-------------------------------------------------------------

The key-value is read is as follows:

-------------------------------------------------------------

_resp_authSchema=<?xml version\="1.0" encoding\="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV\="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC\="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi\="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd\="http://www.w3.org/2001/XMLSchema" xmlns:al\="http://www.alcatel-lucent.com/soap_cm" xmlns:gd\=" http://www.3gpp.org/ftp/Specs/archive/32_series/32317/schema/32317-700/Gene ricIRPData" xmlns:bs\=" http://www.3gpp.org/ftp/Specs/archive/32_series/32607/schema/32607-700/Basi cCMIRPSystem" xmlns:bd\=" http://www..3gpp.org/ftp/Specs/archive/32_series/32607/schema/32607-700/Bas icCMIRPData">
..<SOAP-ENV:Body>
...<bd:createMOResponse>
....<mO>
.....<moiLocation> impiId\=+{__IMPIID},imsServiceProfileId\=1,suMSubscriptionProfileId\=1,suMS ubscriberProfileId\=+{__MSUBSCRIBERPROFILEID}_at,subscriptionFunctionId\=1, managedElementId\=HSS1 </moiLocation>
....</mO>
...</bd:createMOResponse>
..</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

------------------------------------------------------------------

Now the problem is as follows:

When use the first print out of the two at the bottom of the function I get:

-------------------------------------------------------------------


Prop_Value=<?xml version\=\"1.0\" encoding\=\"UTF-8\"?>
<soap-env:envelope xmlns:soap-env\=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soap-enc\=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi\=\"http://www.w3.org/2001/xmlschema-instance\" xmlns:xsd\=\"http://www.w3.org/2001/xmlschema\" xmlns:al\=\"http://www.alcatel-lucent.com/soap_cm\" xmlns:gd\=\" http://www.3gpp.org/ftp/specs/archive/32_series/32317/schema/32317-700/gene ricirpdata\" xmlns:bs\=\" http://www.3gpp.org/ftp/specs/archive/32_series/32607/schema/32607-700/basi ccmirpsystem\" xmlns:bd\=\" http://www.3gpp.org/ftp/specs/archive/32_series/32607/schema/32607-700/basi ccmirpdata\">
..<soap-env:body>
...<bd:createmoresponse>
....<mo>
.....<moilocation> impiid\=+{__impiid},imsserviceprofileid\=1,sumsubscriptionprofileid\=1,sums ubscriberprofileid\=+{__msubscriberprofileid}_at,subscriptionfunctionid\=1, managedelementid\=hss1 </moilocation>
....</mo>
...</bd:createmoresponse>
..</soap-env:body>
</soap-env:envelope>
--------------------------------------------------------------

As required!

But, when I comment this print and uncomment the next one, I get the following error message:

----------------------------------------------------------------

This page contains the following errors:

error on line 1 at column 13: expected '='
Below is a rendering of the page up to the first error.

-----------------------------------------------------------------

And this is what I get when I "view source" this page:

-----------------------------------------------------------------


<?xml version\=\"1.0\" encoding\=\"UTF-8\"?>
<soap-env:envelope xmlns:soap-env\=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:soap-enc\=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi\=\"http://www.w3.org/2001/xmlschema-instance\" xmlns:xsd\=\"http://www.w3.org/2001/xmlschema\" xmlns:al\=\"http://www.alcatel-lucent.com/soap_cm\" xmlns:gd\=\" http://www.3gpp.org/ftp/specs/archive/32_series/32317/schema/32317-700/gene ricirpdata\" xmlns:bs\=\" http://www.3gpp.org/ftp/specs/archive/32_series/32607/schema/32607-700/basi ccmirpsystem\" xmlns:bd\=\" http://www.3gpp.org/ftp/specs/archive/32_series/32607/schema/32607-700/basi ccmirpdata\">
..<soap-env:body>
...<bd:createmoresponse>
....<mo>
.....<moilocation> impiid\=+{__impiid},imsserviceprofileid\=1,sumsubscriptionprofileid\=1,sums ubscriberprofileid\=+{__msubscriberprofileid}_at,subscriptionfunctionid\=1, managedelementid\=hss1 </moilocation>
....</mo>
...</bd:createmoresponse>
..</soap-env:body>
</soap-env:envelope>

--------------------------------------------------------------------

Any help will be blessed.
Thanks!
[Message index]
 
Read Message
Read Message
Previous Topic: Re: reading a newline from a properties file
Next Topic: Re: Transforming object properties?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 21:43:13 GMT 2024

Total time taken to generate the page: 0.03814 seconds