powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / Java [игнор отключен] [закрыт для гостей] / Создание xsd-схемы из wsdl
11 сообщений из 11, страница 1 из 1
Создание xsd-схемы из wsdl
    #37907191
greg_123
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Добрый день!

У меня есть web-сервис, написанный в eclipse. Мне необходимо создать из wsdl этого сервиса xsd-схему.
Можно ли это сделать средствами eclipse? если можно то как? Или лучше для этой операции использовать другую программу.

Нашел программу по работе со всеми видами xml - Altova XML Spy - но там не смог найти такой функции.

Заранее спасибо!
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37907216
Фотография Blazkowicz
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Любым текстовым редактором - открываем wsdl. Удаляем всё лишнее вне тега schema. Добавляем недостающие объявления namespace из корня wsdl в корень xsd. При удачном расладе работы минут на 5. При не удачном на час, чтобы ещё всё провалидировать.
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37907234
greg_123
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Должны же быть какие-то готовые средства, просто не хочется вручную ковыряться.
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37907241
Фотография Blazkowicz
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
greg_123Должны же быть какие-то готовые средства, просто не хочется вручную ковыряться.
плачу. я же вам говорю, никто не жаждет автоматизировать работу, которая занимает считаные минуты.
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37908242
greg_123
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Если не трудно, расскажи поподробнее, как вручную wsdl-править, или может небольшой примерчик сбросишь?
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37908280
Фотография Petro123
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
greg_123,

