Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
 That was the easy way....but you want to learn about developing so let's do it the 'hard' way. First go to the \[Servicemix_binary_distribution_home\]/examples/wsdl-first folder and type mvn install. This example project is using a [Maven 2 plugin|http://servicemix.org/site/maven-jbi-plugin.html] for creating specific JBI components. If you look in the module pom.xml files you will see a special packaging type. After the mvn install completes there will be file called wsdl-first-sa-3.0-incubating-SNAPSHOT-installer in the wsdl-first-sa module's target folder. This is SA for the wsdl-first example project. Now we want to deploy this to our container. The Maven JBI plugin will take care of this for us\!\!\! Note we need to make a small change to the wsdl-first-sa module's pom.xml. The plugin will normally try to install all the shared libraries needed by the SA when running the Maven goal jbi:projectDeploy. This is sometimes useful. But often it causes problems because another SA in Smix is using the shared lib already. In this case the Maven goal will try to remove and redeploy the shared lib from Smix. This causes a problem and will make the SA deployment fail. So to tell the plugin to not do this make the following change in the pom.xml:
<build>
     <plugins>
         <plugin>
            

No Format

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.servicemix.tooling</groupId>

...


            <artifactId>jbi-maven-plugin</artifactId>

...


            <extensions>true</extensions>
        </plugin>
    </plugins>
</build>

into....

...



<build>
    <plugins>
        <plugin>
            <groupId>org.apache.servicemix.tooling</groupId>

...


            <artifactId>jbi-maven-plugin</artifactId>

...


            <extensions>true</extensions>
            <configuration>
                <deployDependencies>false</deployDependencies>
            </configuration>
        </plugin>
    </plugins>
</build>

That little config change will prevent some headaches later.

You are ready to rock. Change directory to the wsdl-first-sa module. Type 'mvn jbi:projectDeploy'. You can watch the Smix console for information on the deployment.

Wiki Markup
&nbsp;Betting that all went well you should be ready to test out the web service you deployed into Smix. Lucky for you a nice little web app has been packaged with the application. In your web browser open the file \[Servicemix_binary_distribution_home\]/examples/wsdl-first/client.html. This static .html page contains a javascript which will try to contact the web service on your local machine. To make it work simply click the 'send' button. If your browser issues any warning make sure you allow the javascript to do what it needs to do. In Firefox I have to 'allow' what it calls an unsafe operation. The results of clikcing the 'send' button will be a SOAP response posted into the right hand text area.

...