Веб-сервисы, создание клиента, Хелп-ме )

Sender

Новичок
Или в схеме ошибка, или готовишь не так. Давай код и что ты ожидаешь на выходе
 

iceman

говнокодер
Или в схеме ошибка, или готовишь не так. Давай код и что ты ожидаешь на выходе
C:\Program Files\Java\jdk1.7.0_05\bin>wsimport -d C:\SID0003022_d -s C:\SID00030
22_s -extension http://188.254.16.92:7777/gateway/services/SID0003022?wsdl -p ru
.gosuslugi.smev

вот весь код. коллеги говорят, что всегда над wsdl колдовать нужно... но как так, вроде это стандарт, почему тогда он такой разный? да и сервисы предоставляют гос.структуры, они ведь как то с ними работают между собой.

http://cryptopro.ru/forum2/Default.aspx?g=posts&t=5207

вот тут ведь, как я понял у чувака получается распарсить wsdl и создать клиента о_О

у меня вот такая шляпа
C:\Program Files\Java\jdk1.7.0_05\bin>wsimport -d C:\SID0003022_d -s C:\SID00030
22_s -extension http://188.254.16.92:7777/gateway/services/SID0003022?wsdl -p ru
.gosuslugi.smev
parsing WSDL...

[ERROR] 'Header' is already defined
line 7 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ows
mImport.xsd

[ERROR] (related to above error) the first definition appears here
line 3 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/SI
D0003022/P185654981/OwsmImport.xsd

[ERROR] 'Message' is already defined
line 13 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 8 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/SI
D0003022/P185654981/OwsmImport.xsd

[ERROR] 'MessageData' is already defined
line 18 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 14 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'AppData' is already defined
line 23 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 19 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'AppDocument' is already defined
line 28 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 24 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'Sender' is already defined
line 35 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 29 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'Recipient' is already defined
line 42 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 36 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'Originator' is already defined
line 50 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 43 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'TypeCode' is already defined
line 55 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 51 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'Date' is already defined
line 60 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 56 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'RequestIdRef' is already defined
line 67 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 61 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'OriginRequestIdRef' is already defined
line 75 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 68 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'ServiceCode' is already defined
line 80 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 76 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'CaseNumber' is already defined
line 86 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 81 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'MessageId' is already defined
line 91 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 87 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'TimeStamp' is already defined
line 97 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 92 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'BinaryData' is already defined
line 98 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 98 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'Reference' is already defined
line 99 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/Ow
smImport.xsd

[ERROR] (related to above error) the first definition appears here
line 99 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/S
ID0003022/P185654981/OwsmImport.xsd

[ERROR] 'DigestValue' is already defined
line 100 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/O
wsmImport.xsd

[ERROR] (related to above error) the first definition appears here
line 100 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/
SID0003022/P185654981/OwsmImport.xsd

[ERROR] 'MessageStatus' is already defined
line 106 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/O
wsmImport.xsd

[ERROR] (related to above error) the first definition appears here
line 101 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/
SID0003022/P185654981/OwsmImport.xsd

[ERROR] 'HeaderType' is already defined
line 113 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/O
wsmImport.xsd

[ERROR] (related to above error) the first definition appears here
line 107 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/
SID0003022/P185654981/OwsmImport.xsd

[ERROR] 'MessageType' is already defined
line 126 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/O
wsmImport.xsd

[ERROR] (related to above error) the first definition appears here
line 113 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/
SID0003022/P185654981/OwsmImport.xsd

[ERROR] 'MessageDataType' is already defined
line 132 of http://188.254.16.92:7777/gateway/services/SID0003022/P185654981/O
wsmImport.xsd

[ERROR] (related to above error) the first definition appears here
line 126 of http://188.254.16.92:7777/gateway/services/SID0003022/P1139237197/
SID0003022/P185654981/OwsmImport.xsd
....
 

Sender

Новичок
> вот тут ведь, как я понял у чувака получается распарсить wsdl и создать клиента
1. у него другая ссылка для схемы

2. в твоей схеме действительно идет два импорта где перечисляются одинаковые типы:

<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://smev.gosuslugi.ru/MsgExample/xsd/types" schemaLocation="SID0003022/P1139237197/OwsmImport.xsd"/>
<xsd:import namespace="http://smev.gosuslugi.ru/rev110801" schemaLocation="SID0003022/P185654981/OwsmImport.xsd"/>
</xsd:schema>


я не знаю как wsimport работает и что это за зверь, возможно ему надо как-то указать что тебе нужен импорт только именно вот этого namespace. Не знаю
 

iceman

говнокодер
Sender
> я не знаю как wsimport работает и что это за звер
wsimport - это утилита входит в поставку jdk 1.7.

> возможно ему надо как-то указать что тебе нужен импорт только именно вот этого namespace. Не знаю.
указать можно, через BINDing. понятно, для совместимости походу оставили.
спасибо, что открыл глаза

> 1. у него другая ссылка для схемы
ха, точно, не заметил. его wsdl спокойно парсится.
 
Сверху