а может wsdl покажешь? ))
______________________________________________
"Сделай настолько просто, насколько это возможно, но не проще". © А. Эйнштейн.
AutoPOI.ru — ГИС-технологии для Oracle
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37908301
greg_123
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Пример wsdl:
Код: xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://temp.ru" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://temp.ru" xmlns:intf="http://temp.ru" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified" targetNamespace="http://temp.ru" xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="getCallSign">
    <complexType>
     <sequence>
      <element name="number" type="xsd:string"/>
      <element name="DateDoc" type="xsd:dateTime"/>
     </sequence>
    </complexType>
   </element>
   <element name="getCallSignResponse">
    <complexType>
     <sequence>
      <element name="getCallSignReturn" type="impl:Call"/>
     </sequence>
    </complexType>
   </element>
   <complexType name="DocMarker">
    <sequence>
     <element name="markerAddress" nillable="true" type="xsd:string"/>
     <element name="markerName" nillable="true" type="xsd:string"/>
     <element name="regionID" nillable="true" type="xsd:int"/>
    </sequence>
   </complexType>
   <complexType name="Res">
    <sequence>
     <element name="callSign" nillable="true" type="xsd:string"/>
     <element name="plantNumber" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="CallList">
    <sequence>
     <element name="certificateAnnul" nillable="true" type="xsd:string"/>
     <element name="certificateDate" nillable="true" type="xsd:string"/>
     <element name="certificateEnd" nillable="true" type="xsd:string"/>
     <element name="certificateID" nillable="true" type="xsd:string"/>
     <element name="certificateLastUpdate" nillable="true" type="xsd:string"/>
     <element name="certificateNum" nillable="true" type="xsd:string"/>
     <element name="docMarkerInfo" nillable="true" type="impl:DocMarker"/>
     <element name="ownerID" nillable="true" type="xsd:string"/>
     <element name="resInfo" nillable="true" type="impl:Res"/>
    </sequence>
   </complexType>
   <complexType name="Call">
    <sequence>
     <element name="callSignCertificateInfo" nillable="true" type="impl:CallList"/>
    </sequence>
   </complexType>
   <element name="getOwner">
    <complexType>
     <sequence>
      <element name="OwnerID" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getOwnerResponse">
    <complexType>
     <sequence>
      <element name="getOwnerReturn" type="impl:Owner"/>
     </sequence>
    </complexType>
   </element>
   <complexType name="Address">
    <sequence>
     <element name="addressTxt" nillable="true" type="xsd:string"/>
     <element name="kladrId" nillable="true" type="xsd:string"/>
     <element name="regionCode" nillable="true" type="xsd:int"/>
    </sequence>
   </complexType>
   <complexType name="OwnerList">
    <sequence>
     <element name="INN" nillable="true" type="xsd:string"/>
     <element name="KPP" nillable="true" type="xsd:string"/>
     <element name="OGRN" nillable="true" type="xsd:string"/>
     <element name="addressLegal" nillable="true" type="impl:Address"/>
     <element name="addressPostal" nillable="true" type="impl:Address"/>
     <element name="email" nillable="true" type="xsd:string"/>
     <element name="faxNum" nillable="true" type="xsd:string"/>
     <element name="nameFull" nillable="true" type="xsd:string"/>
     <element name="nameShort" nillable="true" type="xsd:string"/>
     <element name="orgId" nillable="true" type="xsd:int"/>
     <element name="orgType" nillable="true" type="xsd:int"/>
     <element name="regionCode" nillable="true" type="xsd:int"/>
     <element name="telNum" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="Owner">
    <sequence>
     <element name="owner" nillable="true" type="impl:OwnerList"/>
    </sequence>
   </complexType>
  </schema>
 </wsdl:types>
   <wsdl:message name="getCallSignResponse">
      <wsdl:part element="impl:getCallSignResponse" name="parameters">
      </wsdl:part>
   </wsdl:message>
   <wsdl:message name="getOwnerRequest">
      <wsdl:part element="impl:getOwner" name="parameters">
      </wsdl:part>
   </wsdl:message>
   <wsdl:message name="getOwnerResponse">
      <wsdl:part element="impl:getOwnerResponse" name="parameters">
      </wsdl:part>
   </wsdl:message>
   <wsdl:message name="getCallSignRequest">
      <wsdl:part element="impl:getCallSign" name="parameters">
      </wsdl:part>
   </wsdl:message>
   <wsdl:portType name="CallSign">
      <wsdl:operation name="getCallSign">
         <wsdl:input message="impl:getCallSignRequest" name="getCallSignRequest">
       </wsdl:input>
         <wsdl:output message="impl:getCallSignResponse" name="getCallSignResponse">
       </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="getOwner">
         <wsdl:input message="impl:getOwnerRequest" name="getOwnerRequest">
       </wsdl:input>
         <wsdl:output message="impl:getOwnerResponse" name="getOwnerResponse">
       </wsdl:output>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="CallSignSoapBinding" type="impl:CallSign">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="getCallSign">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getCallSignRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getCallSignResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="getOwner">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getOwnerRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getOwnerResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="CallSignService">
      <wsdl:port binding="impl:CallSignSoapBinding" name="CallSign">
         <wsdlsoap:address location="http://localhost/CallSign/services/CallSign"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37908446
Фотография Petro123
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
greg_123,

