File: testit.sh

package info (click to toggle)
xml-soap 2.2-6
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 2,492 kB
  • ctags: 1,934
  • sloc: java: 15,895; xml: 740; jsp: 580; cpp: 561; sh: 235; makefile: 127
file content (80 lines) | stat: -rwxr-xr-x 3,503 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh
export URL=http://localhost:8080/soap/servlet/rpcrouter
#export URL=http://localhost:8081/soap/servlet/rpcrouter

export BASEDIR=$HOME/projects/soap/build/samples/mime

echo This test assumes a server URL of:
echo  $URL
echo This test assumes that the server has access to a directory containing
echo the sample files foo.txt, infile.txt and fields.gif:
echo  $BASEDIR
echo Edit this file if the above parameters are incorrect.

echo ------------------------------------------------------------------------
echo Deploying the sample MIME service...
echo .
java org.apache.soap.server.ServiceManagerClient $URL deploy DeploymentDescriptor.xml

echo ------------------------------------------------------------------------
echo "Verifying that it's there..."
echo .
java org.apache.soap.server.ServiceManagerClient $URL list

echo ------------------------------------------------------------------------
echo Sending a small text file \(foo.txt\) as an attachment parameter.
echo This should return details about the file.
echo .
java samples.mime.MimeTestClient $URL sendFile foo.txt

echo ------------------------------------------------------------------------
echo Looping a binary file \(fields.gif\) as an attachment parameter.
echo This should return the exact same file as the response.
echo .
java samples.mime.MimeTestClient $URL loopFile fields.gif

echo ------------------------------------------------------------------------
echo Retrieving a text file with international characters \(infile.txt\) and
echo a binary file \(fields.gif\) from the server as a vector of parameters.
echo .
java samples.mime.MimeTestClient $URL getFileVector $BASEDIR/infile.txt $BASEDIR/fields.gif

echo ------------------------------------------------------------------------
echo Passing a text file with international characters \(infile.txt\) and
echo a binary file \(fields.gif\) as a Vector of attachment parameters. The
echo result should be the same as above.
echo .
java samples.mime.MimeTestClient $URL loopFileVector infile.txt fields.gif

echo ------------------------------------------------------------------------
echo Retrieving a text file with international characters \(infile.txt\) and
echo a binary file \(fields.gif\) from the server as an array of attachment
echo parameters.
echo .
java samples.mime.MimeTestClient $URL getFileArray $BASEDIR/infile.txt $BASEDIR/fields.gif

echo ------------------------------------------------------------------------
echo Passing a text file with international characters \(infile.txt\) and
echo a binary file \(fields.gif\) as an array of attachment parameters. The
echo result should be the same as above.
echo .
java samples.mime.MimeTestClient $URL loopFileArray infile.txt fields.gif

echo ------------------------------------------------------------------------
echo Passing a text file \(foo.txt\) and a binary file \(fields.gif\) as
echo attachments not referred to in the SOAP envelope.
echo .
java samples.mime.MimeTestClient $URL listAttachments foo.txt fields.gif

echo ------------------------------------------------------------------------
echo Undeploying...
echo .
java org.apache.soap.server.ServiceManagerClient $URL undeploy urn:mimetest

echo ------------------------------------------------------------------------
echo "Verifying that it's gone..."
echo .
java org.apache.soap.server.ServiceManagerClient $URL list

echo ------------------------------------------------------------------------
echo "That's all folks!"