background image

The Arguments Field

<< Building the Programs | Attachments Example >>
<< Building the Programs | Attachments Example >>

The Arguments Field

6. In the Arguments field, type the following:
domsrc.xml
7. Click OK.
8. Right-click the project and choose Run Project.
To run the examples using Ant, go to the directory
tut-install/javaeetutorial5/examples/saaj/dom/.
To run DOMExample using Ant, use the following command:
ant run-dom -Dxml-file=slide.xml
To run DOMSrcExample using Ant, use the following command:
ant run-domsrc -Dxml-file=domsrc.xml
When you run DOMExample using the file slide.xml, you will see output that begins like the
following:
Running DOMExample.
Name is slideshow
Attribute name is author
Attribute value is Yours Truly
Attribute name is date
Attribute value is Date of publication
Attribute name is title
Attribute value is Sample Slide Show
Content is:
...
When you run DOMSrcExample using the file domsrc.xml, you will see output that begins like
the following:
Running DOMSrcExample.
Header contents:
Content is:
Name is {http://gizmos.com/NSURI}orderDesk
Attribute name is SOAP-ENV:actor
Attribute value is http://gizmos.com/orders
Content is:
...
If you run DOMSrcExample with the file slide.xml, you will see runtime errors.
Code Examples
Chapter 19 · SOAP with Attachments API for Java
621