2016-07-29 7 views
0

Ich habe zwei .xsd Dateien in meinem Web-Service, ich werde sie hier aufschreiben, mein Ziel ist es, statt zwei, eine xsd-Datei zu haben und immer noch die gleiche Funktionalität (so dass ich kann nur eine wSDL-Datei hat), ich habe versucht, hier und in goolge für ähnliche Probleme zu suchen, konnte aber nicht finden, vielleicht schreibe ich das Problem falsch:/Spring SOAP merging .xsd Dateien

Datei 1 und 2:

<?xml version="1.0" encoding="UTF-8"?> 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:tns="http://www.org.com/action" 
    targetNamespace="http://www.org.com/action" elementFormDefault="qualified"> 

    <xs:element name="getActionRequest"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element name="Username" type="xs:string"/> 
       <xs:element name="Password" type="xs:string"/> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 

    <xs:element name="getActionResponse"> 
     <xs:complexType> 
      <xs:sequence> 
       <xs:element name="Code" type="xs:string"/> 
      </xs:sequence> 
     </xs:complexType> 
    </xs:element> 

</xs:schema> 


    <?xml version="1.0" encoding="UTF-8"?> 
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
     xmlns:tns="http://www.org.com/validate" 
     targetNamespace="http://www.org.com/validate" elementFormDefault="qualified"> 

     <xs:element name="getValidateRequest"> 
      <xs:complexType> 
       <xs:sequence> 
        <xs:element name="Username" type="xs:string"/> 
        <xs:element name="Password" type="xs:string"/> 
        <xs:element name="Value" type="xs:int"/> 
       </xs:sequence> 
      </xs:complexType> 
     </xs:element> 

     <xs:element name="getValidateResponse"> 
      <xs:complexType> 
       <xs:sequence> 
        <xs:element name="Code" type="xs:string"/> 
       </xs:sequence> 
      </xs:complexType> 
     </xs:element> 

    </xs:schema> 

Antwort

1

That sollte funktionieren:

<?xml version="1.0" encoding="UTF-8"?> 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
    xmlns:tns="http://www.org.com/action" 
    targetNamespace="http://www.org.com/action" 
    elementFormDefault="qualified"> 

<xs:element name="getActionRequest"> 
    <xs:complexType> 
     <xs:sequence> 
      <xs:element name="Username" type="xs:string"/> 
      <xs:element name="Password" type="xs:string"/> 
     </xs:sequence> 
    </xs:complexType> 
</xs:element> 

<xs:element name="getActionResponse"> 
    <xs:complexType> 
     <xs:sequence> 
      <xs:element name="Code" type="xs:string"/> 
     </xs:sequence> 
    </xs:complexType> 
</xs:element> 
<xs:element name="getValidateRequest"> 
    <xs:complexType> 
     <xs:sequence> 
      <xs:element name="Username" type="xs:string"/> 
      <xs:element name="Password" type="xs:string"/> 
      <xs:element name="Value" type="xs:int"/> 
     </xs:sequence> 
    </xs:complexType> 
</xs:element> 

<xs:element name="getValidateResponse"> 
    <xs:complexType> 
     <xs:sequence> 
      <xs:element name="Code" type="xs:string"/> 
     </xs:sequence> 
    </xs:complexType> 
</xs:element> 
</xs:schema> 
+0

danke, ich beginne um es zu implementieren, aber wie sollte ich einige der Bohnen ändern (ich aktualisiere meinen Beitrag) – imoteb

+0

Ich reparierte es Kumpel, danke :) – imoteb