ujamii / openimmo Goto Github PK
View Code? Open in Web Editor NEWOpenImmo library
License: GNU General Public License v3.0
OpenImmo library
License: GNU General Public License v3.0
Hello,
when I try to use the example code it gives me a error message.
Code:
$xmlString = file_get_contents('./example/foobar.xml');
/* @var $openImmo \Ujamii\OpenImmo\API\Openimmo */
$openImmo = $this->serializer->deserialize($xmlString, \Ujamii\OpenImmo\API\Openimmo::class, 'xml');
/* @var $anbieter \Ujamii\OpenImmo\API\Anbieter */
foreach ($openImmo->getAnbieter() as $anbieter) {
/* @var $immobilie \Ujamii\OpenImmo\API\Immobilie */
foreach ($anbieter->getImmobilie() as $immobilie) {
echo PHP_EOL . vsprintf('%s %s, %s %s', [
$immobilie->getGeo()->getStrasse(),
$immobilie->getGeo()->getHausnummer(),
$immobilie->getGeo()->getPlz(),
$immobilie->getGeo()->getOrt(),
]);
}
}
Error:
Fatal error: Uncaught Error: Using $this when not in object context in /var/www/vhosts/yfain.de/httpdocs/index.php:11 Stack trace: #0 {main} thrown in
That should be fixed at the example.
Hello,
when I try to use the example code it gives me a error message.
Code:
$xmlString = file_get_contents('./example/foobar.xml');
/* @var $openImmo \Ujamii\OpenImmo\API\Openimmo */
$openImmo = $this->serializer->deserialize($xmlString, \Ujamii\OpenImmo\API\Openimmo::class, 'xml');
/* @var $anbieter \Ujamii\OpenImmo\API\Anbieter */
foreach ($openImmo->getAnbieter() as $anbieter) {
/* @var $immobilie \Ujamii\OpenImmo\API\Immobilie */
foreach ($anbieter->getImmobilie() as $immobilie) {
echo PHP_EOL . vsprintf('%s %s, %s %s', [
$immobilie->getGeo()->getStrasse(),
$immobilie->getGeo()->getHausnummer(),
$immobilie->getGeo()->getPlz(),
$immobilie->getGeo()->getOrt(),
]);
}
}
Error:
Fatal error: Uncaught Error: Using $this when not in object context in /var/www/vhosts/yfain.de/httpdocs/index.php:11 Stack trace: #0 {main} thrown in
That should be fixed at the example.
There is an alpha version of PHP 8.1, so we need to check whether everything still works with this new version. Also the CI pipeline has to be adjusted.
The security fix support for PHP 7.3 will end on 06.12.2021 (see https://www.php.net/supported-versions.php), so we can drop support for this version then which will allow some changes in the api generation process as the PHP 7.4 reflection has some more features than the versions before.
This is great work, thank you!!!
I am trying to get this working with a real-world xml file provided by Immosolve. Unfortunately, I am getting an error with the timestamp:
2020-05-07T11:37:01.321
I removed the .321 and it worked. I think it is the Serializer that is causing this error, but maybe you have an idea how to pass the expected DateTime format to it?
Here's the full line that is causing the error:
uebertragung art="ONLINE" modus="NEW" sendersoftware="xxx" senderversion="3.0" techn_email="xxx" timestamp="2020-05-07T11:37:01.321" umfang="TEIL" version="1.2.7"
For example verwaltung_techn->master has only a method to get its visibility but not its content, the value of the tag. The same goes for the setter.
Similar:
freitexte->objekt_text
freitexte->user_defined_simplefield
preise->aussen_courtage
Hi,
es werden offenbar alle xml-Knoten in alphabetischer Reihenfolge erstellt und zwar egal, in welcher Reihenfolge man die Objekte anlegt und befüllt.
Ich habe gerade festgestellt, dass ein Portal das xml zuerst nicht geparst hat, weil der Knoten Uebertragung erst ganz am am Schluss kommt.
Also dieser hier:
<uebertragung art="OFFLINE" modus="NEW" sendersoftware="xyz" senderversion="1.0" techn_email="[email protected]" timestamp="2022-12-06T20:440:50" umfang="TEIL" version="1.2.7"/>
Es kam diese Fehlermeldung:
Umfang: null
Nachdem die techn_email und auch der Umfang TEIL ganz klar genannt war, aber nicht erkannt wurde, habe ich den Knoten Uebetragung manuell im Code nach ganz oben vor den Anbieter gestellt und es dann mit der ansonsten gleichen Datei noch einmal probiert. Schließlich wurde das xml mit dieser Reihenfolge-Änderung wie folgt geparst:
Zumindest dieses Portal scheint also den Knoten Uebertragung ganz am Anfang nach <openimmo>
(also noch vor <anbieter>
) haben zu wollen.
Daher meine Frage...
Gibt es eine Möglichkeit die Reihenfolge zu beeinflussen, bzw. das automatische alphabetische Sortieren abzuschalten?
I don't see any news or specifications on this. Any news here?
Hello, the composer package not work. After install the Package with composer i not able to load an Xml File.
I get the Following error:
PHP Fatal error: Uncaught Error: Call to a member function deserialize()
I loaded all necessary Scripts via vendor/autoload.php
In version 3.30.0 the serializer made the annotations optional in favor of attributes.
Since the API in this project still uses annotations, this change makes this project not work by default. You have to configure an annotation reader manually now. Currently looking into how to do that. (see comment)
Considering the latest changes in the PHP ecosystem the switch to attributes seems to be overdue.
I have used the library to generate Openimmo files for Willhaben and Immowelt integration and both platforms are complaining about the XML not being valid due to tags not being well ordered.
Obviously this is a decoding issue IMO because XML should be decoded into a map and accessed based on key, but both of the platforms mentioned above require the tags to follow the Openimmo exact ordering (as described in docs).
Is this issue known for the team or is anyone else having the same issue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.