We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I am trying to convert curl post request to an array.
Example Code: $response = curl_exec($this->client); $resArray = Xml2Array::convert($response)->toArray();
XML response from the curl call:
Array created by Xml2Array::convert($response)->toArray() :
Array ( [SOAP-ENV:Envelope] => Array ( [SOAP-ENV:Header] => [SOAP-ENV:Body] => Array ( [ns:submit-claim2caskResponse] => Array ( [reply] => 5601088 2024020621 20240206 163221 A N P 91206263877764 5 GROOM AV DISCOVERY FLORIDA 1709 GP GAUTENG 00000000000814603186 20191003 INDO JET CONWAY TRAVEL 20190820 WENDY KLAASSEN 416976700 06400 ) ) [@attributes] => Array ( [xmlns:SOAP-ENV] => http://schemas.xmlsoap.org/soap/envelope/ [xmlns:ns] => http://www.medikredit.co.za/CASK ) ) )
But if I pass the the top xml as static string to Xml2Array::convert($response)->toArray() it works correctly.
Array ( [MkFullXMLResponse] => Array ( [MkEligUninsuredXMLResponse] => Array ( [TransactionData] => Array ( [SupplierBHFNumber] => 5601088 [TransactionInfo] => Array ( [InternalClaimNumber] => 2024020657 [ProcessDate] => 20240206 [ProcessTime] => 113457 [TransactionResult] => A [SchemeResult] => N [PaymentAdvice] => P ) ) [HospitalData] => [VendorInfo] => [ProcessReference] => Array ( [MkRef] => 91205094438269 ) [AddressInformation] => Array ( [AddressLine1] => 5 GROOM AV [Suburb] => DISCOVERY [City] => FLORIDA [PostalCode] => 1709 [Province] => GP [ProvName] => GAUTENG ) [TelephoneNumberDetail] => Array ( [CellPhone] => 00000000000814603186 ) [EmployerDetails] => Array ( [0] => Array ( [LastRecordedDate] => 20191003 [EmployerName] => INDO JET CONWAY TRAVEL ) [1] => Array ( [LastRecordedDate] => 20190820 [EmployerName] => WENDY KLAASSEN ) ) [IncomeEstimator] => Array ( [ConsumerNumber] => 416976700 [PredictedIncome] => 06400 ) [Messaging] => ) [@attributes] => Array ( [xsi:schemaLocation] => http://www.medikredit.co.za/MedikreditElectronicClaimProcessing/xml4 C:/Users/RoshanW/ONEDRI1/Documents/IQPROJ1/ECDOH/XMLV40~1.XSD [xmlns] => http://www.medikredit.co.za/MedikreditElectronicClaimProcessing/xml4 ) ) )
Any help or guidance would be appreciate.
Derek
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I am trying to convert curl post request to an array.
Example Code:
$response = curl_exec($this->client);
$resArray = Xml2Array::convert($response)->toArray();
XML response from the curl call:
5601088 2024020621 20240206 163221 A N P 91206263877764 5 GROOM AV DISCOVERY FLORIDA 1709 GP GAUTENG 00000000000814603186 20191003 INDO JET CONWAY TRAVEL 20190820 WENDY KLAASSEN 416976700 06400Array created by Xml2Array::convert($response)->toArray() :
Array ( [SOAP-ENV:Envelope] => Array ( [SOAP-ENV:Header] => [SOAP-ENV:Body] => Array ( [ns:submit-claim2caskResponse] => Array ( [reply] => 5601088 2024020621 20240206 163221 A N P 91206263877764 5 GROOM AV DISCOVERY FLORIDA 1709 GP GAUTENG 00000000000814603186 20191003 INDO JET CONWAY TRAVEL 20190820 WENDY KLAASSEN 416976700 06400 ) ) [@attributes] => Array ( [xmlns:SOAP-ENV] => http://schemas.xmlsoap.org/soap/envelope/ [xmlns:ns] => http://www.medikredit.co.za/CASK ) ) )
But if I pass the the top xml as static string to Xml2Array::convert($response)->toArray() it works correctly.
Array ( [MkFullXMLResponse] => Array ( [MkEligUninsuredXMLResponse] => Array ( [TransactionData] => Array ( [SupplierBHFNumber] => 5601088 [TransactionInfo] => Array ( [InternalClaimNumber] => 2024020657 [ProcessDate] => 20240206 [ProcessTime] => 113457 [TransactionResult] => A [SchemeResult] => N [PaymentAdvice] => P ) ) [HospitalData] => [VendorInfo] => [ProcessReference] => Array ( [MkRef] => 91205094438269 ) [AddressInformation] => Array ( [AddressLine1] => 5 GROOM AV [Suburb] => DISCOVERY [City] => FLORIDA [PostalCode] => 1709 [Province] => GP [ProvName] => GAUTENG ) [TelephoneNumberDetail] => Array ( [CellPhone] => 00000000000814603186 ) [EmployerDetails] => Array ( [0] => Array ( [LastRecordedDate] => 20191003 [EmployerName] => INDO JET CONWAY TRAVEL ) [1] => Array ( [LastRecordedDate] => 20190820 [EmployerName] => WENDY KLAASSEN ) ) [IncomeEstimator] => Array ( [ConsumerNumber] => 416976700 [PredictedIncome] => 06400 ) [Messaging] => ) [@attributes] => Array ( [xsi:schemaLocation] => http://www.medikredit.co.za/MedikreditElectronicClaimProcessing/xml4 C:/Users/RoshanW/ONEDRI
1/Documents/IQPROJ1/ECDOH/XMLV40~1.XSD [xmlns] => http://www.medikredit.co.za/MedikreditElectronicClaimProcessing/xml4 ) ) )Any help or guidance would be appreciate.
Derek
The text was updated successfully, but these errors were encountered: