
/*
 *  Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
*/
package oracle.jcs.ws.sample.saml.proxy;

import java.io.File;

import java.net.MalformedURLException;
import java.net.URL;

import java.util.logging.Level;
import java.util.logging.Logger;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
// !DO NOT EDIT THIS FILE!
// This source file is generated by Oracle tools
// Contents may be subject to change
// For reporting problems, use the following
// Version = Oracle WebServices (11.1.1.0.0, build 140204.0410.13377)

@WebServiceClient(wsdlLocation="http://localhost:7101/JcsWSSampleApp-SamlTestApp-context-root/HelloWorldService/#%7Bhttp%3A%2F%2Fsaml.sample.ws.jcs.oracle%2F%7DHelloWorldService?wsdl",
  targetNamespace="http://saml.sample.ws.jcs.oracle/", name="HelloWorldService")
public class HelloWorldService
  extends Service
{
  private static URL wsdlLocationURL;

  private static Logger logger;
  static
  {
    try
    {
      logger = Logger.getLogger("oracle.jcs.ws.sample.saml.proxy.HelloWorldService");
      URL baseUrl = HelloWorldService.class.getResource(".");
      if (baseUrl == null)
      {
        wsdlLocationURL =
            HelloWorldService.class.getResource("http://localhost:7101/JcsWSSampleApp-SamlTestApp-context-root/HelloWorldService/#%7Bhttp%3A%2F%2Fsaml.sample.ws.jcs.oracle%2F%7DHelloWorldService?wsdl");
        if (wsdlLocationURL == null)
        {
          baseUrl = new File(".").toURL();
          wsdlLocationURL =
              new URL(baseUrl, "http://localhost:7101/JcsWSSampleApp-SamlTestApp-context-root/HelloWorldService/#%7Bhttp%3A%2F%2Fsaml.sample.ws.jcs.oracle%2F%7DHelloWorldService?wsdl");
        }
      }
      else
      {
                if (!baseUrl.getPath().endsWith("/")) {
         baseUrl = new URL(baseUrl, baseUrl.getPath() + "/");
}
                wsdlLocationURL =
            new URL(baseUrl, "http://localhost:7101/JcsWSSampleApp-SamlTestApp-context-root/HelloWorldService/#%7Bhttp%3A%2F%2Fsaml.sample.ws.jcs.oracle%2F%7DHelloWorldService?wsdl");
      }
    }
    catch (MalformedURLException e)
    {
      logger.log(Level.ALL,
          "Failed to create wsdlLocationURL using http://localhost:7101/JcsWSSampleApp-SamlTestApp-context-root/HelloWorldService/#%7Bhttp%3A%2F%2Fsaml.sample.ws.jcs.oracle%2F%7DHelloWorldService?wsdl",
          e);
    }
  }

  public HelloWorldService()
  {
    super(wsdlLocationURL,
          new QName("http://saml.sample.ws.jcs.oracle/", "HelloWorldService"));
  }

  public HelloWorldService(URL wsdlLocation, QName serviceName)
  {
    super(wsdlLocation, serviceName);
  }

  @WebEndpoint(name="HelloWorldPort")
  public HelloWorld getHelloWorldPort()
  {
    return (HelloWorld) super.getPort(new QName("http://saml.sample.ws.jcs.oracle/",
                                                "HelloWorldPort"),
                                      HelloWorld.class);
  }

  @WebEndpoint(name="HelloWorldPort")
  public HelloWorld getHelloWorldPort(WebServiceFeature... features)
  {
    return (HelloWorld) super.getPort(new QName("http://saml.sample.ws.jcs.oracle/",
                                                "HelloWorldPort"),
                                      HelloWorld.class, features);
  }
}
