}
}
public static WSIFClient createWSIFClient(GlobalContext globalConfiguration,
String serviceURL) throws XregistryException {
WSIFClient client;
try {
if (serviceURL.startsWith("https")) {
boolean useHostKey = true;
if (globalConfiguration == null) {
throw new XregistryException(
"To make Secure WSIF client Global configuration must nor be Null");
}
SoapHttpDynamicInfosetInvoker invoker = createSecureInvoker(globalConfiguration,
useHostKey);
String wsdlAsStr = invoker.invokeHttpGet(serviceURL);
// System.out.println(wsdlAsStr);
XmlElement el = XmlConstants.BUILDER
.parseFragmentFromReader(new StringReader(wsdlAsStr));
WsdlDefinitions def = new WsdlDefinitions(el);
WSIFServiceFactory wsf = WSIFServiceFactory.newInstance();
WSIFService serv = wsf.getService(def);
serv.addLocalProvider(new Provider(invoker));
client = XmlBeansWSIFRuntime.getDefault().newClientFor(serv.getPort());
((XsulSoapPort) client.getPort()).setInvoker(invoker);
// WsdlResolver wsdlResolver = WsdlResolver.getInstance();
// wsdlResolver.setSecureInvoker(invoker);