Examples of WSIFService


Examples of org.apache.wsif.WSIFService

        Service service = WSIFUtils.selectService(def, serviceNS, serviceName);
        PortType portType = WSIFUtils.selectPortType(def, portTypeNS, portTypeName);

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService dpf = factory.getService(def, service, portType);
        WSIFPort port = (portName == null) ? dpf.getPort() : dpf.getPort(portName);

        System.out.println("HeadersTest executing getQuote for \"\"" + operationName);
        WSIFOperation operation =
            port.createOperation("getQuote", inputName, outputName);
        WSIFMessage input = operation.createInputMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

    protected void setUp() {
    }

    public void testJava() throws Exception {
        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(wsdl, null, null, null, null);

        WSIFPort port = service.getPort();

        WSIFOperation operation;
        WSIFMessage inputMessage;
        WSIFMessage outputMessage;
        WSIFMessage faultMessage;
View Full Code Here

Examples of org.apache.wsif.WSIFService

        if (!TestUtilities.areWeTesting("jms"))
            return;

        try {
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
            WSIFService service =
                factory.getService(
                    wsdlLocation,
                    null,
                    null,
                    "http://jms/",
                    "JmsFault");

            WSIFPort port = service.getPort("default");
            WSIFOperation operation = port.createOperation(method);

            WSIFMessage inputMessage = operation.createInputMessage();
            inputMessage.setIntPart("choice",choice);
            WSIFMessage outputMessage = operation.createOutputMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

            // create a service factory
            WSIFServiceFactory factory = WSIFServiceFactory.newInstance();

            // parse WSDL
            WSIFService service =
                factory.getService(
                    args[0],
                    null,
                    null,
                    "http://www.themindelectric.com/wsdl/net.xmethods.services.stockquote.StockQuote/",
                    "net.xmethods.services.stockquote.StockQuotePortType");
            // create the stub
      // check if the user specified a preferred port
            NetXmethodsServicesStockquoteStockQuotePortType stub = null;
      if (args[2]!=null)
    stub = (NetXmethodsServicesStockquoteStockQuotePortType)
        service.getStub(args[2],NetXmethodsServicesStockquoteStockQuotePortType.class);
      else
    stub = (NetXmethodsServicesStockquoteStockQuotePortType)
        service.getStub(NetXmethodsServicesStockquoteStockQuotePortType.class);

            // do the invocation
            // args[1] is the company symbol
            float quote = stub.getQuote(args[1]);
            System.out.println(quote);
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://webservices.eraserver.net/",
          "ZipCodeResolverSoap");

      WSIFPort port = service.getPort(portName);

      WSIFOperation operation = port.createOperation("ShortZipCode");

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://webservices.eraserver.net/",
          "ZipCodeResolverSoap");

            service.mapType(
               new javax.xml.namespace.QName(
                   "http://webservices.eraserver.net/",
                   "ShortZipCode"),
               ShortZipCode.class );
            service.mapType(
               new javax.xml.namespace.QName(
                   "http://webservices.eraserver.net/",
                   "ShortZipCodeResponse"),
               ShortZipCodeResponse.class );

      WSIFPort port = service.getPort(portName);

      WSIFOperation operation = port.createOperation("ShortZipCode");

      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://webservices.eraserver.net/",
          "ZipCodeResolverSoap");

            ZipCodeResolverSoap stub = (ZipCodeResolverSoap) service.getStub(portName, ZipCodeResolverSoap.class);

            String zipcode = stub.ShortZipCode( "9999", "607 Trinity", "Austin", "TX" );
      assertTrue("wrong zipcode: " + zipcode + "!!", "78701".equals(zipcode));

    } catch (Exception ex) {
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://webservices.eraserver.net/",
          "ZipCodeResolverSoap");

            //TODO: its a bug that these mapTypes are needed with wrapped operation stubs
            service.mapType(
               new javax.xml.namespace.QName(
                   "http://webservices.eraserver.net/",
                   "ShortZipCode"),
               ShortZipCode.class );
            service.mapType(
               new javax.xml.namespace.QName(
                   "http://webservices.eraserver.net/",
                   "ShortZipCodeResponse"),
               ShortZipCodeResponse.class );

            ShortZipCode zc = new ShortZipCode();
            zc.setAccessCode("9999");
            zc.setAddress("607 Trinity");
            zc.setCity("Austin");
            zc.setState("TX");

            docStyle.zipCodeNW.ZipCodeResolverSoap stub = (docStyle.zipCodeNW.ZipCodeResolverSoap) service.getStub(portName, docStyle.zipCodeNW.ZipCodeResolverSoap.class);

            ShortZipCodeResponse zcResp = stub.shortZipCode(zc);

            String s = zcResp.getShortZipCodeResult();
      assertTrue("wrong zipcode: " + s + "!!", "78701".equals(s));
View Full Code Here

Examples of org.apache.wsif.WSIFService

    TestUtilities.setProviderForProtocol(protocol);

    try {
      WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
      WSIFService service =
        factory.getService(
          wsdlLocation,
          null,
          null,
          "http://webservices.eraserver.net/",
          "ZipCodeResolverSoap");

      WSIFPort port = service.getPort(portName);
      WSIFOperation operation = port.createOperation("ShortZipCode");
      WSIFMessage inMsg = operation.createInputMessage();
      WSIFMessage outMsg = operation.createOutputMessage();
      WSIFMessage faultMsg = operation.createFaultMessage();
View Full Code Here

Examples of org.apache.wsif.WSIFService

            }
        }
        PortType portType = WSIFUtils.selectPortType(def, portTypeNS, portTypeName);

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService dpf = factory.getService(def, service, portType);
        WSIFPort port = null;
        if (portName == null)
            port = dpf.getPort();
        else
            port = dpf.getPort(portName);

        if (inputName == null && outputName == null) {
            // retrieve list of operations
            List operationList = portType.getOperations();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.