File: POProcessor.java

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 (27 lines) | stat: -rw-r--r-- 817 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
package samples.messaging;

import java.io.*;
import org.apache.soap.*;
import org.apache.soap.rpc.SOAPContext;
import javax.mail.MessagingException;

/**
 * This class receives the PO via a "purchaseOrder" method and does
 * something with it.
 *
 * @author Sanjiva Weerawarana <sanjiva@watson.ibm.com>
 */
public class POProcessor {
  public void purchaseOrder (Envelope env, SOAPContext reqCtx, 
                                           SOAPContext resCtx)
    throws MessagingException, IOException {
    resCtx.setRootPart("OK thanks, got the PO; we'll contact you when ready.",
        "text/xml");
  }

  public void bustedRequest (Envelope env, SOAPContext reqCtx, 
                                           SOAPContext resCtx)
    throws Exception {
    throw new IllegalArgumentException ("Huh?");
  }
}