magento 1.9 – Creating XML RPC method in customer module

I am creating a rpc method in the local customer module. But I am getting invalid path error. After hours of debugging also I am not able to figure out the missing portion. I was able to create in my local sales module but somehow its failing here.

In local/Mycompany/Customer/etc/api.xml :

<config>
<api>
    <resources>
        <customer translate="title" module="mycompany_customer">
            <model>mycompany_customer/customer_api</model>
            <title>Customer API</title>
            <acl>customer</acl>
            <methods>
                <setCustomerWhatsappStatus translate="title" module="customer">
                    <title>Set whatsapp status for customer</title>
                    <acl>customer/setCustomerWhatsappStatus</acl>
                </setCustomerWhatsappStatus> 
            </methods>
            <faults module="mycompany_sales">
                <data_invalid>
                    <code>103</code>
                    <message>Invalid data given. Details in error message.</message>
                </data_invalid>
            </faults>
        </customer>
    </resources>
    <acl>
        <resources>
            <customer translate="title" module="mycompany_customer">
                <title>Customer</title>
                <sort_order>1</sort_order>
                <setCustomerWhatsappStatus translate="title" module="mycompany_customer">
                    <title>Set whatsapp status for customer</title>
                 </setCustomerWhatsappStatus>
            </customer>
        </resources>
    </acl>
</api>

And in my local/Mycompany/Customer/Model/Customer/Api.php :

<?php

class Mycompany_Customer_Model_Customer_Api extends Mage_Customer_Model_Customer_Api
{
    public function setMethod($phone) {
       Mage::log($phone);
    }
}

And I am calling this method with dbaux_customer_customer.setCustomerWhatsappStatus but get Invalid Path error meaning that its not able to reach the method mentioned.

Please let me know if I missed something.

terminology – HTML elements in XML documents

I’ve been reading the HTML specifciation and I am confused with this line:

The nodes representing HTML elements in the DOM must implement, and
expose to scripts, the interfaces listed for them in the relevant
sections of this specification. This includes HTML elements in XML
documents

What HTML elements have to do with xml documents? Somewhat vague description makes things even more complicated:

To ease migration from HTML to XML, UAs conforming to this
specification will place elements in HTML in the
http://www.w3.org/1999/xhtml namespace, at least for the purposes of
the DOM and CSS. The term “HTML elements” refers to any element in
that namespace, even in XML documents.

What kind of migration? Who is UA? What is this http://www.w3.org/1999/xhtml namespace? How can URL be a namespace? And again, what HTML elements have to do with XML document?

r – read complex xml into dataframe

I am having a difficult time reading an nested xml file into a df. This seems to be an easy task, I am thinking, but somehow I am unable to get that done.

Any help or pointer is much appreciated!

Here is the content of the xml file:

