KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > wsdl > faults > FaultServiceSoapBindingImpl


1 /**
2  * FaultServiceSoapBindingImpl.java
3  *
4  * This service always returns an InvalidTcikerFault.
5  *
6  * Author: Tom Jordahl (tomj@macromedia.com)
7  */

8
9 package test.wsdl.faults;
10
11 import org.apache.axis.message.MessageElement;
12 import org.apache.axis.utils.XMLUtils;
13
14 public class FaultServiceSoapBindingImpl implements test.wsdl.faults.FaultServicePortType {
15     public float getQuote(java.lang.String JavaDoc tickerSymbol) throws java.rmi.RemoteException JavaDoc, InvalidTickerFaultMessage {
16         throw new InvalidTickerFaultMessage(tickerSymbol);
17     }
18
19     public int throwFault(int a, java.lang.String JavaDoc b, float c) throws java.rmi.RemoteException JavaDoc, test.wsdl.faults.DerivedFault {
20         throw new DerivedFault2(a, b, c);
21     }
22
23     public int throwExtensionFault(java.lang.String JavaDoc description) throws java.rmi.RemoteException JavaDoc, test.wsdl.faults.ExtensionFault {
24         ExtensionType extension = new ExtensionType();
25         try {
26             extension.set_any(new MessageElement[] {new MessageElement(XMLUtils.newDocument().createElementNS(null,description))});
27         } catch (Exception JavaDoc e) {
28             throw new java.rmi.RemoteException JavaDoc(e.getMessage());
29         }
30         throw new ExtensionFault(extension);
31     }
32
33 }
34
Popular Tags