FileDocCategorySizeDatePackage
Service.javaAPI DocApache Axis 1.44039Sat Apr 22 18:57:26 BST 2006test.RPCDispatch

Service

public class Service extends Object
Test WebService

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringargAsDOM(Data input)
Return the target service (should be this!)


       // get the first parameter
       Message message = MessageContext.getCurrentContext().getRequestMessage();
       RPCElement body = (RPCElement)message.getSOAPEnvelope().getFirstBody();
       NodeList parms = body.getAsDOM().getChildNodes();
       Node parm1 = null;
       for (int i=0; i<parms.getLength(); i++) {
           parm1 = parms.item(i);
           if (parm1.getNodeType() == Node.ELEMENT_NODE) break;
       }

       // convert it to a DOM and back to a string, and return the result.
       return DOM2Writer.nodeToString(parm1, true);

    
public voidarrayMethod(java.lang.String[] arg)
Echo a string array (this is for testing that String->String[] conversions do NOT happen when using encoded arrays)

        throw new AxisFault("You shouldn't have called me!");
    
public java.lang.Stringconcatenate(java.lang.String a1, java.lang.String a2)
Concatenate two strings - used to test out-of-order parameter matching.

        return a1 + a2;
    
public java.lang.IntegerechoInt(java.lang.Integer value)
Return the value passed (including nulls!)

       return value;
    
public intoverloaded(int i)
Return the int passed in (this and the function above test overloaded method dispatch)

        return i;
    
public java.lang.Stringoverloaded(int i, java.lang.String s)
Return the int and String arguments concatenated

        return i + s;
    
public java.lang.Stringoverloaded(boolean b, java.lang.String s)
Return the boolean and String arguments concatenated

        return b + s;
    
public java.lang.Stringoverloaded(java.lang.String s, boolean b)
Return the String and boolean arguments concatenated

        return s + b;
    
public booleanoverloaded(boolean b)
Return the boolean value passed in

        return b;
    
public DatareverseData(Data input)
Reverse the order of a struct

       Data result = new Data();
       result.setField1(input.getField3());
       result.setField2(reverseString(input.getField2()));
       result.setField3(input.getField1());
       return result;
    
public java.lang.StringreverseString(java.lang.String input)
Reverse the order of characters in a string

       String result = "";
       for (int i=input.length(); i>0; ) result+=input.charAt(--i);
       return result;
    
public java.lang.StringsimpleFault(java.lang.String value)
Simple fault.

       TestFault fault = new TestFault(value);
       throw fault;
    
public java.lang.StringtargetServiceImplicit()
Return the target service (should be this!)

       return MessageContext.getCurrentContext().getTargetService();
    
public java.lang.BooleantestBoolean(java.lang.Boolean b)
Return the Boolean value passed in

        return b;
    
public java.lang.DoubletestDouble(java.lang.Double b)
Return the Double value passed in

        return b;
    
public java.lang.FloattestFloat(java.lang.Float b)
Return the Float value passed in

        return b;