<?xml version="1.0" encoding="UTF-8"?>
<xbrli:xbrl xmlns:r="http://xbrl.sec.gov/ratings/2015-03-31"
xmlns:link="http://www.xbrl.org/2003/linkbase"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xl="http://www.xbrl.org/2003/xl"
xmlns:xbrli="http://www.xbrl.org/2003/instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xbrl.sec.gov/ratings/2015-03-31 http://xbrl.sec.gov/rocr/2015/ratings-2015-03-31.xsd">
<link:schemaRef xlink:type="simple" xlink:href="http://xbrl.sec.gov/rocr/2015/ratings-2015-03-31.xsd"/>
<xbrli:context id="m">
<xbrli:entity>
<xbrli:identifier scheme="http://www.sec.gov/NRSRO"> Standard &amp; Poor's Ratings Services </xbrli:identifier>
</xbrli:entity>
<xbrli:period>
<xbrli:startDate>2011-06-15</xbrli:startDate>
<xbrli:endDate>2015-04-17</xbrli:endDate>
</xbrli:period>
</xbrli:context>
<r:ROCRA xmlns:r="http://xbrl.sec.gov/ratings/2015-03-31" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<r:RAN contextRef="m">Standard &amp; Poor's Ratings Services</r:RAN>
<r:FCD contextRef="m">2020-05-01</r:FCD>
<r:ISD>
<r:SSC contextRef="m">Corporate</r:SSC>
<r:ISSNAME contextRef="m">Discovery, Inc.</r:ISSNAME>
<r:LEI contextRef="m">5493006ZCRFWKF6B1K26</r:LEI>
<r:IND>
<r:OBT contextRef="m">Shelf</r:OBT>
<r:INSTNAME contextRef="m">Shelf Sr Unsecd/Sub Debt 06/18/2012</r:INSTNAME>
<r:INI contextRef="m">YYYYYYY14654</r:INI>
<r:INIS contextRef="m">NRSRO</r:INIS>
<r:INRD>
<r:IP contextRef="m">true</r:IP>
<r:R contextRef="m">BBBprelim</r:R>
<r:RAD contextRef="m">2014-05-29</r:RAD>
<r:OAN contextRef="m">Affirmation</r:OAN>
<r:RT contextRef="m">Senior Unsecured</r:RT>
<r:RST contextRef="m">Local Currency Preliminary LT</r:RST>
<r:RTT contextRef="m"></r:RTT>
</r:INRD>
<r:INRD>
<r:IP contextRef="m">true</r:IP>
<r:R contextRef="m">BBB-prelim</r:R>
<r:RAD contextRef="m">2015-02-23</r:RAD>
<r:OAN contextRef="m">Affirmation</r:OAN>
<r:RT contextRef="m">Subordinated</r:RT>
<r:RST contextRef="m">Local Currency Preliminary LT</r:RST>
<r:RTT contextRef="m"></r:RTT>
</r:INRD>
</r:IND>
<r:IND>
<r:OBT contextRef="m">Shelf</r:OBT>
<r:INSTNAME contextRef="m">Shelf Sub/Sr Unsecd Debt 06/17/2009</r:INSTNAME>
<r:INI contextRef="m">YYYYYYY13102</r:INI>
<r:INIS contextRef="m">NRSRO</r:INIS>
<r:INRD>
<r:IP contextRef="m">true</r:IP>
<r:R contextRef="m">BBB-prelim</r:R>
<r:RAD contextRef="m">2013-01-17</r:RAD>
<r:OAN contextRef="m">Affirmation</r:OAN>
<r:RT contextRef="m">Subordinated</r:RT>
<r:RST contextRef="m">Local Currency Preliminary LT</r:RST>
<r:RTT contextRef="m"></r:RTT>
</r:INRD>
</r:IND>
</r:ISD>
</r:ROCRA>
</xbrli:xbrl>

what I am hoping to get is a df that contains a the following columns:

[startDate,endDate, ISSNAME, LEI, OBT, INSTNAME, INI, INIS, IP, R, RAD, OAN, RT, RST, RTT]

where values in

[startDate,endDate, ISSNAME, LEI, OBT, INSTNAME, INI, INIS] 

are repeat for entries for all the children in each

python – Creating database and reporting tool out of xml files sourced from FTP

I have few questions regarding a reporting tool that I am trying to create. For better understanding let me describe the scenario first.

I am trying to create an automated reporting tool, which would allow me to bulk query a database of inputs which are sourced from the xml files sitting on an FTP server. I am looking at annual data stored in a zip archive containing multiple xml files with incremental updates issued almost everyday. In the first part of my project, I would like to create an automated download and schedule tool which would fetch the smls from the FTP and update the existent inputs depending on the key (e.g. user ID).

Here are the questions that I am struggling to address:

1) As these are separate files, what would be the best way to compile all this in one single file?
(I wanted to do this via SSIS and SQL, however, since SQL can not accommodate database that is bigger than 10 Gb (the current set of files amounts to 15+Gb), I am looking for the best alternative solution.

2) Is there any solution/software that would be able to create a read-only database straight off the XML files? I.e. without having to convert it in any other format? Also (if there is none) what would be the best alternative to SQL, given its limitations?

Many thanks, keep well!

Design inputs for XML based java application

I have a java application which basically has to do 1 thing.
Read a large xml, extract information from it, and send the information to another system but in a different xml format.

