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 010 public class AddSOAPRequestHeader implements Function { 011 012 private static final long serialVersionUID = 4305004275924545217L; 013 public static boolean call(PageContext pc, Object client,String nameSpace, String name, Object value) throws PageException { 014 return call(pc, client, nameSpace, name, value,false); 015 } 016 public static boolean call(PageContext pc, Object client,String nameSpace, String name, Object value, boolean mustUnderstand) throws PageException { 017 //if(true)throw new FunctionNotSupported("AddSOAPRequestHeader"); 018 if(!(client instanceof RPCClient)) 019 throw new FunctionException(pc, "addSOAPRequestHeader", 1, "webservice", "value must be a webservice Object generated with createObject/<cfobject>"); 020 021 AxisUtil.addSOAPRequestHeader((RPCClient) client, nameSpace, name, value, mustUnderstand); 022 return true; 023 } 024 }