|
v8: magento & SOAP | ☑ | ||
---|---|---|---|---|
0
Kamik-7
19.02.14
✎
16:15
|
День добрый,
как уже было рассмотрено тут v8: 1C8 + Magento CE = проблемы с SOAP, 1с не ипортирует wsdl-схему магенто из-за namespace="http://schemas.xmlsoap.org/soap/encoding/". Закоментировать то его можно, но функции в этом случае не работают. Магенто возвращает ошибку. (проверено на пхп). Собственно, что делать? :) в магенто еще в куче файлов встречается этот namespace. Пилить магенто единственный вариант? Или все-таки как-то можно обойти? (платформа 8.2.13.205) |
|||
1
shachneff
19.02.14
✎
16:18
|
(1) Чтобы это сделать, я пилил Magneto. Некрасиво, но работает.
2) Выходит версия 1С 8.3.5, в которой http://v8.1c.ru/o7/201312http/index.htm Я думаю, ЭТО очень облегчит интеграцию. |
|||
2
shachneff
19.02.14
✎
16:20
|
(1) ах да, работу с SOAP через объект HTTPСоединение никто не отменял.
|
|||
3
Kamik-7
19.02.14
✎
16:33
|
то есть везде закомментировал namespace="http://schemas.xmlsoap.org/soap/encoding/" ?
|
|||
4
Kamik-7
19.02.14
✎
18:43
|
мда, че то я запутался.
Алексей, пожалуйста, можете приветси пример, как вы создаете фильтр, ну, например для salesOrderList. я тут туплю где-то сильно :) filters = Factory.Create(Factory.Тип("urn:Magento","filters")); associativeArray = Factory.Create(Factory.Тип("urn:Magento","associativeArray")); associativeEntityType = Factory.Тип("urn:Magento","associativeEntity"); associativeEntity = Factory.Create(associativeEntityType); associativeEntity.key = "status"; associativeEntity.value = "closed"; |
|||
5
Kamik-7
19.02.14
✎
19:38
|
(4) потом должно быть что-то вроде
associativeArray.Add(associativeEntity); filters.filter = associativeArray; OrdersList = ServiceMagento.salesOrderList(SessionId, filters); |
|||
6
Kamik-7
19.02.14
✎
20:46
|
(3) в общем просто закомментировать не получается. Имеем ошибку в описании типов arrayType. Неужели никто через SOAP с магенто не работал?
|
|||
7
Serginio1
19.02.14
✎
21:06
|
||||
8
Kamik-7
19.02.14
✎
23:55
|
(7) не понял. изменить wsdl, как ты написал?
|
|||
9
Serginio1
20.02.14
✎
00:05
|
(8) Угу
|
|||
10
Kamik-7
20.02.14
✎
00:21
|
(9) тогда я получаю в ответе уже при логине
SOAP-ERROR: Parsing Schema: unexpected <import> in schema |
|||
11
Kamik-7
20.02.14
✎
00:30
|
||||
12
Kamik-7
20.02.14
✎
13:42
|
В общем, нужна помощь. Не могу побороть. За вознаграждение :). Скайп koch.technikexpert
|
|||
13
Serginio1
20.02.14
✎
18:43
|
Ты сохрани файл и удали из импотра
schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" Что бы было <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> |
|||
14
Kamik-7
20.02.14
✎
19:13
|
и куда этот файл потом? точка с запятой нужна там?
|
|||
15
Kamik-7
21.02.14
✎
01:57
|
(13) один фиг ошибка, только теперь даже распарсить ответ не может.
|
|||
16
Kamik-7
21.02.14
✎
02:06
|
Определения = New WSОпределения("\\WIN-SERVER\pub\index.xml");
ServiceMagento=Новый WSПрокси(Определения, "urn:Magento", "MagentoService", "Mage_Api_Model_Server_V2_HandlerPort" ); //ServiceMagento=WSReferences.Magento.СоздатьWSПрокси("urn:Magento", "MagentoService", "Mage_Api_Model_Server_V2_HandlerPort" ); //Login SessionId = ServiceMagento.login("test","123456"); Ошибка при вызове метода контекста (login): Ошибка вызова операции сервиса: {urn:Magento}:MagentoService:login(): Неизвестная ошибка. Ошибка разбора XML: - [2,1] Фатальная ошибка: Extra content at the end of the document : Ошибка разбора XML: - [2,1] |
|||
17
Kamik-7
21.02.14
✎
11:23
|
вот код wsdl
<?xml version="1.0" encoding="UTF-8"?> <definitions xmlns:typens="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="Magento" targetNamespace="urn:Magento"> <types> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <complexType name="FixedArray"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/> </restriction> </complexContent> </complexType> <complexType name="associativeEntity"> <all> <element name="key" type="xsd:string"/> <element name="value" type="xsd:string"/> </all> </complexType> <complexType name="associativeArray"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:associativeEntity[]"/> </restriction> </complexContent> </complexType> <complexType name="associativeMultiEntity"> <all> <element name="key" type="xsd:string"/> <element name="value" type="typens:ArrayOfString"/> </all> </complexType> <complexType name="associativeMultiArray"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:associativeMultiEntity[]"/> </restriction> </complexContent> </complexType> <complexType name="filters"> <all> <element name="filter" type="typens:associativeArray" minOccurs="0"/> <element name="complex_filter" type="typens:complexFilterArray" minOccurs="0"/> </all> </complexType> <complexType name="complexFilterArray"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:complexFilter[]"/> </restriction> </complexContent> </complexType> <complexType name="complexFilter"> <all> <element name="key" type="xsd:string"/> <element name="value" type="typens:associativeEntity"/> </all> </complexType> <complexType name="ArrayOfString"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/> </restriction> </complexContent> </complexType> <complexType name="ArrayOfInt"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/> </restriction> </complexContent> </complexType> <complexType name="apiMethodEntity"> <all> <element name="title" type="xsd:string"/> <element name="path" type="xsd:string"/> <element name="name" type="xsd:string"/> <element name="aliases" type="typens:ArrayOfString"/> </all> </complexType> <complexType name="ArrayOfApiMethods"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:apiMethodEntity[]"/> </restriction> </complexContent> </complexType> <complexType name="apiEntity"> <all> <element name="title" type="xsd:string"/> <element name="name" type="xsd:string"/> <element name="aliases" type="typens:ArrayOfString"/> <element name="methods" type="typens:ArrayOfApiMethods"/> </all> </complexType> <complexType name="ArrayOfApis"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:apiEntity[]"/> </restriction> </complexContent> </complexType> <complexType name="existsFaltureEntity"> <all> <element name="code" type="xsd:string"/> <element name="message" type="xsd:string"/> </all> </complexType> <complexType name="ArrayOfExistsFaltures"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="typens:existsFaltureEntity[]"/> </restriction> </complexContent> </complexType> <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <complexType name="storeEntity"><all><element name="store_id" type="xsd:int"/><element name="code" type="xsd:string"/><element name="website_id" type="xsd:int"/><element name="group_id" type="xsd:int"/><element name="name" type="xsd:string"/><element name="sort_order" type="xsd:int"/><element name="is_active" type="xsd:int"/></all></complexType><complexType name="storeEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:storeEntity[]"/></restriction></complexContent></complexType><complexType name="magentoInfoEntity"><all><element name="magento_version" type="xsd:string"/><element name="magento_edition" type="xsd:string"/></all></complexType><complexType name="directoryCountryEntity"><all><element name="country_id" type="xsd:string"/><element name="iso2_code" type="xsd:string"/><element name="iso3_code" type="xsd:string"/><element name="name" type="xsd:string"/></all></complexType><complexType name="directoryCountryEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:directoryCountryEntity[]"/></restriction></complexContent></complexType><complexType name="directoryRegionEntity"><all><element name="region_id" type="xsd:string"/><element name="code" type="xsd:string"/><element name="name" type="xsd:string"/></all></complexType><complexType name="directoryRegionEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:directoryRegionEntity[]"/></restriction></complexContent></complexType><complexType name="customerCustomerEntityToCreate"><all><element name="customer_id" type="xsd:int" minOccurs="0"/><element name="email" type="xsd:string" minOccurs="0"/><element name="firstname" type="xsd:string" minOccurs="0"/><element name="lastname" type="xsd:string" minOccurs="0"/><element name="middlename" type="xsd:string" minOccurs="0"/><element name="password" type="xsd:string" minOccurs="0"/><element name="website_id" type="xsd:int" minOccurs="0"/><element name="store_id" type="xsd:int" minOccurs="0"/><element name="group_id" type="xsd:int" minOccurs="0"/><element name="prefix" type="xsd:string" minOccurs="0"/><element name="suffix" type="xsd:string" minOccurs="0"/><element name="dob" type="xsd:string" minOccurs="0"/><element name="taxvat" type="xsd:string" minOccurs="0"/><element name="gender" type="xsd:int" minOccurs="0"/></all></complexType><complexType name="customerCustomerEntity"><all><element name="customer_id" type="xsd:int" minOccurs="0"/><element name="created_at" type="xsd:string" minOccurs="0"/><element name="updated_at" type="xsd:string" minOccurs="0"/><element name="increment_id" type="xsd:string" minOccurs="0"/><element name="store_id" type="xsd:int" minOccurs="0"/><element name="website_id" type="xsd:int" minOccurs="0"/><element name="created_in" type="xsd:string" minOccurs="0"/><element name="email" type="xsd:string" minOccurs="0"/><element name="firstname" type="xsd:string" minOccurs="0"/><element name="middlename" type="xsd:string" minOccurs="0"/><element name="lastname" type="xsd:string" minOccurs="0"/><element name="group_id" type="xsd:int" minOccurs="0"/><element name="prefix" type="xsd:string" minOccurs="0"/><element name="suffix" type="xsd:string" minOccurs="0"/><element name="dob" type="xsd:string" minOccurs="0"/><element name="taxvat" type="xsd:string" minOccurs="0"/><element name="confirmation" type="xsd:boolean" minOccurs="0"/><element name="password_hash" type="xsd:string" minOccurs="0"/></all></complexType><complexType name="customerCustomerEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:customerCustomerEntity[]"/></restriction></complexContent></complexType><complexType name="customerGroupEntity"><all><element name="customer_group_id" type="xsd:int"/><element name="customer_group_code" type="xsd:string"/></all></complexType><complexType name="customerGroupEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:customerGroupEntity[]"/></restriction></complexContent></complexType><complexType name="customerAddressEntityCreate"><all><element name="city" type="xsd:string" minOccurs="0"/><element name="company" type="xsd:string" minOccurs="0"/><element name="country_id" type="xsd:string" minOccurs="0"/><element name="fax" type="xsd:string" minOccurs="0"/><element name="firstname" type="xsd:string" minOccurs="0"/><element name="lastname" type="xsd:string" minOccurs="0"/><element name="middlename" type="xsd:string" minOccurs="0"/><element name="postcode" type="xsd:string" minOccurs="0"/><element name="prefix" type="xsd:string" minOccurs="0"/><element name="region_id" type="xsd:int" minOccurs="0"/><element name="region" type="xsd:string" minOccurs="0"/><element name="street" type="typens:ArrayOfString" minOccurs="0"/><element name="suffix" type="xsd:string" minOccurs="0"/><element name="telephone" type="xsd:string" minOccurs="0"/><element name="is_default_billing" type="xsd:boolean" minOccurs="0"/><element name="is_default_shipping" type="xsd:boolean" minOccurs="0"/></all></complexType><complexType name="customerAddressEntityItem"><all><element name="customer_address_id" type="xsd:int" minOccurs="0"/><element name="created_at" type="xsd:string" minOccurs="0"/><element name="updated_at" type="xsd:string" minOccurs="0"/><element name="increment_id" type="xsd:string" minOccurs="0"/><element name="city" type="xsd:string" minOccurs="0"/><element name="company" type="xsd:string" minOccurs="0"/><element name="country_id" type="xsd:string" minOccurs="0"/><element name="fax" type="xsd:string" minOccurs="0"/><element name="firstname" type="xsd:string" minOccurs="0"/><element name="lastname" type="xsd:string" minOccurs="0"/><element name="middlename" type="xsd:string" minOccurs="0"/><element name="postcode" type="xsd:string" minOccurs="0"/><element name="prefix" type="xsd:string" minOccurs="0"/><element name="region" type="xsd:string" minOccurs="0"/><element name="region_id" type="xsd:int" minOccurs="0"/><element name="street" type="xsd:string" minOccurs="0"/><element name="suffix" type="xsd:string" minOccurs="0"/><element name="telephone" type="xsd:string" minOccurs="0"/><element name="is_default_billing" type="xsd:boolean" minOccurs="0"/><element name="is_default_shipping" type="xsd:boolean" minOccurs="0"/></all></complexType><complexType name="customerAddressEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:customerAddressEntityItem[]"/></restriction></complexContent></complexType><complexType name="catalogProductEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductAdditionalAttributesEntity"><all><element name="multi_data" type="typens:associativeMultiArray" minOccurs="0"/><element name="single_data" type="typens:associativeArray" minOccurs="0"/></all></complexType><complexType name="catalogProductEntity"><all><element name="product_id" type="xsd:string"/><element name="sku" type="xsd:string"/><element name="name" type="xsd:string"/><element name="set" type="xsd:string"/><element name="type" type="xsd:string"/><element name="category_ids" type="typens:ArrayOfString"/><element name="website_ids" type="typens:ArrayOfString"/></all></complexType><complexType name="catalogProductRequestAttributes"><all><element name="attributes" type="typens:ArrayOfString" minOccurs="0"/><element name="additional_attributes" type="typens:ArrayOfString" minOccurs="0"/></all></complexType><complexType name="catalogProductReturnEntity"><all><element name="product_id" type="xsd:string" minOccurs="0"/><element name="sku" type="xsd:string" minOccurs="0"/><element name="set" type="xsd:string" minOccurs="0"/><element name="type" type="xsd:string" minOccurs="0"/><element name="categories" type="typens:ArrayOfString" minOccurs="0"/><element name="websites" type="typens:ArrayOfString" minOccurs="0"/><element name="created_at" type="xsd:string" minOccurs="0"/><element name="updated_at" type="xsd:string" minOccurs="0"/><element name="type_id" type="xsd:string" minOccurs="0"/><element name="name" type="xsd:string" minOccurs="0"/><element name="description" type="xsd:string" minOccurs="0"/><element name="short_description" type="xsd:string" minOccurs="0"/><element name="weight" type="xsd:string" minOccurs="0"/><element name="status" type="xsd:string" minOccurs="0"/><element name="url_key" type="xsd:string" minOccurs="0"/><element name="url_path" type="xsd:string" minOccurs="0"/><element name="visibility" type="xsd:string" minOccurs="0"/><element name="category_ids" type="typens:ArrayOfString" minOccurs="0"/><element name="website_ids" type="typens:ArrayOfString" minOccurs="0"/><element name="has_options" type="xsd:string" minOccurs="0"/><element name="gift_message_available" type="xsd:string" minOccurs="0"/><element name="price" type="xsd:string" minOccurs="0"/><element name="special_price" type="xsd:string" minOccurs="0"/><element name="special_from_date" type="xsd:string" minOccurs="0"/><element name="special_to_date" type="xsd:string" minOccurs="0"/><element name="tax_class_id" type="xsd:string" minOccurs="0"/><element name="tier_price" type="typens:catalogProductTierPriceEntityArray" minOccurs="0"/><element name="meta_title" type="xsd:string" minOccurs="0"/><element name="meta_keyword" type="xsd:string" minOccurs="0"/><element name="meta_description" type="xsd:string" minOccurs="0"/><element name="custom_design" type="xsd:string" minOccurs="0"/><element name="custom_layout_update" type="xsd:string" minOccurs="0"/><element name="options_container" type="xsd:string" minOccurs="0"/><element name="additional_attributes" type="typens:associativeArray" minOccurs="0"/></all></complexType><complexType name="catalogProductCreateEntity"><all><element name="categories" type="typens:ArrayOfString" minOccurs="0"/><element name="websites" type="typens:ArrayOfString" minOccurs="0"/><element name="name" type="xsd:string" minOccurs="0"/><element name="description" type="xsd:string" minOccurs="0"/><element name="short_description" type="xsd:string" minOccurs="0"/><element name="weight" type="xsd:string" minOccurs="0"/><element name="status" type="xsd:string" minOccurs="0"/><element name="url_key" type="xsd:string" minOccurs="0"/><element name="url_path" type="xsd:string" minOccurs="0"/><element name="visibility" type="xsd:string" minOccurs="0"/><element name="category_ids" type="typens:ArrayOfString" minOccurs="0"/><element name="website_ids" type="typens:ArrayOfString" minOccurs="0"/><element name="has_options" type="xsd:string" minOccurs="0"/><element name="gift_message_available" type="xsd:string" minOccurs="0"/><element name="price" type="xsd:string" minOccurs="0"/><element name="special_price" type="xsd:string" minOccurs="0"/><element name="special_from_date" type="xsd:string" minOccurs="0"/><element name="special_to_date" type="xsd:string" minOccurs="0"/><element name="tax_class_id" type="xsd:string" minOccurs="0"/><element name="tier_price" type="typens:catalogProductTierPriceEntityArray" minOccurs="0"/><element name="meta_title" type="xsd:string" minOccurs="0"/><element name="meta_keyword" type="xsd:string" minOccurs="0"/><element name="meta_description" type="xsd:string" minOccurs="0"/><element name="custom_design" type="xsd:string" minOccurs="0"/><element name="custom_layout_update" type="xsd:string" minOccurs="0"/><element name="options_container" type="xsd:string" minOccurs="0"/><element name="additional_attributes" type="typens:catalogProductAdditionalAttributesEntity" minOccurs="0"/><element name="stock_data" type="typens:catalogInventoryStockItemUpdateEntity" minOccurs="0"/></all></complexType><complexType name="catalogProductCreateEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductCreateEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductAttributeSetEntity"><all><element name="set_id" type="xsd:int" minOccurs="0"/><element name="name" type="xsd:string" minOccurs="0"/></all></complexType><complexType name="catalogProductAttributeSetEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductAttributeSetEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductTypeEntity"><all><element name="type" type="xsd:string" minOccurs="0"/><element name="label" type="xsd:string" minOccurs="0"/></all></complexType><complexType name="catalogProductTypeEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductTypeEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductTierPriceEntity"><all><element name="customer_group_id" type="xsd:string" minOccurs="0"/><element name="website" type="xsd:string" minOccurs="0"/><element name="qty" type="xsd:int" minOccurs="0"/><element name="price" type="xsd:double" minOccurs="0"/></all></complexType><complexType name="catalogProductTierPriceEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductTierPriceEntity[]"/></restriction></complexContent></complexType><complexType name="ArrayOfCatalogCategoryEntities"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogCategoryEntity[]"/></restriction></complexContent></complexType><complexType name="catalogCategoryEntity"><all><element name="category_id" type="xsd:int"/><element name="parent_id" type="xsd:int"/><element name="name" type="xsd:string"/><element name="is_active" type="xsd:int"/><element name="position" type="xsd:int"/><element name="level" type="xsd:int"/><element name="children" type="typens:ArrayOfCatalogCategoryEntities"/></all></complexType><complexType name="catalogCategoryEntityNoChildren"><all><element name="category_id" type="xsd:int"/><element name="parent_id" type="xsd:int"/><element name="name" type="xsd:string"/><element name="is_active" type="xsd:int"/><element name="position" type="xsd:int"/><element name="level" type="xsd:int"/></all></complexType><complexType name="ArrayOfCatalogCategoryEntitiesNoChildren"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogCategoryEntityNoChildren[]"/></restriction></complexContent></complexType><complexType name="catalogCategoryTree"><all><element name="category_id" type="xsd:int"/><element name="parent_id" type="xsd:int"/><element name="name" type="xsd:string"/><element name="position" type="xsd:int"/><element name="level" type="xsd:int"/><element name="children" type="typens:ArrayOfCatalogCategoryEntities"/></all></complexType><complexType name="catalogCategoryEntityCreate"><all><element name="name" type="xsd:string" minOccurs="0"/><element name="is_active" type="xsd:int" minOccurs="0"/><element name="position" type="xsd:int" minOccurs="0"/><element name="available_sort_by" type="typens:ArrayOfString" minOccurs="0"/><element name="custom_design" type="xsd:string" minOccurs="0"/><element name="custom_design_apply" type="xsd:int" minOccurs="0"/><element name="custom_design_from" type="xsd:string" minOccurs="0"/><element name="custom_design_to" type="xsd:string" minOccurs="0"/><element name="custom_layout_update" type="xsd:string" minOccurs="0"/><element name="default_sort_by" type="xsd:string" minOccurs="0"/><element name="description" type="xsd:string" minOccurs="0"/><element name="display_mode" type="xsd:string" minOccurs="0"/><element name="is_anchor" type="xsd:int" minOccurs="0"/><element name="landing_page" type="xsd:int" minOccurs="0"/><element name="meta_description" type="xsd:string" minOccurs="0"/><element name="meta_keywords" type="xsd:string" minOccurs="0"/><element name="meta_title" type="xsd:string" minOccurs="0"/><element name="page_layout" type="xsd:string" minOccurs="0"/><element name="url_key" type="xsd:string" minOccurs="0"/><element name="include_in_menu" type="xsd:int" minOccurs="0"/></all></complexType><complexType name="catalogCategoryInfo"><all><element name="category_id" type="xsd:string"/><element name="is_active" type="xsd:int"/><element name="position" type="xsd:string"/><element name="level" type="xsd:string"/><element name="parent_id" type="xsd:string"/><element name="all_children" type="xsd:string"/><element name="children" type="xsd:string"/><element name="created_at" type="xsd:string" minOccurs="0"/><element name="updated_at" type="xsd:string" minOccurs="0"/><element name="name" type="xsd:string" minOccurs="0"/><element name="url_key" type="xsd:string" minOccurs="0"/><element name="description" type="xsd:string" minOccurs="0"/><element name="meta_title" type="xsd:string" minOccurs="0"/><element name="meta_keywords" type="xsd:string" minOccurs="0"/><element name="meta_description" type="xsd:string" minOccurs="0"/><element name="path" type="xsd:string" minOccurs="0"/><element name="url_path" type="xsd:string" minOccurs="0"/><element name="children_count" type="xsd:int" minOccurs="0"/><element name="display_mode" type="xsd:string" minOccurs="0"/><element name="is_anchor" type="xsd:int" minOccurs="0"/><element name="available_sort_by" type="typens:ArrayOfString" minOccurs="0"/><element name="custom_design" type="xsd:string" minOccurs="0"/><element name="custom_design_apply" type="xsd:string" minOccurs="0"/><element name="custom_design_from" type="xsd:string" minOccurs="0"/><element name="custom_design_to" type="xsd:string" minOccurs="0"/><element name="page_layout" type="xsd:string" minOccurs="0"/><element name="custom_layout_update" type="xsd:string" minOccurs="0"/><element name="default_sort_by" type="xsd:string" minOccurs="0"/><element name="landing_page" type="xsd:int" minOccurs="0"/></all></complexType><complexType name="catalogAssignedProduct"><all><element name="product_id" type="xsd:int"/><element name="type" type="xsd:string"/><element name="set" type="xsd:int"/><element name="sku" type="xsd:string"/><element name="position" type="xsd:int"/></all></complexType><complexType name="catalogAssignedProductArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogAssignedProduct[]"/></restriction></complexContent></complexType><complexType name="catalogAttributeEntity"><all><element name="attribute_id" type="xsd:int" minOccurs="0"/><element name="code" type="xsd:string" minOccurs="0"/><element name="type" type="xsd:string" minOccurs="0"/><element name="required" type="xsd:string" minOccurs="0"/><element name="scope" type="xsd:string" minOccurs="0"/></all></complexType><complexType name="catalogAttributeEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogAttributeEntity[]"/></restriction></complexContent></complexType><complexType name="catalogAttributeOptionEntity"><all><element name="label" type="xsd:string"/><element name="value" type="xsd:string"/></all></complexType><complexType name="catalogAttributeOptionEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogAttributeOptionEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductImageEntity"><all><element name="file" type="xsd:string"/><element name="label" type="xsd:string"/><element name="position" type="xsd:string"/><element name="exclude" type="xsd:string"/><element name="url" type="xsd:string"/><element name="types" type="typens:ArrayOfString"/></all></complexType><complexType name="catalogProductImageEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductImageEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductAttributeMediaTypeEntity"><all><element name="code" type="xsd:string"/><element name="scope" type="xsd:string"/></all></complexType><complexType name="catalogProductAttributeMediaTypeEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductAttributeMediaTypeEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductImageFileEntity"><all><element name="content" type="xsd:string"/><element name="mime" type="xsd:string"/><element name="name" type="xsd:string" minOccurs="0"/></all></complexType><complexType name="catalogProductAttributeMediaCreateEntity"><all><element name="file" type="typens:catalogProductImageFileEntity" minOccurs="0"/><element name="label" type="xsd:string" minOccurs="0"/><element name="position" type="xsd:string" minOccurs="0"/><element name="types" type="typens:ArrayOfString" minOccurs="0"/><element name="exclude" type="xsd:string" minOccurs="0"/><element name="remove" type="xsd:string" minOccurs="0"/></all></complexType><complexType name="catalogProductLinkEntity"><all><element name="product_id" type="xsd:string" minOccurs="0"/><element name="type" type="xsd:string" minOccurs="0"/><element name="set" type="xsd:string" minOccurs="0"/><element name="sku" type="xsd:string" minOccurs="0"/><element name="position" type="xsd:string" minOccurs="0"/><element name="qty" type="xsd:string" minOccurs="0"/></all></complexType><complexType name="catalogProductLinkEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductLinkEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductLinkAttributeEntity"><all><element name="code" type="xsd:string" minOccurs="0"/><element name="type" type="xsd:string" minOccurs="0"/></all></complexType><complexType name="catalogProductLinkAttributeEntityArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductLinkAttributeEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductAttributeFrontendLabelEntity"><all><element name="store_id" type="xsd:string"/><element name="label" type="xsd:string"/></all></complexType><complexType name="catalogProductAttributeFrontendLabelArray"><complexContent><restriction base="soapenc:Array"><attribute ref="soapenc:arrayType" wsdl:arrayType="typens:catalogProductAttributeFrontendLabelEntity[]"/></restriction></complexContent></complexType><complexType name="catalogProductAttributeEntityToCreate"><all><element name="attribute_code" type="xsd:string" minOccurs="1" maxOccurs="1"/><element name="frontend_input" type="xsd:string" minOccurs="1" maxOccurs="1"/><element name="scope" type="xsd:string" minOccurs="0"/><element name="default_value" type="xsd:string" minOccurs="0"/><element name="is_unique" type="xsd:int" minOccurs="0"/><element name="is_required" type="xsd:int" minOccurs="0"/><element name="apply_to" type="typens:ArrayOfString" minOccurs="0"/><element name="is_configurable" type="xsd:int" minOccurs="0"/><element name="is_searchable" type="xsd:int" minOccurs="0"/><element name="is_visible_in_advanced_search" type="xsd:int" minOccurs="0"/><element name="is_comparable" type="xsd:int" minOccurs="0"/><element name="is_used_for_promo_rules" type="xsd:int" minOccurs="0"/><element name="is_visible_on_front" type="xsd:int" minOccurs="0"/><element name="used_in_product_listing" type="xsd:int" minOccurs="0"/><element name="additional_fields" type="typens:associativeArray" minOccurs="0"/><element name="frontend_label" type="typens:catalogProductAttributeFrontendLabelArray" minOccurs="1"/></all></complexType><complexType name="catalogProductAttributeEntityToUpdate"><all><element name="scope" type="xsd:string" minOccurs="0"/><element name="default_value" type="xsd:string" minOccurs="0"/><element name="i |
|||
18
Kamik-7
21.02.14
✎
11:27
|
||||
19
Kamik-7
21.02.14
✎
12:43
|
сниффер показал в ответе "Fatal error: SOAP-ERROR: Parsing Schema: unexpected <import> in schema". Блин, че я не так делаю.
|
|||
20
Kamik-7
21.02.14
✎
13:47
|
так. с этой проблемой разобрался. на сервере просто забыл вернуть в исходное сотояние wsdl
|
|||
21
Kamik-7
21.02.14
✎
13:51
|
разжуйте мне как создать теперь запрос в 1с типа
filter = array('filter' => array(array('key' => 'status', 'value' => 'closed'))) |
|||
22
Serginio1
21.02.14
✎
14:51
|
||||
23
Serginio1
21.02.14
✎
14:59
|
Или типа такого
WebСервис=ПолучитьПроксиМагнето(); Фабрика=WebСервис.ФабрикаXDTO; ПространствоИмен="urn:Magento"; ТекущийМассивТип =Фабрика.Тип(ПространствоИмен, "FixedArray"); ТекущийМассив = Фабрика.Создать(ТекущийМассивТип); СтрокаXDTO=Фабрика.Создать(Фабрика.Тип("http://www.w3.org/2001/XMLSchema", "string"), "Значение Элемента"); ТекущийМассив.Добавить(ФормаXML.Элемент, "urn:Magento", "Array",СтрокаXDTO); СтрокаXDTO=Фабрика.Создать(Фабрика.Тип("http://www.w3.org/2001/XMLSchema", "decimal"), 3.14); ТекущийМассив.Добавить(ФормаXML.Элемент, "urn:Magento", "Array",СтрокаXDTO); |
|||
24
Kamik-7
21.02.14
✎
17:45
|
спасибо. но не получается
запрос должен быть такого вида <SOAP-ENV:Body> <ns1:salesOrderList> <sessionId xsi:type="xsd:string">abbc417256a3ffb93d130a77a2fd3665</sessionId> <filters xsi:type="ns1:filters"> <filter SOAP-ENC:arrayType="ns1:associativeEntity[2]" xsi:type="ns1:associativeArray"> <item xsi:type="ns1:associativeEntity"> <key xsi:type="xsd:string">status</key> <value xsi:type="xsd:string">pending</value> </item> <item xsi:type="ns1:associativeEntity"> <key xsi:type="xsd:string">created_at</key> <value xsi:type="xsd:string">2011-11-29 15:41:11</value> </item> </filter> </filters> </ns1:salesOrderList> </SOAP-ENV:Body> я так понимаю, что мне нужно как-то из FixedArray получить associativeEntity? Можно для особо тупых на этом примере показать? :) |
|||
25
Kamik-7
21.02.14
✎
18:47
|
(23) Спасибо, напрвил на путь истинный.
в общем FixedArray тут ни при чем. Работает и без него: Try Definitions = New WSОпределения("\\WIN-SERVER\pub\index.xml"); ServiceMagento = Definitions.Services[0]; ProxyMagento = New WSProxy(Definitions, ServiceMagento.NamespaceURI, ServiceMagento.Name, ServiceMagento.Endpoints[0].Name); Factory = ProxyMagento.XDTOFactory; //Login SessionId = ProxyMagento.login("user","password"); Except Message(ErrorDescription()); Return; EndTry; Try filters = Factory.Create(Factory.Type(ServiceMagento.NamespaceURI,"filters")); associativeArrayType = Factory.Type(ServiceMagento.NamespaceURI,"associativeArray"); associativeArray = Factory.Create(associativeArrayType); associativeEntityType = Factory.Type(ServiceMagento.NamespaceURI,"associativeEntity"); associativeEntity = Factory.Create(associativeEntityType); associativeEntity.key = "status"; associativeEntity.value = "pending"; associativeArray.Add(XMLForm.Element, ServiceMagento.NamespaceURI, "item",associativeEntity); filters.filter = associativeArray; OrdersList = ProxyMagento.salesOrderList(SessionId, filters); Except Message(ProxyMagento.globalFaults(SessionId)); Message(ErrorDescription()); Return; EndTry; |
Форум | Правила | Описание | Объявления | Секции | Поиск | Книга знаний | Вики-миста |