0 Replies Latest reply on Mar 26, 2009 1:35 PM by beauvergerc

    JBoss ESB produces a Web Service in Contract First approach

    beauvergerc

      Hi,

      I would like to expose a Web Service from JBoss ESB but in a Contract First approach.

      I have run different samples from quickstarts (webservice_proxy, webservice_producer, publish_as_webservice). But none corresponds to my use case.

      My Web Service is defined by an existing WSDL. This WSDL refers an XML Schema (several global elements). So I'd like not to split the XSD into input.xsd and output.xsd as describe in a solution.

      Thank you for your advise.

      Christophe


      I join to this post the WSDL and the XSD :

      <!-- edited with XMLSpy v2008 (http://www.altova.com) by none (none) -->
      <wsdl:definitions xmlns:CAR="http://www.msa.fr/XMLSchema/Carriere/v1_0" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:bpel="http://schemas.xmlsoap.org/ws/2004/03/business-process/" xmlns:pnlk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/" xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:this="http://www.msa.fr/Carriere/v1_0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.msa.fr/Carriere/v1_0">
       <wsdl:documentation>Service Carriere d'un individu</wsdl:documentation>
       <wsdl:types>
       <xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
       <xs:import namespace="http://www.msa.fr/XMLSchema/Carriere/v1_0" schemaLocation="CarriereIndividu.xsd"/>
       </xs:schema>
       </wsdl:types>
       <wsdl:message name="RestitutionCarriereIndividuRequest">
       <wsdl:documentation>Individu</wsdl:documentation>
       <wsdl:part name="part1" element="CAR:Individu"/>
       </wsdl:message>
       <wsdl:message name="RestitutionCarriereIndividuResponse">
       <wsdl:documentation>Compte carrière d'un individu</wsdl:documentation>
       <wsdl:part name="part1" element="CAR:CompteCarriere"/>
       </wsdl:message>
       <wsdl:portType name="CarriereIndividuPortType">
       <wsdl:documentation>Service Carrière d'un individu</wsdl:documentation>
       <wsdl:operation name="RestitutionCarriereIndividu">
       <wsdl:input message="this:RestitutionCarriereIndividuRequest" wsaw:Action="RestitutionCarriereIndividu"/>
       <wsdl:output message="this:RestitutionCarriereIndividuResponse" wsaw:Action="RestitutionCarriereIndividu"/>
       </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="CarriereIndividuBinding" type="this:CarriereIndividuPortType">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
       <wsdl:operation name="RestitutionCarriereIndividu">
       <soap:operation soapAction="RestitutionCarriereIndividu" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="CarriereIndividu">
       <wsdl:port name="CarriereIndividuPort" binding="this:CarriereIndividuBinding">
       <soap:address location="http://localhost:8080/services/CarriereIndividu"/>
       </wsdl:port>
       </wsdl:service>
      </wsdl:definitions>
      


      <?xml version="1.0" encoding="UTF-8"?>
      <!-- edited with XMLSpy v2008 (http://www.altova.com) by none (none) -->
      <!-- version du 04/12/2008 a 10/35/20 FICHE 82TX08Z359 -->
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.msa.fr/XMLSchema/Carriere/v1_0" targetNamespace="http://www.msa.fr/XMLSchema/Carriere/v1_0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0">
       <xs:element name="CompteCarriere">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="Individu"/>
       <xs:choice maxOccurs="unbounded">
       <xs:element name="TrimestreGlobalise" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="CodeRegime"/>
       <xs:element name="TypeTrimestresGlobalises">
       <xs:annotation>
       <xs:documentation>1=MAE, 2=Congé parental</xs:documentation>
       </xs:annotation>
       <xs:simpleType>
       <xs:restriction base="xs:unsignedShort">
       <xs:enumeration value="1"/>
       <xs:enumeration value="2"/>
       </xs:restriction>
       </xs:simpleType>
       </xs:element>
       <xs:element ref="NombreTrimestres"/>
       <xs:element ref="CodeOrganisme">
       <xs:annotation>
       <xs:documentation>
      CODE ORGANISME SARA</xs:documentation>
       </xs:annotation>
       </xs:element>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="Trimestre" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="Exercice"/>
       <xs:element ref="CodeRegime"/>
       <xs:element ref="CodeEcriture"/>
       <xs:element ref="ValeurActivite"/>
       <xs:element ref="NombreTrimestres"/>
       <xs:element ref="IndiceValiditeTrimestres"/>
       <xs:element ref="CodeOrganisme"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="Point" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="Exercice"/>
       <xs:element ref="CodeRegime"/>
       <xs:element ref="CodeEcriture"/>
       <xs:element ref="ValeurActivite"/>
       <xs:element ref="NombrePoints"/>
       <xs:element ref="IndiceValiditePoints"/>
       <xs:element ref="CodeOrganisme"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="Salaire" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="Exercice"/>
       <xs:element ref="CodeRegime"/>
       <xs:element ref="CodeEcriture"/>
       <xs:element ref="Salaire"/>
       <xs:element ref="Duree"/>
       <xs:element ref="CodeOrganisme"/>
       <xs:element ref="Entreprise" minOccurs="0"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="PeriodeCotisee" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="Exercice"/>
       <xs:element ref="CodeRegime"/>
       <xs:element name="DateDebutPeriode" type="xs:date">
       <xs:annotation>
       <xs:documentation>
      DATE DE DEBUT DE PERIODE (SSAAMMJJ)
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="DateFinPeriode" type="xs:date">
       <xs:annotation>
       <xs:documentation>
      DATE DE FIN DE PERIODE (SSAAMMJJ)
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element ref="Duree" minOccurs="0"/>
       <xs:element ref="ValeurActivite" minOccurs="0"/>
       <xs:element name="LieuActivite" type="xs:string" minOccurs="0">
       <xs:annotation>
       <xs:documentation>
      LIEU D&apos;ACTIVITE
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element ref="CodeOrganisme" minOccurs="0"/>
       <xs:element ref="Entreprise" minOccurs="0"/>
       <xs:element ref="ActeGestion" minOccurs="0"/>
       <xs:element name="PeriodeNSA" minOccurs="0">
       <xs:annotation>
       <xs:documentation>PERIODE NSA</xs:documentation>
       </xs:annotation>
       <xs:complexType>
       <xs:sequence>
       <xs:element name="NatureActivite" type="xs:string">
       <xs:annotation>
       <xs:appinfo source="TPL">TA38370</xs:appinfo>
       <xs:documentation>
      NATURE D&apos;ACTIVITE SARA
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="AssujetissementAmexa" type="xs:string">
       <xs:annotation>
       <xs:appinfo source="TPL">TA38410</xs:appinfo>
       <xs:documentation>
      ASSUJETISSEMENT AMEXA
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="NombreParts" type="xs:decimal">
       <xs:annotation>
       <xs:documentation>
      NOMBRE DE PARTS
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="PeriodeNonAgricole" minOccurs="0">
       <xs:complexType>
       <xs:sequence>
       <xs:element name="Validation" type="xs:boolean">
       <xs:annotation>
       <xs:documentation>TOP VALIDATION</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="ModeCalculRegimeAffectation" type="xs:unsignedShort">
       <xs:annotation>
       <xs:documentation>MODE DE CALCUL DU REGIME SARA D'AFFECTATION DE LA PERIODE</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="CodeRegimeAffectation" type="xs:string">
       <xs:annotation>
       <xs:documentation>REGIMES AUXQUELS LA PERIODE SANS REGIME EST AFFECTEE</xs:documentation>
       </xs:annotation>
       </xs:element>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="PeriodeAssimilee" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="Exercice"/>
       <xs:element ref="CodeRegime"/>
       <xs:element ref="NumeroTrimestre"/>
       <xs:element ref="CodeEcriture"/>
       <xs:element ref="Duree"/>
       <xs:element ref="CodeOrganisme"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="Cotisation" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="Exercice"/>
       <xs:element ref="CodeRegime"/>
       <xs:element ref="NumeroTrimestre"/>
       <xs:element ref="CodeEcriture"/>
       <xs:element name="Montant" type="xs:unsignedShort">
       <xs:annotation>
       <xs:documentation>MONTANT DE LA COTISATION</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element ref="Duree"/>
       <xs:element ref="CodeOrganisme"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       </xs:choice>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="NombreTrimestres" type="xs:unsignedShort">
       <xs:annotation>
       <xs:documentation>
      NOMBRE DE TRIMESTRES MAE DANS LE REGIME
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="NombrePoints" type="xs:decimal">
       <xs:annotation>
       <xs:documentation>NOMBRE DE POINTS</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="CodeEcriture" type="xs:string">
       <xs:annotation>
       <xs:documentation>CODE ECRITURE SARA</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="CodeOrganisme" type="xs:string">
       <xs:annotation>
       <xs:documentation>
      CODE ORGANISME SARA (DATES DE PREINSTRUCTION)
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="ValeurActivite" type="xs:string">
       <xs:annotation>
       <xs:documentation>VALEUR D'ACTIVITE SARA</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:simpleType name="IndiceValiditeType">
       <xs:annotation>
       <xs:documentation>INDICE DE VALIDITE</xs:documentation>
       </xs:annotation>
       <xs:restriction base="xs:string"/>
       </xs:simpleType>
       <xs:element name="IndiceValiditeTrimestres" type="IndiceValiditeType">
       <xs:annotation>
       <xs:documentation>INDICE DE VALIDITE DES TRIMESTRES</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="IndiceValiditePoints" type="IndiceValiditeType">
       <xs:annotation>
       <xs:documentation>INDICE DE VALIDITE DES POINTS</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="Duree" type="xs:unsignedShort">
       <xs:annotation>
       <xs:documentation>DUREE EN NOMBRE DE JOURS</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="Salaire" type="xs:decimal">
       <xs:annotation>
       <xs:documentation>SALAIRE EN FRANCS</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="Entreprise">
       <xs:complexType>
       <xs:sequence>
       <xs:element name="NumeroEntreprise" type="xs:string">
       <xs:annotation>
       <xs:documentation>NUMERO D'ENTREPRISE</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="TypeNumeroEntreprise" type="xs:string">
       <xs:annotation>
       <xs:documentation>TYPE DE NUMERO D'ENTREPRISE</xs:documentation>
       </xs:annotation>
       </xs:element>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="ActeGestion">
       <xs:complexType>
       <xs:sequence>
       <xs:element name="MotifActeGestion" type="xs:string">
       <xs:annotation>
       <xs:appinfo source="TPL">TA38530</xs:appinfo>
       <xs:documentation>
      MOTIF DE L&apos;ACTE DE GESTION
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="DateRegularisation" type="xs:date">
       <xs:annotation>
       <xs:documentation>
      DATE DE REGULARISATION
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="CodeEtatGestion" type="xs:string">
       <xs:annotation>
       <xs:appinfo source="TPL">TA38540</xs:appinfo>
       <xs:documentation>
      CODE ETAT DE GESTION
      </xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element ref="CodeOrganisme"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="NumeroTrimestre" type="xs:unsignedShort">
       <xs:annotation>
       <xs:documentation>TRIMESTRE D'EXERCICE</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="Individu">
       <xs:complexType>
       <xs:sequence>
       <xs:element ref="IdentifiantIndividu"/>
       <xs:element name="DateNaissance" type="xs:date"/>
       </xs:sequence>
       </xs:complexType>
       </xs:element>
       <xs:element name="IdentifiantIndividu" type="xs:string"/>
       <xs:element name="CodeRegime" type="xs:string">
       <xs:annotation>
       <xs:documentation>CODE REGIME</xs:documentation>
       </xs:annotation>
       </xs:element>
       <xs:element name="Exercice" type="xs:unsignedShort">
       <xs:annotation>
       <xs:documentation>EXERCICE</xs:documentation>
       </xs:annotation>
       </xs:element>
      </xs:schema>