Earlier we were using jaxb to convert it to a relational database and then use jaxb again to convert it to the desired xml, but given the increasing size of the XMLs, we have to implement a fragmented reading approach using a combination of sax parsing and jaxb so that the memory usage stays within the accepted limits.
But this has slowed down the application considerably. I know there are always tradeoffs, but could anyone please provide any design inputs on the below:

Would it make sense to

  • use something like an XML database instead of the relational one
  • store the xml as is and instead use apache Lucene or Solr to index it and make it searchable

Any other recommendations are welcome. Please let me know if any more information is needed.

uicomponent – Admin form not pulling through form values when turning collapsible to tabbed form using ui form xml

I overlooked this comment

The source node's value corresponds to a key in the data array returned by the MagentoFrameworkViewElementUiComponentDataProviderDataProviderInterface::getData method of your UI component.

From https://magento.stackexchange.com/a/219692/70343

Sure enough


    /**
     * Get data
     * @return array
     */
    public function getData()
    {
        if (isset($this->loadedData)) {
            return $this->loadedData;
        }
        $items = $this->collection->getItems();
        foreach ($items as $model) {
            $this->loadedData($model->getId()) = $model->getData();
            $this->loadedData($model->getId())('general') = $model->getData();  // key part
        }
        $data = $this->dataPersistor->get('xigen_announce_group');

        if (!empty($data)) {
            $model = $this->collection->getNewEmptyItem();
            $model->setData($data);
            $this->loadedData($model->getId()) = $model->getData();
            $this->loadedData($model->getId())('general') = $model->getData(); // key part
            $this->dataPersistor->clear('xigen_announce_group');
        }

        return $this->loadedData;
    }

Helped to look at this https://github.com/magento/magento2/blob/2.3/app/code/Magento/Customer/Model/Customer/DataProvider.php#L214-L252

I hope this helps someone. Might save them an hour.

How to open .xml files in Cryengine 5.6.2?

I am new at this engine and I am trying to understad its stuff before developing a game(I have good prior experience with unity and UE4) and this got me lots of headaches trying to understand it. My main problem is opening a .xml file, first of all I created a new project using third person shooter template and I started to study C# code and how character was animated using .xml files.

I know that cryengine V uses a thing called flow graph that makes the logic of an object by displaying a graph reading xml text.

What I have tried:

  1. Clicking 1000 billion times the .xml file.
    enter image description here

  2. Trying to open it by importing into the flow chart thing.
    enter image description here

How do I open this .xml file in a flow graph? There is poor documentation about this in docs.cryengine and makes hard for us to understand the logic.

Debugging UPnP XML parsing and processing

I am trying to use UPnP casting in my app and I am testing my results with an instance of Kodi.
Due to an unknown parsing issue with my XML outputs that I couldn’t figure out I wasn’t able to properly implement the cast.

Is there a software that is more adapt for debugging than Kodi when it comes to UPnP XML actions ?

Do I need to organize the links in XML Sitemap?

We use Yoast on the WordPress website and it generates an https://www.website.com/page-sitemap.xml, organized based on the last modified date.

Do we need to have fixed it based on our navigation menu?

basic xml font migration problem

I am trying to figure out how to write a simple migration from an XML source that is in a separate URL.

I have tried several different settings for the selector and so far nothing has worked. Migration and source example are below.

migration:

id: xml_test
label: xml test importer
migration_group: p_migrate
dependencies:
  enforced:
    # List here the name of the module that provided this migration if you want
    # this config to be removed when that module is uninstalled.
    module:
      - p_migrate
source:
  plugin: url
  data_fetcher_plugin: http
  data_parser_plugin: simple_xml
  urls:
    - 'http://localhost:8888/test/source.xml'
  item_selector: /root/row
  fields:
    -
      name: title
      label: title
      selector: root/row/title
process:
  #  nid and vid commented out will allow them to autoincrement. Safe as long
  #    as nothing else is referencing them.
  #  nid: nid
  #  vid: vid
  #  type: type
  title: title

destination:
  plugin: 'entity:node'
  default_bundle: article

Source:



  
    Lorem ipsum
  
  
    Feeds Migrate is awesome!
  

This is the error I am currently getting:
Invalid argument provided for foreach () SimpleXml.php: 79
Invalid argument provided for foreach () SimpleXml.php: 79