Version 7

    A step by step Soap with Attachment (SwA) example


    In this example you will learn how to implement a SEI web service with only one operation.

    This operation receives an attached text file and returns another attached text file.


    JBossWS provides support for WS-I Attachment Profile 1.0, JBossWS4EE does not. Here we will define a rpc/literal web service that JBossWS4EE is supporting. Note that using the Sun's JWSDP1.5 JAX-RPC & SAAJ implementation will throw an exception as literal attachment is not supported yet.


    Today, with the lack of tools, the process is not very friendly. JBoss team will fill the gap soon, but if you need to do it right now, you should find enough information in this page.


    For the impatients

    Steps are:

    • install the Sun's JWSDP

    • write the service implementation + interface

    • write webservice.xml + web.xml

    • write config.xml + generate a wsdl with the jwsdp

    • modify the wsdl

    • generate the jaxrpc-mapping.xml

    • package & deploy your service

    • write and run your client


    You will need to provide jars from the Sun's JWSDP 1.5 and JBossAS see Set up your environment.



    For the others


    Running the Example

    This example is part of the JBoss AS testsuite (_jboss-4.0_home_/testsuite/src/main/org/jboss/test/webservice/attachmentstepbystep).

    To run the webservice's testsuite, launch the all configuration and enter

    build.bat (or .sh) test -Dnojars=true -Dtest=webservice