http://www.sql.ru/forum/actualthread.aspx?tid=723713&hl=xsd%20wsdl
http://www.sql.ru/forum/afsearch.aspx?s=xsd+wsdl&submit=%CD%E0%E9%F2%E8&bid=59
______________________________________________
"Сделай настолько просто, насколько это возможно, но не проще". © А. Эйнштейн.
AutoPOI.ru — ГИС-технологии для Oracle
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37908667
Фотография Blazkowicz
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Але-оп!
Код: xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
<?xml version="1.0" encoding="UTF-8"?>
<schema elementFormDefault="qualified" targetNamespace="http://temp.ru" xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="getCallSign">
    <complexType>
     <sequence>
      <element name="number" type="xsd:string"/>
      <element name="DateDoc" type="xsd:dateTime"/>
     </sequence>
    </complexType>
   </element>
   <element name="getCallSignResponse">
    <complexType>
     <sequence>
      <element name="getCallSignReturn" type="impl:Call"/>
     </sequence>
    </complexType>
   </element>
   <complexType name="DocMarker">
    <sequence>
     <element name="markerAddress" nillable="true" type="xsd:string"/>
     <element name="markerName" nillable="true" type="xsd:string"/>
     <element name="regionID" nillable="true" type="xsd:int"/>
    </sequence>
   </complexType>
   <complexType name="Res">
    <sequence>
     <element name="callSign" nillable="true" type="xsd:string"/>
     <element name="plantNumber" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="CallList">
    <sequence>
     <element name="certificateAnnul" nillable="true" type="xsd:string"/>
     <element name="certificateDate" nillable="true" type="xsd:string"/>
     <element name="certificateEnd" nillable="true" type="xsd:string"/>
     <element name="certificateID" nillable="true" type="xsd:string"/>
     <element name="certificateLastUpdate" nillable="true" type="xsd:string"/>
     <element name="certificateNum" nillable="true" type="xsd:string"/>
     <element name="docMarkerInfo" nillable="true" type="impl:DocMarker"/>
     <element name="ownerID" nillable="true" type="xsd:string"/>
     <element name="resInfo" nillable="true" type="impl:Res"/>
    </sequence>
   </complexType>
   <complexType name="Call">
    <sequence>
     <element name="callSignCertificateInfo" nillable="true" type="impl:CallList"/>
    </sequence>
   </complexType>
   <element name="getOwner">
    <complexType>
     <sequence>
      <element name="OwnerID" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>
   <element name="getOwnerResponse">
    <complexType>
     <sequence>
      <element name="getOwnerReturn" type="impl:Owner"/>
     </sequence>
    </complexType>
   </element>
   <complexType name="Address">
    <sequence>
     <element name="addressTxt" nillable="true" type="xsd:string"/>
     <element name="kladrId" nillable="true" type="xsd:string"/>
     <element name="regionCode" nillable="true" type="xsd:int"/>
    </sequence>
   </complexType>
   <complexType name="OwnerList">
    <sequence>
     <element name="INN" nillable="true" type="xsd:string"/>
     <element name="KPP" nillable="true" type="xsd:string"/>
     <element name="OGRN" nillable="true" type="xsd:string"/>
     <element name="addressLegal" nillable="true" type="impl:Address"/>
     <element name="addressPostal" nillable="true" type="impl:Address"/>
     <element name="email" nillable="true" type="xsd:string"/>
     <element name="faxNum" nillable="true" type="xsd:string"/>
     <element name="nameFull" nillable="true" type="xsd:string"/>
     <element name="nameShort" nillable="true" type="xsd:string"/>
     <element name="orgId" nillable="true" type="xsd:int"/>
     <element name="orgType" nillable="true" type="xsd:int"/>
     <element name="regionCode" nillable="true" type="xsd:int"/>
     <element name="telNum" nillable="true" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="Owner">
    <sequence>
     <element name="owner" nillable="true" type="impl:OwnerList"/>
    </sequence>
   </complexType>
  </schema>
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37908720
greg_123
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Спасибо за xsd-схему.
Начал исправлять ее для валидации.

