2 Replies Latest reply on Jan 16, 2015 1:51 AM by amitg.gulhane

    Configured soap service not deployed but BaseWebService

    tsluijter

      I've created a SwitchYard project that has a soap service (just like the order quickstart tutorial).

      The project is deployed as a war file.

      Underneath the switchyard.xml in the war.

       

      <?xml version="1.0" encoding="UTF-8"?>
      <sy:switchyard xmlns:sy="urn:switchyard-config:switchyard:1.1" xmlns:bean="urn:switchyard-component-bean:config:1.1" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:soap="urn:switchyard-component-soap:config:1.1" name="dossier-service" targetNamespace="urn:nl.caci:dossier-service:1.0">
          <sca:composite name="dossier-service" targetNamespace="urn:nl.caci:dossier-service:1.0">
              <sca:service name="SnapshotServicePortType" promote="SnapshotServiceBean/SnapshotService">
                  <sca:interface.wsdl interface="DomeinSnapshot.wsdl#wsdl.porttype(SnapshotServicePortType)"/>
                  <soap:binding.soap>
                      <soap:wsdl>DomeinSnapshot.wsdl</soap:wsdl>
                      <soap:socketAddr>:18001</soap:socketAddr>
                  </soap:binding.soap>
              </sca:service>
              <sca:component name="SnapshotServiceBean">
                  <bean:implementation.bean class="nl.caci.dossier.service.SnapshotServiceBean"/>
                  <sca:service name="SnapshotService">
                      <sca:interface.java interface="nl.caci.dossier.service.SnapshotService"/>
                  </sca:service>
              </sca:component>
          </sca:composite>
          <transforms xmlns="urn:switchyard-config:switchyard:1.1">
              <transform.java xmlns="urn:switchyard-config:transform:1.1" class="nl.caci.dossier.service.Transformers" from="java:java.lang.Object" to="{urn:nl.caci:dossier-service:1.0}receiveSnapshotResponse"/>
              <transform.java xmlns="urn:switchyard-config:transform:1.1" class="nl.caci.dossier.service.Transformers" from="{urn:nl.caci:dossier-service:1.0}receiveSnapshot" to="java:java.lang.Object"/>
          </transforms>
      </sy:switchyard>
      

       

      The wsdl exists underneath war\WEB-INF\classes.

       

      But when Jboss EAP 6.1 is started the next logging is shown:

       

      11:14:20,167 INFO  [org.jboss.ws.cxf.metadata] (MSC service thread 1-5) JBWS024061: Adding service endpoint metadata: id=org.switchyard.component.soap.endpoint.BaseWebService
       address=http://localhost:8080/dossier-service-0.0.1-SNAPSHOT/BaseWebService
       implementor=org.switchyard.component.soap.endpoint.BaseWebService
       serviceName={http://endpoint.soap.component.switchyard.org/}BaseWebServiceService
       portName={http://endpoint.soap.component.switchyard.org/}BaseWebServicePort
       annotationWsdlLocation=null
       wsdlLocationOverride=null
       mtomEnabled=false
      

       

      Why is the BaseWebService deployed, and not my configured webservice?

       

      Thanks in advance, Tinie

        • 1. Re: Configured soap service not deployed but BaseWebService
          tsluijter

          Solved the problem.

           

          In the pom.xml existed plugin maven-war-plugin:

           

          <plugin>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
              <!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
              <failOnMissingWebXml>false</failOnMissingWebXml>
              <warName>DossierService</warName>
              <packagingExcludes>WEB-INF/classes/META-INF/</packagingExcludes>
              <webResources>
                <resource>
                  <directory>target/classes/META-INF</directory>
                  <targetPath>WEB-INF</targetPath>
                  <includes>
                    <include>switchyard.xml</include>
                  </includes>
                </resource>
              </webResources>
            </configuration>
          </plugin>
          

           

          What it missed was the include of beans.xml beneath switchyard.xml.

          • 2. Re: Configured soap service not deployed but BaseWebService
            amitg.gulhane

            Hi,

            I tried the above solution however webservice is getting deployed wrongly with basewebservice only...

             

            Please help with the same...