코드를 받고 있지 않다 :.NET에서 Java 웹 서비스를 사용하려고합니다. 내가 적절한 출력을
public static void main(String[] args) {
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the BookName:");
String bookName = br.readLine();
System.out.println("Book Id is: " +bookInfo(bookName).getBookAvail().get(0).getBookID().toString());
System.out.println("Book Name is: " +bookInfo(bookName).getBookAvail().get(0).getBookName().toString());
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the StudentID:");
String studentID = br.readLine();
System.out.println("Student Information is: " +studentInfo(studentID));
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
private static ArrayOfBookAvail bookInfo(java.lang.String bookName) {
org.tempuri.BookService service = new org.tempuri.BookService();
org.tempuri.IBookService port = service.getBasicHttpBindingIBookService();
return port.bookInfo(bookName);
}
private static ArrayOfStudInfo studentInfo(java.lang.String studentID) {
org.tempuri.BookService service = new org.tempuri.BookService();
org.tempuri.IBookService port = service.getBasicHttpBindingIBookService();
return port.studentInfo(studentID);
}
}
을하고 난 점점 오전 출력은 다음과 같습니다
Enter the BookName:
Core Servlets and JavaServer Pages, Volume 2:Advanced Technologies
Book Id is: [email protected]
Enter the StudentID:
13MCAL058
Student Information is: [email protected]
것은 적절한 출력을 얻을 도와주세요. 미리 감사드립니다. bookInfo(bookName).getBookAvail().get(0).getBookID()
가 JAXBElement
을 반환처럼
예상되는 출력은 무엇입니까? 코드를 단순화 할 수 있습니까? 읽을 것이 많습니다 – orhanhenrik
무슨 오류입니까? 그것은 그것을 오버라이드하지 않은 클래스에서 전형적인'toString'처럼 보입니다. – Makoto
그건 그렇고, 여기에 어떤 .NET 코드도 보이지 않습니다. – ForNeVeR