package com.ann.demo.utils;

import com.alibaba.fastjson.JSONArray;
import com.ann.demo.controller.InterfaceForm;
import com.ann.demo.entity.constant.InterfaceName;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory;

import javax.imageio.stream.FileImageOutputStream;
import java.io.*;
import java.util.Objects;
import java.util.Optional;

/**
 * @Author: LeiJiaXin
 * @Date: 2019/10/10 11:07
 */
public class WebServiceUtils {

    Object[] objects = null;

    public static Object[] connect(String path) throws Exception {
        JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
        Client client = dcf.createClient("http://10.6.0.224/cdms/cdmsservice.asmx?wsdl");
        Object[] objects = new Object[0];
        try {
            // invoke("方法名",参数1,参数2,参数3....);
            return objects = client.invoke("GetImageStream", path);
        } catch (Exception e) {
            return null;
        }
    }

}
