Ich möchte Kategorien in Magento mit einer Webservice-Anfrage (Soap v2) kisten. Ich benutze Magento 1.4.2.0 und wie gesagt die v2 von Magentos soap api.Magento create category mit soap v2
Wenn ich die Anfrage ich folgende Fehlermeldung als Antwort erhalten senden:
<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>103</faultcode>
<faultstring>Attribute "include_in_menu" is required.</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Das Problem ist, dass der XML-Tag „include_in_menu“ in der Anfrage nicht verfügbar. Wenn ich dieses Tag manuell hinzufüge, wird es ignoriert.
Was kann ich tun, wenn ich nicht Seife v.1 verwenden möchte?
Grüße LStrike
PS: Das ist mein Wunsch:
<?xml version="1.0" encoding="UTF-8"?><?xe.source ../../../Common/Data/login_response.xml#Envelope?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" media-type="text/xml"></xsl:output>
<xsl:template match="/">
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:urn="urn:Magento" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header></soapenv:Header>
<soapenv:Body>
<urn:catalogCategoryCreate soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<sessionId xsi:type="xsd:string">
<xsl:value-of select="soapenv:Envelope/soapenv:Body/urn:loginResponse/loginReturn"></xsl:value-of>
</sessionId>
<parentId xsi:type="xsd:int">
<xsl:value-of select="'3'"></xsl:value-of>
</parentId>
<categoryData xsi:type="urn:catalogCategoryEntityCreate">
<!--You may enter the following 19 items in any order-->
<!--Optional:-->
<name xsi:type="xsd:string">
<xsl:value-of select="'TestKategorie'"></xsl:value-of>
</name>
<!--Optional:-->
<is_active xsi:type="xsd:int">
<xsl:value-of select="'1'"></xsl:value-of>
</is_active>
<!--Optional:-->
<position xsi:type="xsd:int"></position>
<!--Optional:-->
<available_sort_by soapenc:arrayType="xsd:string[2]" xsi:type="ns1:ArrayOfString">
<item xsi:type="xsd:string">name</item>
<item xsi:type="xsd:string">price</item>
</available_sort_by>
<!--Optional:-->
<custom_design xsi:type="xsd:string"></custom_design>
<!--Optional:-->
<custom_design_apply xsi:type="xsd:int"></custom_design_apply>
<!--Optional:-->
<custom_design_from xsi:type="xsd:string"></custom_design_from>
<!--Optional:-->
<custom_design_to xsi:type="xsd:string"></custom_design_to>
<!--Optional:-->
<custom_layout_update xsi:type="xsd:string"></custom_layout_update>
<!--Optional:-->
<default_sort_by xsi:type="xsd:string"><xsl:value-of>name</xsl:value-of></default_sort_by>
<!--Optional:-->
<description xsi:type="xsd:string"></description>
<!--Optional:-->
<display_mode xsi:type="xsd:string"></display_mode>
<!--Optional:-->
<is_anchor xsi:type="xsd:int"></is_anchor>
<!--Optional:-->
<landing_page xsi:type="xsd:int"></landing_page>
<!--Optional:-->
<meta_description xsi:type="xsd:string"></meta_description>
<!--Optional:-->
<meta_keywords xsi:type="xsd:string"></meta_keywords>
<!--Optional:-->
<meta_title xsi:type="xsd:string"></meta_title>
<!--Optional:-->
<page_layout xsi:type="xsd:string"></page_layout>
<!--Optional:-->
<url_key xsi:type="xsd:string"></url_key>
<!-- selbst definierte Felder -->
<include_in_menu xsi:type="xsd:int">1</include_in_menu>
</categoryData>
<storeView xsi:type="xsd:string">
<xsl:value-of select="'default'"></xsl:value-of>
</storeView>
</urn:catalogCategoryCreate>
</soapenv:Body>
</soapenv:Envelope>
</xsl:template>
</xsl:stylesheet>
Wow, das war schnell;) Danke für deine Antwort, ich werde es versuchen. – LStrike
Verwenden Sie besser den 4. Weg und warten Sie in 1-2 Monaten auf die nächste Magento-Version - die Fehlerbehebung für diesen Fehler ist darin enthalten. –
Ich bekomme diesen Fehler in 1.5 immer noch ... Sie behaupten, der Fix war in der nächsten Version? – dmose