⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addressbookadbclient.java

📁 关于字符串的转换,格式方面的转换程序,可以用来在程序中的转换
💻 JAVA
字号:
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */package sample.addressbook.adbclient;import sample.addressbook.stub.AddressBookServiceStub;public class AddressBookADBClient {    private static String URL = "http://127.0.0.1:8080/axis2/services/AddressBookService";    public static void main(String[] args) {        try {            AddressBookServiceStub stub;            if (args != null && args.length != 0) {                stub = new AddressBookServiceStub(args[0]);                            } else {                stub = new AddressBookServiceStub(URL);            }                        AddressBookServiceStub.AddEntry addEntry = new AddressBookServiceStub.AddEntry();            AddressBookServiceStub.Entry entry = new AddressBookServiceStub.Entry();                        entry.setName("Abby Cadabby");            entry.setStreet("Sesame Street");            entry.setCity("Sesame City");            entry.setState("Sesame State");            entry.setPostalCode("11111");                        addEntry.setParam0(entry);            stub.addEntry(addEntry);                        AddressBookServiceStub.FindEntry findEntry = new AddressBookServiceStub.FindEntry();                        findEntry.setParam0("Abby Cadabby");                        AddressBookServiceStub.FindEntryResponse response = stub.findEntry(findEntry);            AddressBookServiceStub.Entry responseEntry = response.get_return();                        System.out.println("Name   :" + responseEntry.getName());            System.out.println("Street :" + responseEntry.getStreet());            System.out.println("City   :" + responseEntry.getCity());            System.out.println("State  :" + responseEntry.getState());            System.out.println("Postal Code :" + responseEntry.getPostalCode());        } catch (Exception ex) {            ex.printStackTrace();        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -