Mule3.4.0 发布JAXWS WebService
?
?
?
?
import org.mule.api.MuleException;import org.mule.api.MuleMessage;import org.mule.module.client.MuleClient;/** * <p>功能描述,该部分必须以中文句号结尾。<p> * * 创建日期 2013-8-17<br> * @author $Author$<br> * @version $Revision$ $Date$ * @since 3.0.0 */public class MuleClientMain { public static void main(String[] args){ MuleClient client = null; try { client = new MuleClient(true); String url = "http://localhost:9090/hello?wsdl&method=sayHi"; MuleMessage message = client.send(url, "eagle", null); Object obj = message.getPayload(); System.out.println("--------------obj---------"+obj.getClass().getName()); if(obj instanceof String){ System.out.println("---------str--------------"+obj); } } catch (MuleException e) { e.printStackTrace(); }finally{ client.dispose(); } } }?