|
Вопрос по WEB сервису | ☑ | ||
---|---|---|---|---|
0
oleg_prg
27.05.13
✎
18:07
|
Добрый день, подскажите пожалуйста.
Делаю так Определения = Новый WSОпределения("http://ws64:8080/VD/ws/ws555?wsdl", "Администратор","1534515345"); Прокси = Новый WSПрокси(Определения, "http://ws64:8080/VD/ws", "GetAllCatalog", "GetAllCatalogSoap"); Отчет.Отчет1.Форма.ФормаОтчета.Форма(5)}: Ошибка при вызове конструктора (WSПрокси) Прокси = Новый WSПрокси(Определения, "http://ws64:8080/VD/ws", "GetAllCatalog", "GetAllCatalogSoap"); по причине: Сервис не найден. {http://ws64:8080/VD/ws}:GetAllCatalog В браузере ввожу адрес http://ws64:8080/VD/ws/ws555/?wsdl - ответ такой <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="GetAllCatalog" 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" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="Tovar"> <xs:sequence> <xs:element name="MyGUID" type="xs:string" maxOccurs="99"/> <xs:element name="Name" type="xs:string" maxOccurs="150"/> <xs:element name="ShortComment" type="xs:string" maxOccurs="250"/> <xs:element name="FullComment" type="xs:string" maxOccurs="5000"/> <xs:element name="img1" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img2" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img3" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img4" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img5" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img6" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img7" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img8" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img9" type="xs:base64Binary" maxOccurs="999999"/> <xs:element name="img10" type="xs:base64Binary" maxOccurs="999999"/> </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="GetCatalog"> <xs:complexType> <xs:sequence/> </xs:complexType> </xs:element> <xs:element name="GetCatalogResponse"> <xs:complexType> <xs:sequence> <xs:element name="return" type="xs1:ArrTovar"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </types> <message name="GetCatalogRequestMessage"> <part name="parameters" element="tns:GetCatalog"/> </message> <message name="GetCatalogResponseMessage"> <part name="parameters" element="tns:GetCatalogResponse"/> </message> <portType name="GetAllCatalogPortType"> <operation name="GetCatalog"> <input message="tns:GetCatalogRequestMessage"/> <output message="tns:GetCatalogResponseMessage"/> </operation> </portType> <binding name="GetAllCatalogSoapBinding" type="tns:GetAllCatalogPortType"> <soapbind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetCatalog"> <soapbind:operation style="document" soapAction="VD#GetAllCatalog:GetCatalog"/> <input> <soapbind:body use="literal"/> </input> <output> <soapbind:body use="literal"/> </output> </operation> </binding> <binding name="GetAllCatalogSoap12Binding" type="tns:GetAllCatalogPortType"> <soap12bind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetCatalog"> <soap12bind:operation style="document" soapAction="VD#GetAllCatalog:GetCatalog"/> <input> <soap12bind:body use="literal"/> </input> <output> <soap12bind:body use="literal"/> </output> </operation> </binding> <service name="GetAllCatalog"> <port name="GetAllCatalogSoap" binding="tns:GetAllCatalogSoapBinding"> <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://ws64:8080/VD/ws/ws555/"/> </port> <port name="GetAllCatalogSoap12" binding="tns:GetAllCatalogSoap12Binding"> <soap12bind:address location="http://ws64:8080/VD/ws/ws555/"/> </port> </service> </definitions> что не так??? Заранее спасибо! |
|||
1
oleg_prg
27.05.13
✎
18:13
|
||||
2
Serginio1
27.05.13
✎
18:50
|
ИмяВэбСервиса=ТвоёИмя;//"ws1.1cws"
ИмяТочкиПодключения=ИмяВэбСервиса+"Soap"; АдресВэбСервиса="http://ИмяСервера/ИмяБазы/ws/"+ИмяВэбСервиса; Определения= новый WSОпределения(АдресВэбСервиса+"?wsdl",Юзер,Пароль); Прокси= Новый WSПрокси(Определения,URiПространстваИмен,ИмяВэбСервиса,ИмяТочкиПодключения); Прокси.Пользователь = Юзер; Прокси.Пароль = пароль; Сообщить(Прокси.preved()); |
|||
3
oleg_prg
28.05.13
✎
11:17
|
Заработало, как я и думал ошибка в параметре
Определения = Новый WSОпределения("http://localhost/VD/ws/ws1?wsdl", "Администратор","1534515345"); Прокси = Новый WSПрокси(Определения, "VD", "GetAllCatalog", "GetAllCatalogSoap"); //!!! ВОТ ОНО VD Прокси.Пользователь = "Администратор"; Прокси.Пароль = "1534515345"; Сообщить("ОК!!!"); Выборка = Прокси.GetCatalog(); Для каждого Эл Из Выборка.Tovar Цикл Сообщить(Эл.Name); КонецЦикла; |
|||
4
Serginio1
28.05.13
✎
11:24
|
(3) targetNamespace="VD">
Если бы ты открыл ссылку в конфигураторе то там у пакета есть Uri пространства имен. |
Форум | Правила | Описание | Объявления | Секции | Поиск | Книга знаний | Вики-миста |