На главную Наши проекты:
Журнал   ·   Discuz!ML   ·   Wiki   ·   DRKB   ·   Помощь проекту
ПРАВИЛА FAQ Помощь Участники Календарь Избранное RSS
msm.ru
Модераторы: ANDLL
  
> Как подключить xsd-схему soap запроса , soap, xsd
    Мне нужно выполнять запросы в информационную систему по SOAP. Есть руководство программиста с описанием xml-запросов, но там описаны не все запросы. Часть запросов задекларирована и говорится, что описание запросов находится в xsd-схемах. Мне прислали эти схемы, но я не знаю, как ими пользоваться.

    Вот wsdl-описание сервиса:

    ExpandedWrap disabled
      <?xml version="1.0"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IEtranSysservice" targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:SysEtranIntf">
          
          <types>
              <xsd:schema
                  targetNamespace="EtranFiledCars.xsd"
                  xmlns:EtranFiledCars="EtranFiledCars.xsd"
                  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                  
                  <xsd:include schemaLocation="schemas/EtranFiledCars.xsd"/>
              </xsd:schema>
          </types>
          
          <message name="SendBlockRequest">
              <part name="Text" type="xs:string"/>
          </message>
          <message name="SendBlockResponse">
              <part name="return" type="xs:boolean"/>
          </message>
          <message name="GetBlockRequest">
              <part name="Login" type="xs:string"/>
              <part name="Password" type="xs:string"/>
              <part name="Text" type="xs:string"/>
          </message>
          <message name="GetBlockResponse">
              <part name="Text" type="xs:string"/>
              <part name="return" type="xs:boolean"/>
          </message>
          <portType name="IEtranSys">
              <operation name="SendBlock">
                  <input message="tns:SendBlockRequest"/>
                  <output message="tns:SendBlockResponse"/>
              </operation>
              <operation name="GetBlock">
                  <input message="tns:GetBlockRequest"/>
                  <output message="tns:GetBlockResponse"/>
              </operation>
          </portType>
          <binding name="IEtranSysbinding" type="tns:IEtranSys">
              <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
              <operation name="SendBlock">
                  <soap:operation soapAction="urn:SysEtranInt" style="rpc"/>
                  <input>
                      <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="SysEtranInt"/>
                  </input>
                  <output>
                      <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="SysEtranInt"/>
                  </output>
              </operation>
              <operation name="GetBlock">
                  <soap:operation soapAction="urn:SysEtranInt" style="rpc"/>
                  <input>
                      <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="SysEtranInt"/>
                  </input>
                  <output>
                      <soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="SysEtranInt"/>
                  </output>
              </operation>
          </binding>
          <service name="IEtranSysservice">
              <port name="IEtranSysPort" binding="tns:IEtranSysbinding">
                  <soap:address location="http://10.248.35.14:8092/EtranServer/EtranLR.dll/soap"/>
              </port>
          </service>
      </definitions>


    И вот xsd-схема из файла:

    ExpandedWrap disabled
      <?xml version="1.0" encoding="UTF-8"?>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:ecat="http://intellex.ru/Etran/ASUASU/Categories">
          <xs:import namespace="http://intellex.ru/Etran/ASUASU/Categories" schemaLocation="EtranCategories.xsd"/>
          <xs:include schemaLocation="EtranCommonMessages.xsd"/>
          
          <xs:annotation>
              <xs:documentation>Сообщения информационного обмена АС Этран - внешнее АСУ.
                  Информация о наличии/отсутствии заготовок накладных на порожние собственные вагоны поданные, но не убранные с пути необщего пользования.</xs:documentation>
          </xs:annotation>
          
          <xs:element name="invoiceFiledCars">
              <xs:annotation>
                  <xs:documentation>Запрос справки о наличии/отсутствии заготовок накладных на порожние собственные вагоны поданные, но не убранные с пути необщего пользования.
                      Поиск данных осуществляется за период 60 дней. В ответ АС Этран возвращает invoiceFiledCarsReply
                  </xs:documentation>
              </xs:annotation>
          </xs:element>
          
          <xs:element name="invoiceFiledCarsReply">
              <xs:annotation>
                  <xs:documentation>Список заготовок накладных на порожние собственные вагоны поданные, но не убранные с пути необщего пользования.
                      В ответе передается список порожних вагонов с накладными на порожняк, если они есть (только в состояниях "Приемосдатчиком принято" и "Согласование уведомления"). Ответ на запрос invoiceFiledCars. </xs:documentation>
              </xs:annotation>
              <xs:complexType>
                  <xs:complexContent>
                      <xs:extension base="SimpleAnswer">
                          <xs:sequence>
                              <xs:element ref="invoiceFiledCar" minOccurs="0" maxOccurs="unbounded">
                              </xs:element>          
                          </xs:sequence>
                      </xs:extension>
                  </xs:complexContent>
              </xs:complexType>
          </xs:element>
          
          <xs:element name="invoiceFiledCar">
              <xs:annotation>
                  <xs:documentation> Накладная на поданный собственный порожний вагон</xs:documentation>
              </xs:annotation>
              <xs:complexType>  
                  <xs:sequence>
                      <xs:element name="Document" type="SimpleDocument" minOccurs="0" maxOccurs="1">
                          <xs:annotation>
                              <xs:documentation>Электронный документ на поданный собственный порожний вагон.</xs:documentation>
                          </xs:annotation>
                      </xs:element>
                      <xs:element name="FiledCarDate" type="ecat:DateTimeType" minOccurs="1" maxOccurs="1">
                          <xs:annotation>
                              <xs:documentation>Дата подачи на путь необщего пользования</xs:documentation>
                          </xs:annotation>
                      </xs:element>
                      <xs:element name="Car" type="TCar" minOccurs="1" maxOccurs="1">
                          <xs:annotation>
                              <xs:documentation>Поданный собственный порожний вагон</xs:documentation>
                          </xs:annotation>
                      </xs:element>
                      <xs:element name="Station" type="TStation" minOccurs="1" maxOccurs="1">
                          <xs:annotation>
                              <xs:documentation>Станция подачи</xs:documentation>
                          </xs:annotation>
                      </xs:element>
                      <xs:element name="ToStation" type="TStation" minOccurs="0" maxOccurs="1">
                          <xs:annotation>
                              <xs:documentation>Станция назначения</xs:documentation>
                          </xs:annotation>
                      </xs:element>
                  </xs:sequence>
              </xs:complexType>
          </xs:element>
      </xs:schema>

    Что, куда и как подключить?
      wsdl можно загрузить, например, утилиой wsimport из Glassfish Metro.
      На чём пишете клиент?
      0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
      0 пользователей:


      Рейтинг@Mail.ru
      [ Script execution time: 0,0214 ]   [ 15 queries used ]   [ Generated: 19.03.24, 06:59 GMT ]