Java VB.net service reference halfway

Main.java


package main;

import data.Request;
import data.Response;

public class Main {

	public static void main(String[] args) {

		Request request = new Request();
		Response response = new Response();

		request.setFromDate("201807301201");
		request.setToDate("201809301201");
		response = request.setDB();

		for (int i = 0; i < response.date.size(); i++) {
			System.out.print(response.date.get(i) + " ");
			System.out.println(response.photo.get(i));
		}
	}
}

DbAccess.java


package db;

import java.sql.*;

import data.Response;

public class DbAccess {

	public Response dbAccess(String fromDate, String toDate)
			throws SQLException {

		Response response = new Response();

		Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521", "test", "test");
		Statement stmt = conn.createStatement();
		String sqlString = "select * from PICT where REGISTERDATE BETWEEN " + fromDate + " and " + toDate;
		ResultSet rset = stmt.executeQuery(sqlString);

		while (rset.next()) {
			String date =rset.getString(1);
			response.setDate(date);
			String photo = rset.getString(2);
			response.setPhote(photo);

		}
		rset.close();
		stmt.close();
		conn.close();

		return response;
	}
}

Request.java


package data;

import java.sql.SQLException;
import db.DbAccess;

public class Request {

	private String fromDate;
	private String toDate;

	public void setFromDate(String fromDate) {

		this.fromDate = fromDate;
	}

	public void setToDate(String toDate) {

		this.toDate = toDate;
	}

	public Response setDB() {

		Response response = new Response();
		DbAccess dbAccess = new DbAccess();

		try {

			response = dbAccess.dbAccess(fromDate, toDate);

		} catch (SQLException e) {
			System.out.println(e);
		} finally {

		}

		return response;

	}
}

Response.java


package data;

import java.util.ArrayList;

public class Response {

	public ArrayList<String> date = new ArrayList<String>();
	public ArrayList<String> photo = new ArrayList<String>();

	public void setDate(String date) {
		this.date.add(date);
	}

	public void setPhote(String photo) {
		this.photo.add(photo);
	}

}

Axis2 Tomcat crashes when adding service reference on VB side

[WARN] triggerActionNotSupportedFault: messageContext: [MessageContext: logID=urn:uuid:] problemAction: http://schemas.xmlsoap.org/ws/2004/09/transfer/Get [WARN] triggerActionNotSupportedFault: messageContext: [MessageContext: logID=urn:uuid:] problemAction: http://schemas.xmlsoap.org/ws/2004/09/transfer/Get [ERROR] The [action] cannot be processed at the receiver.

Recommended Posts

Java VB.net service reference halfway
Java8 method reference
java8 method reference
JAVA reference materials
My Java reference
Basic data types and reference types (Java)
Java primitive types, reference types, Immutable, Mutable
Java reference mechanism (stack and heap)
Java array variables are reference types
Java pass by value and pass by reference
[Java] Reference / update of Active Directory
About Java primitive types and reference types
Java "pass by reference" problem summary
Java basic data types and reference types
Using proxy service with Java crawling