/** * This method initializes jTextField12 * * @return JTextField */ private JTextField getJTextField12() { if(jTextField12 == null) { jTextField12 = new JTextField(); jTextField12.setBounds(138, 16, 202, 16); jTextField12.setFont(new java.awt.Font("sansserif", 1, 10)); jTextField12.setText(ClientScenario.getServicePort()); } return jTextField12; } } // @jve:visual-info decl-index=0 visual-constraint="0,0"
/** * This method initializes jTextField12 * * @return JTextField */ private JTextField getJTextField12() { if(jTextField12 == null) { jTextField12 = new JTextField(); jTextField12.setBounds(138, 16, 202, 16); jTextField12.setFont(new java.awt.Font("sansserif", 1, 10)); jTextField12.setText(ClientScenario.getServicePort()); } return jTextField12; } } // @jve:visual-info decl-index=0 visual-constraint="0,0"
/** * This method initializes jTextField12 * * @return JTextField */ private JTextField getJTextField12() { if(jTextField12 == null) { jTextField12 = new JTextField(); jTextField12.setBounds(138, 16, 202, 16); jTextField12.setFont(new java.awt.Font("sansserif", 1, 10)); jTextField12.setText(ClientScenario.getServicePort()); } return jTextField12; } } // @jve:visual-info decl-index=0 visual-constraint="0,0"
/** * Get a web services port that represents the Trade services. * First try JSR 109 lookup, then fall back on error to JSR 101. * * @return Trade Services Interface * @exception javax.xml.rpc.ServiceException if accessing the service or * port fails. * @exception java.net.MalformedURLException if an invalid URL is obtained. */ protected static TradeWSServices getTrade() throws javax.xml.rpc.ServiceException, java.net.MalformedURLException { TradeWSServices trade; // JSR 109 lookup try { InitialContext context = new InitialContext(); Trade tradeService1 = (Trade)context.lookup(jndiName); trade = tradeService1.getTradeWSServices(); } catch (Exception e) { System.out.println("JSR 109 lookup failed .. defaulting to JSR 101"); // JSR 101 lookup URL wsdlLoc = new URL(getServicePort()); QName serviceName = new QName("http://daytrader.samples.geronimo.apache.org", "Trade"); Service tService = ServiceFactory.newInstance().createService(wsdlLoc, serviceName); QName portName = new QName("http://daytrader.samples.geronimo.apache.org", "TradeWSServices"); trade = (TradeWSServices)tService.getPort(portName, TradeWSServices.class); } ((Stub)trade)._setProperty("javax.xml.rpc.service.endpoint.address", getServicePort()); return trade; }
/** * Get a web services port that represents the Trade services. * First try JSR 109 lookup, then fall back on error to JSR 101. * * @return Trade Services Interface * @exception javax.xml.rpc.ServiceException if accessing the service or * port fails. * @exception java.net.MalformedURLException if an invalid URL is obtained. */ protected static TradeWSServices getTrade() throws javax.xml.rpc.ServiceException, java.net.MalformedURLException { TradeWSServices trade; // JSR 109 lookup try { InitialContext context = new InitialContext(); Trade tradeService1 = (Trade)context.lookup(jndiName); trade = tradeService1.getTradeWSServices(); } catch (Exception e) { System.out.println("JSR 109 lookup failed .. defaulting to JSR 101"); // JSR 101 lookup URL wsdlLoc = new URL(getServicePort()); QName serviceName = new QName("http://daytrader.samples.geronimo.apache.org", "Trade"); Service tService = ServiceFactory.newInstance().createService(wsdlLoc, serviceName); QName portName = new QName("http://daytrader.samples.geronimo.apache.org", "TradeWSServices"); trade = (TradeWSServices)tService.getPort(portName, TradeWSServices.class); } ((Stub)trade)._setProperty("javax.xml.rpc.service.endpoint.address", getServicePort()); return trade; }
/** * Get a web services port that represents the Trade services. * First try JSR 109 lookup, then fall back on error to JSR 101. * * @return Trade Services Interface * @exception javax.xml.rpc.ServiceException if accessing the service or * port fails. * @exception java.net.MalformedURLException if an invalid URL is obtained. */ protected static TradeWSServices getTrade() throws javax.xml.rpc.ServiceException, java.net.MalformedURLException { TradeWSServices trade; // JSR 109 lookup try { InitialContext context = new InitialContext(); Trade tradeService1 = (Trade)context.lookup(jndiName); trade = tradeService1.getTradeWSServices(); } catch (Exception e) { System.out.println("JSR 109 lookup failed .. defaulting to JSR 101"); // JSR 101 lookup URL wsdlLoc = new URL(getServicePort()); QName serviceName = new QName("http://daytrader.samples.geronimo.apache.org", "Trade"); Service tService = ServiceFactory.newInstance().createService(wsdlLoc, serviceName); QName portName = new QName("http://daytrader.samples.geronimo.apache.org", "TradeWSServices"); trade = (TradeWSServices)tService.getPort(portName, TradeWSServices.class); } ((Stub)trade)._setProperty("javax.xml.rpc.service.endpoint.address", getServicePort()); return trade; }