Как я могу преобразовать теги wsdl: message в xsd: сложные типы? - PullRequest
0 голосов
/ 17 января 2020

В настоящее время у меня есть файл wsdl с именем mep.wsdl.

, в нем есть тег с именем wsdl: types. Внутри этого есть много тегов xsd.

  <wsdl:types>
  <xsd:schema targetNamespace="http://openmindnetworks.com/engage/">

   <xsd:complexType name="Result">  
    <xsd:sequence>
     <xsd:element name="error" type="xsd:boolean"/>
     <xsd:element name="message" type="xsd:string" minOccurs="0"/>
     <xsd:element name="detailMessage" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="Address">
    <xsd:sequence>
     <xsd:element name="ton" type="xsd:integer" minOccurs="0"/>
     <xsd:element name="npi" type="xsd:integer" minOccurs="0"/>
     <xsd:element name="addr" type="xsd:string"/>
    </xsd:sequence>
   </xsd:complexType>
   <xsd:complexType name="AddressList">
    <xsd:sequence>
     <xsd:element name="address" type="eng:Address" maxOccurs="unbounded"/>
    </xsd:sequence>
   </xsd:complexType>

 </wsdl:types>

 <wsdl:message name="sendTestMessageReq">
  <wsdl:part name="template_id" type="xsd:string"/>
  <wsdl:part name="originator" type="eng:Address"/>
  <wsdl:part name="recipients" type="eng:AddressList"/>
 </wsdl:message>

 <wsdl:message name="sendTestMessageRsp">
  <wsdl:part name="result" type="eng:Result"/>
 </wsdl:message>

я хотел бы добиться создания нового файла xsd путем преобразования типов в сложный тип xsd.

Ниже приведено полное определение моего WSDL файл

