1 Reply Latest reply on Jul 3, 2014 10:49 AM by simplex-software

    Contract firts - deployed WSDL different of the provided one

    simplex-software

      Greetings,

       

      I'm developing a CXF web service, using the contract fiest approach, to be deployed in JBoss EAP 6.2. Using the wsdl2java CXF plugin I'm generating the required JAX-WS artifacts but, after deployment to the server, the published WSDL is different compared to the provided one. For example, my WSDL is saying:

       

        <wsdl:service name="TravelRequestService">

          <wsdl:port binding="tns:TravelRequestSOAP" name="TravelRequestSOAP">

            <soap:address location="http://localhost:8080/travel-request/TravelRequestService"/>

          </wsdl:port>

        </wsdl:service>

       

      while the published one after the deployment says:

       

      <wsdl:service name="TravelService">

        <wsdl:port binding="tns:TravelServiceSoapBinding" name="TravelServicePort">

          <soap:address location="http://localhost:8080/travel-war"/>

        </wsdl:port>

      </wsdl:service>

       

      Here is how the JAX-WS classes are generated:

       

        <plugin>
          <groupId>org.apache.cxf</groupId>
          <artifactId>cxf-codegen-plugin</artifactId>
          <version>2.7.8</version>
          <executions>
            <execution>
              <id>generate-sources</id>
              <phase>generate-sources</phase>
              <configuration>
                <sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
                <wsdlOptions>
                  <wsdlOption>
                    <wsdl>${basedir}/../travel-war/src/main/webapp/WEB-INF/wsdl/travel-service.wsdl</wsdl>
                    <extraargs>
                      <!-- extraarg>-impl</extraarg-->
                      <extraarg>-validate</extraarg>
                      <!-- extraarg>-keep</extraarg-->
                      <!-- extraarg>-quiet</extraarg-->
                      <extraarg>-verbose</extraarg>
                      <extraarg>-client</extraarg>
                      <extraarg>-p</extraarg>
                      <extraarg>urn:fr.simplex-software.soa:travel-service:model:1.0=fr.simplex_software.soa.travel_service.model</extraarg>
                      <extraarg>-p</extraarg>
                      <extraarg>urn:fr.simplex-software.soa:travel-service:1.0=fr.simplex_software.soa.travel_service</extraarg>
                      <extraarg>-compile</extraarg>
                      <extraarg>-wsdlLocation</extraarg>
                      <extraarg>WEB-INF/wsdl/travel-service.wsdl</extraarg>
                    </extraargs>
                  </wsdlOption>
                </wsdlOptions>
              </configuration>
              <goals>
                <goal>wsdl2java</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

      I also tried to use the -sn option of the wsdl2java plugin such that to force the generated service name, but adding that to the maven POM results in JBDS not able to buil anymore the workspace. It loops cyclicly for ever. What did I miss here ?

       

      Many thanks in advance for your help.

       

      Nicolas