抱歉我的英文.我想在Yii2上重建我的旧肥皂服务器.
我无法格式化与旧服务响应相同的元素名称.
我该怎么做?
旧的服务响应是
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://api.xxx.com">
<SOAP-ENV:Body>
<ns1:GetAllColorsResponse>
<describedColorArray>
<DescribedColor>
<id>6</id>
<Name>beyaz</Name>
<HTMLColorCode>#000000</HTMLColorCode>
</DescribedColor>
<DescribedColor>
<id>2</id>
<Name>k?rm?z?</Name>
<HTMLColorCode>#FF0000</HTMLColorCode>
</DescribedColor>
<DescribedColor>
<id>4</id>
<Name>mavi</Name>
<HTMLColorCode>#0000FF</HTMLColorCode>
</DescribedColor>
<DescribedColor>
<id>1</id>
<Name>sar?</Name>
<HTMLColorCode>#909000</HTMLColorCode>
</DescribedColor>
<DescribedColor>
<id>3</id>
<Name>turuncu</Name>
<HTMLColorCode>#FF9900</HTMLColorCode>
</DescribedColor>
<DescribedColor>
<id>5</id>
<Name>ye?il</Name>
<HTMLColorCode>#009000</HTMLColorCode>
</DescribedColor>
</describedColorArray>
</ns1:GetAllColorsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Run Code Online (Sandbox Code Playgroud)
Yii2肥皂服务的回应是
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://newapi.xxx.com/api/GetAllColors?ws=1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:GetAllColorsResponse>
<return xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">describedColorArray</key>
<value xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">DescribedColor</key>
<value SOAP-ENC:arrayType="ns2:Map[6]" xsi:type="SOAP-ENC:Array">
<item xsi:type="ns2:Map">
<item>
<key xsi:type="xsd:string">id</key>
<value xsi:type="xsd:int">6</value>
</item>
<item>
<key xsi:type="xsd:string">name</key>
<value …Run Code Online (Sandbox Code Playgroud) 我配置了MySQL主从复制.
如何配置Yii2 Active Record以在主DB上插入,更新和删除查询以及在从DB上读取查询?