|
Помогите с WEB сервисом | ☑ | ||
---|---|---|---|---|
0
oleg_prg
01.08.13
✎
19:48
|
Добрый вечер, помогите пожалуйста
Есть WEB сервис http://1.1.1.1/VD/ws/WebCatalog.1cws?wsdl В коде делаю так Прокси = WSСсылки.WSСсылка2.СоздатьWSПрокси("http://1.1.1.1/VD/ws/WebCatalog", "WebCatalog", "WebCatalogSoap"); {Форма.Форма.Форма(231)}: Ошибка при вызове метода контекста (СоздатьWSПрокси) Прокси = WSСсылки.WSСсылка2.СоздатьWSПрокси("http://1.1.1.1/VD/ws/WebCatalog", "WebCatalog", "WebCatalogSoap"); по причине: Сервис не найден. {http://1.1.1.1/VD/ws/WebCatalog}:WebCatalog Подскажите пожалуйста что ни так? Вот структура ссылки WebCatalog |-WebCatalogSoap |-GetCountElements |
|||
1
oleg_prg
01.08.13
✎
19:48
|
1С:Предприятие 8.2 (8.2.18.102)
|
|||
2
Zaid
01.08.13
✎
19:56
|
В браузере ссылка открывается?
|
|||
3
oleg_prg
01.08.13
✎
19:57
|
Да, в том то и дело!
|
|||
4
oleg_prg
01.08.13
✎
19:57
|
И создается в 1С со всеми пакетами XDTOO и методами...
|
|||
5
oleg_prg
01.08.13
✎
19:59
|
Уже сделал по другому... и все равно ошибка
Определения = Новый WSОпределения("http://1.1.1.1/VD/ws/WebCatalog.1cws?wsdl", "Администратор","1"); Прокси = Новый WSПрокси(Определения, "http://1.1.1.1/VD/ws/", "WebCatalog", "WebCatalogSoap"); //Та же ошибка |
|||
6
Zaid
01.08.13
✎
20:00
|
Если wsdl открывается, я обычно пробую через SOAP UI.
Возможно ошибся в параметрах. Сделай скриншот свойств вебсервиса |
|||
7
oleg_prg
01.08.13
✎
20:04
|
||||
8
oleg_prg
01.08.13
✎
20:05
|
А вто то, что в браузере открылось
This XML file does not appear to have any style information associated with it. The document tree is shown below. <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12bind="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="VD" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://www.sample-package.org" xmlns:xsd2="VD" name="WebCatalog" targetNamespace="VD"> <types> <xs:schema xmlns:tns="http://www.sample-package.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.sample-package.org" attributeFormDefault="unqualified" elementFormDefault="qualified"> <xs:complexType name="ArrTovar"> <xs:sequence> <xs:element name="tovar" type="tns:Tovar" nillable="true" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="Tovar"> <xs:sequence> <xs:element name="MyGUID" type="xs:string"/> <xs:element name="Name" type="xs:string" nillable="true"/> <xs:element name="ShortComment" type="xs:string" nillable="true"/> <xs:element name="FullComment" type="xs:string" nillable="true"/> <xs:element name="image1" type="xs:base64Binary" nillable="true"/> <xs:element name="image2" type="xs:base64Binary" nillable="true"/> <xs:element name="image3" type="xs:base64Binary" nillable="true"/> <xs:element name="image4" type="xs:base64Binary" nillable="true"/> <xs:element name="image5" type="xs:base64Binary" nillable="true"/> <xs:element name="image6" type="xs:base64Binary" nillable="true"/> <xs:element name="image7" type="xs:base64Binary" nillable="true"/> <xs:element name="image8" type="xs:base64Binary" nillable="true"/> <xs:element name="image9" type="xs:base64Binary" nillable="true"/> <xs:element name="image10" type="xs:base64Binary" nillable="true"/> <xs:element name="Ostatok" type="xs:double"/> <xs:element name="Group" type="xs:boolean"/> <xs:element name="imageCount" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:schema> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs1="http://www.sample-package.org" xmlns:xs2="VD" targetNamespace="VD" elementFormDefault="qualified"> <xs:import namespace="http://www.sample-package.org"/> <xs:element name="GetCountElements"> <xs:complexType> <xs:sequence> <xs:element name="Parent" type="xs:string" nillable="true"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="GetCountElementsResponse"> <xs:complexType> <xs:sequence> <xs:element name="return" type="xs:int"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="GetElement"> <xs:complexType> <xs:sequence> <xs:element name="Parent" type="xs:string"/> <xs:element name="Position" type="xs:int"/> <xs:element name="Ostatok" type="xs:boolean"/> <xs:element name="Image" type="xs:boolean"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="GetElementResponse"> <xs:complexType> <xs:sequence> <xs:element name="return" type="xs1:Tovar"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="GetElementAll"> <xs:complexType> <xs:sequence> <xs:element name="Parent" type="xs:string"/> <xs:element name="Ostatok" type="xs:boolean"/> <xs:element name="Image" type="xs:boolean"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="GetElementAllResponse"> <xs:complexType> <xs:sequence> <xs:element name="return" type="xs1:ArrTovar"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </types> <message name="GetCountElementsRequestMessage"> <part name="parameters" element="tns:GetCountElements"/> </message> <message name="GetCountElementsResponseMessage"> <part name="parameters" element="tns:GetCountElementsResponse"/> </message> <message name="GetElementRequestMessage"> <part name="parameters" element="tns:GetElement"/> </message> <message name="GetElementResponseMessage"> <part name="parameters" element="tns:GetElementResponse"/> </message> <message name="GetElementAllRequestMessage"> <part name="parameters" element="tns:GetElementAll"/> </message> <message name="GetElementAllResponseMessage"> <part name="parameters" element="tns:GetElementAllResponse"/> </message> <portType name="WebCatalogPortType"> <operation name="GetCountElements"> <input message="tns:GetCountElementsRequestMessage"/> <output message="tns:GetCountElementsResponseMessage"/> </operation> <operation name="GetElement"> <input message="tns:GetElementRequestMessage"/> <output message="tns:GetElementResponseMessage"/> </operation> <operation name="GetElementAll"> <input message="tns:GetElementAllRequestMessage"/> <output message="tns:GetElementAllResponseMessage"/> </operation> </portType> <binding name="WebCatalogSoapBinding" type="tns:WebCatalogPortType"> <soapbind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetCountElements"> <soapbind:operation style="document" soapAction="VD#WebCatalog:GetCountElements"/> <input> <soapbind:body use="literal"/> </input> <output> <soapbind:body use="literal"/> </output> </operation> <operation name="GetElement"> <soapbind:operation style="document" soapAction="VD#WebCatalog:GetElement"/> <input> <soapbind:body use="literal"/> </input> <output> <soapbind:body use="literal"/> </output> </operation> <operation name="GetElementAll"> <soapbind:operation style="document" soapAction="VD#WebCatalog:GetElementAll"/> <input> <soapbind:body use="literal"/> </input> <output> <soapbind:body use="literal"/> </output> </operation> </binding> <binding name="WebCatalogSoap12Binding" type="tns:WebCatalogPortType"> <soap12bind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetCountElements"> <soap12bind:operation style="document" soapAction="VD#WebCatalog:GetCountElements"/> <input> <soap12bind:body use="literal"/> </input> <output> <soap12bind:body use="literal"/> </output> </operation> <operation name="GetElement"> <soap12bind:operation style="document" soapAction="VD#WebCatalog:GetElement"/> <input> <soap12bind:body use="literal"/> </input> <output> <soap12bind:body use="literal"/> </output> </operation> <operation name="GetElementAll"> <soap12bind:operation style="document" soapAction="VD#WebCatalog:GetElementAll"/> <input> <soap12bind:body use="literal"/> </input> <output> <soap12bind:body use="literal"/> </output> </operation> </binding> <service name="WebCatalog"> <port name="WebCatalogSoap" binding="tns:WebCatalogSoapBinding"> <documentation> <wsi:Claim xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" conformsTo="http://ws-i.org/profiles/basic/1.1"/> </documentation> <soapbind:address location="http://86.57.244.191/VD/ws/WebCatalog.1cws"/> </port> <port name="WebCatalogSoap12" binding="tns:WebCatalogSoap12Binding"> <soap12bind:address location="http://86.57.244.191/VD/ws/WebCatalog.1cws"/> </port> </service> </definitions> |
|||
9
oleg_prg
01.08.13
✎
20:12
|
Все! Разобрался, спасибо!
т.к. targetNamespace="VD" то надо и указать Прокси = Новый WSПрокси(Определения, "VD", "WebCatalog", "WebCatalogSoap"); |
|||
10
Zaid
02.08.13
✎
12:25
|
(9) Бинго! ) Я для этого и хотел скриншот посмотреть - сразу было подозрение, что URI неправильно пишешь )
P.S. Сорри, вчера уйти нужно было. |
Форум | Правила | Описание | Объявления | Секции | Поиск | Книга знаний | Вики-миста |