1 29 30 package com.caucho.soap.service; 31 32 import com.caucho.soap.reflect.WebServiceIntrospector; 33 import com.caucho.soap.skeleton.DirectSkeleton; 34 35 import javax.xml.bind.JAXBException; 36 import javax.xml.stream.XMLStreamException; 37 import java.io.IOException ; 38 import java.lang.reflect.InvocationHandler ; 39 import java.lang.reflect.Method ; 40 import java.net.MalformedURLException ; 41 42 public class ServiceImplInvocationHandler implements InvocationHandler 43 { 44 private Class _api; 45 private DirectSkeleton _skeleton; 46 private String _url; 47 48 public ServiceImplInvocationHandler(Class api, String url) 49 throws com.caucho.config.ConfigException, JAXBException 50 { 51 _api = api; 52 _url = url; 53 _skeleton = new WebServiceIntrospector().introspect(api, url); 54 } 55 56 public Object invoke(Object proxy, Method method, Object [] args) 57 throws IOException , XMLStreamException, MalformedURLException , JAXBException 58 { 59 Object ret = _skeleton.invoke(method, _url, args); 60 61 return ret == null ? new Integer (12) : ret; 62 } 63 } 64 | Popular Tags |