當前位置: 首頁>>代碼示例>>Java>>正文


Java Person類代碼示例

本文整理匯總了Java中com.codenotfound.types.helloworld.Person的典型用法代碼示例。如果您正苦於以下問題:Java Person類的具體用法?Java Person怎麽用?Java Person使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Person類屬於com.codenotfound.types.helloworld包,在下文中一共展示了Person類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: sayHello

import com.codenotfound.types.helloworld.Person; //導入依賴的package包/類
public String sayHello(String firstName, String lastName) {

        ObjectFactory factory = new ObjectFactory();
        Person person = factory.createPerson();

        person.setFirstName(firstName);
        person.setLastName(lastName);

        LOGGER.info("Client sending person=[firstName:{},lastName:{}]",
                person.getFirstName(), person.getLastName());

        Greeting greeting = (Greeting) helloWorldClientProxyBean
                .sayHello(person);

        LOGGER.info("Client received greeting=[{}]",
                greeting.getGreeting());
        return greeting.getGreeting();
    }
 
開發者ID:code-not-found,項目名稱:jaxws-cxf,代碼行數:19,代碼來源:HelloWorldClient.java

示例2: sayHello

import com.codenotfound.types.helloworld.Person; //導入依賴的package包/類
@Override
public Greeting sayHello(Person request) {
    LOGGER.info(
            "Endpoint received person=[firstName:{},lastName:{}]",
            request.getFirstName(), request.getLastName());

    String greeting = "Hello " + request.getFirstName() + " "
            + request.getLastName() + "!";

    ObjectFactory factory = new ObjectFactory();
    Greeting response = factory.createGreeting();
    response.setGreeting(greeting);

    LOGGER.info("Endpoint sending greeting=[{}]",
            response.getGreeting());
    return response;
}
 
開發者ID:code-not-found,項目名稱:jaxws-cxf,代碼行數:18,代碼來源:HelloWorldImpl.java

示例3: sayHello

import com.codenotfound.types.helloworld.Person; //導入依賴的package包/類
public String sayHello(String firstName, String lastName) {

    ObjectFactory factory = new ObjectFactory();
    Person person = factory.createPerson();
    person.setFirstName(firstName);
    person.setLastName(lastName);

    Greeting response = helloWorldProxy.sayHello(person);

    return response.getGreeting();
  }
 
開發者ID:code-not-found,項目名稱:cxf-jaxws,代碼行數:12,代碼來源:HelloWorldClient.java

示例4: sayHello

import com.codenotfound.types.helloworld.Person; //導入依賴的package包/類
@Override
public Greeting sayHello(Person request) {
  String greeting = "Hello " + request.getFirstName() + " "
      + request.getLastName() + "!";

  ObjectFactory factory = new ObjectFactory();
  Greeting response = factory.createGreeting();
  response.setGreeting(greeting);

  return response;
}
 
開發者ID:code-not-found,項目名稱:cxf-jaxws,代碼行數:12,代碼來源:HelloWorldImpl.java

示例5: sayHello

import com.codenotfound.types.helloworld.Person; //導入依賴的package包/類
public String sayHello(String firstName, String lastName) {
  ObjectFactory factory = new ObjectFactory();
  Person person = factory.createPerson();

  person.setFirstName(firstName);
  person.setLastName(lastName);

  LOGGER.info("Client sending person[firstName={},lastName={}]", person.getFirstName(),
      person.getLastName());

  Greeting greeting = (Greeting) webServiceTemplate.marshalSendAndReceive(person);

  LOGGER.info("Client received greeting='{}'", greeting.getGreeting());
  return greeting.getGreeting();
}
 
開發者ID:code-not-found,項目名稱:spring-ws,代碼行數:16,代碼來源:HelloWorldClient.java

示例6: sayHello

import com.codenotfound.types.helloworld.Person; //導入依賴的package包/類
@PayloadRoot(namespace = "http://codenotfound.com/types/helloworld", localPart = "person")
@ResponsePayload
public Greeting sayHello(@RequestPayload Person request) {
  LOGGER.info("Endpoint received person[firstName={},lastName={}]", request.getFirstName(),
      request.getLastName());

  String greeting = "Hello " + request.getFirstName() + " " + request.getLastName() + "!";

  ObjectFactory factory = new ObjectFactory();
  Greeting response = factory.createGreeting();
  response.setGreeting(greeting);

  LOGGER.info("Endpoint sending greeting='{}'", response.getGreeting());
  return response;
}
 
開發者ID:code-not-found,項目名稱:spring-ws,代碼行數:16,代碼來源:HelloWorldEndpoint.java


注:本文中的com.codenotfound.types.helloworld.Person類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。