Giter VIP home page Giter VIP logo

openimmo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

openimmo's Issues

Error in 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.

Example throws error

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.

Check support for PHP 8.1

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.

Invalid datetime 2020-05-07T11:37:01.321

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"

xml Reihenfolge

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

  • Tech. Email: null
  • AnbieterID[ 1xyz / none ] wurde gefunden...
  • ERROR: Process konnte nicht ausgefuehrt werden!
  • XML: ** Process konnte nicht registriert werden! **

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?

Autoload Classes not Work

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

Switch to PHP Attributes

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.

XML tags are alphabetically ordered and this is causing validation issues

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.