001 package railo.runtime.functions.xml; 002 003 import railo.runtime.PageContext; 004 import railo.runtime.exp.FunctionException; 005 import railo.runtime.exp.PageException; 006 import railo.runtime.ext.function.Function; 007 import railo.runtime.net.rpc.AxisUtil; 008 import railo.runtime.net.rpc.client.RPCClient; 009 import railo.runtime.op.Caster; 010 011 /** 012 * 013 */ 014 public final class GetSOAPRequest implements Function { 015 016 private static final long serialVersionUID = -1743528432690118148L; 017 018 public static Object call(PageContext pc) throws PageException { 019 return call(pc, null); 020 } 021 public static Object call(PageContext pc, Object webservice) throws PageException { 022 if(webservice!=null && !(webservice instanceof RPCClient)) 023 throw new FunctionException(pc, "getSOAPRequest", 1, "webservice", "value must be a webservice Object generated with createObject/<cfobject>"); 024 025 try { 026 return AxisUtil.getSOAPRequest((RPCClient) webservice); 027 } 028 catch (Exception e) { 029 throw Caster.toPageException(e); 030 } 031 032 } 033 }