Получилось следующее:
Код: xml
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://temp.ru" xmlns:ns1="http://temp.ru" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<xs:element name="getCallSign">
    <xs:complexType>
     <xs:sequence>
      <xs:element name="number" type="xs:string"/>
      <xs:element name="DateDoc" type="xs:dateTime"/>
     </xs:sequence>
    </xs:complexType>
   </xs:element>
   <xs:element name="getCallSignResponse">
    <xs:complexType>
     <xs:sequence>
      <xs:element name="getCallSignReturn" type="Call"/>
     </xs:sequence>
    </xs:complexType>
   </xs:element>
   <xs:complexType name="DocMarker">
    <xs:sequence>
     <xs:element name="markerAddress" nillable="true" type="xs:string"/>
     <xs:element name="markerName" nillable="true" type="xs:string"/>
     <xs:element name="regionID" nillable="true" type="xs:int"/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name="Res">
    <xs:sequence>
     <xs:element name="callSign" nillable="true" type="xs:string"/>
     <xs:element name="plantNumber" nillable="true" type="xs:string"/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name="CallList">
    <xs:sequence>
     <xs:element name="certificateAnnul" nillable="true" type="xs:string"/>
     <xs:element name="certificateDate" nillable="true" type="xs:string"/>
     <xs:element name="certificateEnd" nillable="true" type="xs:string"/>
     <xs:element name="certificateID" nillable="true" type="xs:string"/>
     <xs:element name="certificateLastUpdate" nillable="true" type="xs:string"/>
     <xs:element name="certificateNum" nillable="true" type="xs:string"/>
     <xs:element name="docMarkerInfo" nillable="true" type="DocMarker"/>
     <xs:element name="ownerID" nillable="true" type="xs:string"/>
     <xs:element name="resInfo" nillable="true" type="Res"/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name="Call">
    <xs:sequence>
     <xs:element name="callSignCertificateInfo" nillable="true" type="CallList"/>
    </xs:sequence>
   </xs:complexType>
   <xs:element name="getOwner">
    <xs:complexType>
     <xs:sequence>
      <xs:element name="OwnerID" type="xs:string"/>
     </xs:sequence>
    </xs:complexType>
   </xs:element>
   <xs:element name="getOwnerResponse">
    <xs:complexType>
     <xs:sequence>
      <xs:element name="getOwnerReturn" type="Owner"/>
     </xs:sequence>
    </xs:complexType>
   </xs:element>
   <xs:complexType name="Address">
    <xs:sequence>
     <xs:element name="addressTxt" nillable="true" type="xs:string"/>
     <xs:element name="kladrId" nillable="true" type="xs:string"/>
     <xs:element name="regionCode" nillable="true" type="xs:int"/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name="OwnerList">
    <xs:sequence>
     <xs:element name="INN" nillable="true" type="xs:string"/>
     <xs:element name="KPP" nillable="true" type="xs:string"/>
     <xs:element name="OGRN" nillable="true" type="xs:string"/>
     <xs:element name="addressLegal" nillable="true" type="Address"/>
     <xs:element name="addressPostal" nillable="true" type="Address"/>
     <xs:element name="email" nillable="true" type="xs:string"/>
     <xs:element name="faxNum" nillable="true" type="xs:string"/>
     <xs:element name="nameFull" nillable="true" type="xs:string"/>
     <xs:element name="nameShort" nillable="true" type="xs:string"/>
     <xs:element name="orgId" nillable="true" type="xs:int"/>
     <xs:element name="orgType" nillable="true" type="xs:int"/>
     <xs:element name="regionCode" nillable="true" type="xs:int"/>
     <xs:element name="telNum" nillable="true" type="xs:string"/>
    </xs:sequence>
   </xs:complexType>
   <xs:complexType name="Owner">
    <xs:sequence>
     <xs:element name="owner" nillable="true" type="OwnerList"/>
    </xs:sequence>
   </xs:complexType>
</xs:schema>



Но вываливается ошибка:
src-resolve.4.1: Cannot resolve unqualified declaration or definition 'OwnerList' (на строку <xs:element name="owner" nillable="true" type="OwnerList"/>).

Проверку на валидность проводил в Altova XML SPY.

В чем может быть причина?
...
Рейтинг: 0 / 0
Создание xsd-схемы из wsdl
    #37908727
greg_123
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Ошибка найдена все такие типы нужно объявлять:
Код: xml
1.
<xs:element name="owner" nillable="true" type="ns1:OwnerList"/>



Большое спасибо всем за помощь!
...
Рейтинг: 0 / 0
11 сообщений из 11, страница 1 из 1
Форумы / Java [игнор отключен] [закрыт для гостей] / Создание xsd-схемы из wsdl
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]