<?xml version="1.0" encoding="UTF-8" ?>

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
                  xmlns:eng="http://openmindnetworks.com/engage/" 
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Engage"
                  targetNamespace="http://openmindnetworks.com/engage/">

 <wsdl:types>
  <xsd:schema targetNamespace="http://openmindnetworks.com/engage/">

   <xsd:complexType name="Result">  
    <xsd:sequence>
     <xsd:element name="error" type="xsd:boolean"/>
     <xsd:element name="message" type="xsd:string" minOccurs="0"/>
     <xsd:element name="detailMessage" type="xsd:string" minOccurs="0"/>
    </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="Address">
    <xsd:sequence>
     <xsd:element name="ton" type="xsd:integer" minOccurs="0"/>
     <xsd:element name="npi" type="xsd:integer" minOccurs="0"/>
     <xsd:element name="addr" type="xsd:string"/>
    </xsd:sequence>
   </xsd:complexType>
   <xsd:complexType name="AddressList">
    <xsd:sequence>
     <xsd:element name="address" type="eng:Address" maxOccurs="unbounded"/>
    </xsd:sequence>
   </xsd:complexType>

   <xsd:complexType name="Stat">
    <xsd:sequence>
     <xsd:element name="inventory" type="xsd:string"/>
     <xsd:element name="stat_name" type="xsd:string"/>
     <xsd:element name="description" type="xsd:string" minOccurs="0"/>
     <xsd:element name="value" type="xsd:integer"/>
    </xsd:sequence>
   </xsd:complexType>
   <xsd:complexType name="Stats">
    <xsd:sequence>
     <xsd:element name="stat" type="eng:Stat" maxOccurs="unbounded"/>
    </xsd:sequence>
   </xsd:complexType>
   <xsd:complexType name="GetStatsResponse">
    <xsd:sequence>
     <xsd:element name="result" type="eng:Result"/>
     <xsd:element name="stats" type="eng:Stats" minOccurs="0"/>
    </xsd:sequence>  
   </xsd:complexType>

   <xsd:complexType name="getContactListResponse">
    <xsd:sequence>
     <xsd:element name="result" type="eng:Result"/>
     <xsd:element name="contactList" type="xsd:string" minOccurs="0"/>     
    </xsd:sequence>
   </xsd:complexType>
  </xsd:schema>
 </wsdl:types>

 <wsdl:message name="sendTestMessageReq">
  <wsdl:part name="template_id" type="xsd:string"/>
  <wsdl:part name="originator" type="eng:Address"/>
  <wsdl:part name="recipients" type="eng:AddressList"/>
 </wsdl:message>
 <wsdl:message name="sendTestMessageRsp">
  <wsdl:part name="result" type="eng:Result"/>
 </wsdl:message>

 <wsdl:message name="createContactListReq">
  <wsdl:part name="id" type="xsd:string"/>
  <wsdl:part name="contactList" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="createContactListRsp">
  <wsdl:part name="result" type="eng:Result"/> 
 </wsdl:message>
 <wsdl:message name="updateContactListReq">
  <wsdl:part name="id" type="xsd:string"/>
  <wsdl:part name="contactList" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="updateContactListRsp">
  <wsdl:part name="result" type="eng:Result"/>
 </wsdl:message>
 <wsdl:message name="deleteContactListReq">
  <wsdl:part name="id" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="deleteContactListRsp">
  <wsdl:part name="result" type="eng:Result"/>
 </wsdl:message>
 <wsdl:message name="getContactListReq">
  <wsdl:part name="id" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="getContactListRsp">
  <wsdl:part name="response" type="eng:getContactListResponse"/>
 </wsdl:message>

 <wsdl:message name="scheduleJobReq">
  <wsdl:part name="id" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="scheduleJobRsp">
  <wsdl:part name="result" type="eng:Result"/>
 </wsdl:message>
 <wsdl:message name="pauseJobReq">
  <wsdl:part name="id" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="pauseJobRsp">
  <wsdl:part name="result" type="eng:Result"/> 
 </wsdl:message>
 <wsdl:message name="cancelJobReq">
  <wsdl:part name="id" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="cancelJobRsp">
  <wsdl:part name="result" type="eng:Result"/>
 </wsdl:message>
 <wsdl:message name="restartJobReq">
  <wsdl:part name="id" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="restartJobRsp">
  <wsdl:part name="result" type="eng:Result"/>
 </wsdl:message>

 <wsdl:message name="getJobStatsReq">
  <wsdl:part name="id" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="getJobStatsRsp">
  <wsdl:part name="response" type="eng:GetStatsResponse"/>
 </wsdl:message>
 <wsdl:message name="getCampaignStatsReq">
  <wsdl:part name="id" type="xsd:string"/>
 </wsdl:message>
 <wsdl:message name="getCampaignStatsRsp">
  <wsdl:part name="response" type="eng:GetStatsResponse"/>
 </wsdl:message>

 <wsdl:portType name="EngageTemplatesPort">
  <wsdl:operation name="sendTestMessage">
   <wsdl:input message="eng:sendTestMessageReq"/>
   <wsdl:output message="eng:sendTestMessageRsp"/>
  </wsdl:operation>
 </wsdl:portType>

 <wsdl:portType name="EngageContactListPort">
  <wsdl:operation name="createContactList">
   <wsdl:input message="eng:createContactListReq"/>
   <wsdl:output message="eng:createContactListRsp"/>
  </wsdl:operation>
  <wsdl:operation name="updateContactList">
   <wsdl:input message="eng:updateContactListReq"/>
   <wsdl:output message="eng:updateContactListRsp"/>
  </wsdl:operation>
  <wsdl:operation name="deleteContactList">
   <wsdl:input message="eng:deleteContactListReq"/>
   <wsdl:output message="eng:deleteContactListRsp"/>
  </wsdl:operation>
  <wsdl:operation name="getContactList">
   <wsdl:input message="eng:getContactListReq"/>
   <wsdl:output message="eng:getContactListRsp"/>
  </wsdl:operation>
 </wsdl:portType>

 <wsdl:portType name="EngageJobsPort">
  <wsdl:operation name="scheduleJob">
   <wsdl:input message="eng:scheduleJobReq"/>
   <wsdl:output message="eng:scheduleJobRsp"/>
  </wsdl:operation>
  <wsdl:operation name="pauseJob">
   <wsdl:input message="eng:pauseJobReq"/>
   <wsdl:output message="eng:pauseJobRsp"/>
  </wsdl:operation>
  <wsdl:operation name="cancelJob">
   <wsdl:input message="eng:cancelJobReq"/>
   <wsdl:output message="eng:cancelJobRsp"/>
  </wsdl:operation>
  <wsdl:operation name="restartJob">
   <wsdl:input message="eng:restartJobReq"/>
   <wsdl:output message="eng:restartJobRsp"/>
  </wsdl:operation>
 </wsdl:portType>

 <wsdl:portType name="EngageStatsPort">
  <wsdl:operation name="getJobStats">
   <wsdl:input message="eng:getJobStatsReq"/>
   <wsdl:output message="eng:getJobStatsRsp"/>
  </wsdl:operation>
  <wsdl:operation name="getCampaignStats">
   <wsdl:input message="eng:getCampaignStatsReq"/>
   <wsdl:output message="eng:getCampaignStatsRsp"/>
  </wsdl:operation>
 </wsdl:portType>

 <wsdl:binding name="EngageTemplates" type="eng:EngageTemplatesPort">
   <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

   <wsdl:operation name="sendTestMessage">
     <soap:operation soapAction="http://openmindnetworks.com/engage/sendTestMessage"/>
     <wsdl:input>
       <soap:body use="literal"/>
     </wsdl:input>
     <wsdl:output>
       <soap:body use="literal"/>
     </wsdl:output>
   </wsdl:operation>
 </wsdl:binding>

 <wsdl:binding name="EngageContactLists" type="eng:EngageContactListPort">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <wsdl:operation name="createContactList">
   <soap:operation soapAction="http://openmindnetworks.com/engage/createContactList"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
  <wsdl:operation name="updateContactList">
   <soap:operation soapAction="http://openmindnetworks.com/engage/updateContactList"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
  <wsdl:operation name="deleteContactList">
   <soap:operation soapAction="http://openmindnetworks.com/engage/deleteContactList"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
  <wsdl:operation name="getContactList">
   <soap:operation soapAction="http://openmindnetworks.com/engage/getContactList"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
 </wsdl:binding>

 <wsdl:binding name="EngageJobs" type="eng:EngageJobsPort">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <wsdl:operation name="scheduleJob">
   <soap:operation soapAction="http://openmindnetworks.com/engage/scheduleJob"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
  <wsdl:operation name="pauseJob">
   <soap:operation soapAction="http://openmindnetworks.com/engage/retrieveJob"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
  <wsdl:operation name="cancelJob">
   <soap:operation soapAction="http://openmindnetworks.com/engage/cancelJob"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
  <wsdl:operation name="restartJob">
   <soap:operation soapAction="http://openmindnetworks.com/engage/restartJob"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
 </wsdl:binding>

 <wsdl:binding name="EngageStats" type="eng:EngageStatsPort">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <wsdl:operation name="getJobStats">
   <soap:operation soapAction="http://openmindnetworks.com/engage/getJobStats"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
  <wsdl:operation name="getCampaignStats">
   <soap:operation soapAction="http://openmindnetworks.com/engage/getCampaignStats"/>
   <wsdl:input>
    <soap:body use="literal"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body use="literal"/>
   </wsdl:output>
  </wsdl:operation>
 </wsdl:binding>

 <wsdl:service name="Engage">
  <wsdl:documentation>Defines an API exposed by Engage backend server</wsdl:documentation>
  <wsdl:port binding="eng:EngageTemplates" name="engageTemplates">
   <soap:address location="http://blovice:8085/engage/templates"/>
  </wsdl:port>
  <wsdl:port binding="eng:EngageContactLists" name="engageContactLists">
   <soap:address location="http://blovice:8085/engage/ContactLists"/>
  </wsdl:port>
  <wsdl:port binding="eng:EngageJobs" name="engageJobs">
   <soap:address location="http://blovice:8085/engage/jobs"/>
  </wsdl:port>
  <wsdl:port binding="eng:EngageStats" name="engageStats">
   <soap:address location="http://blovice:8085/engage/stats"/>
  </wsdl:port>
 </wsdl:service>
</wsdl:definitions>

очень ценю любую помощь, спасибо

...