0
내 코드는 HTML 양식의 사용자 입력을 가져 와서 CICS에서이를 통지합니다. 작동하지만 여전히 콘솔에 Invalid forms data was found in the input message
인 오류가 표시됩니다.JCICS - 유효하지 않은 HTML 양식
com.ibm.cics.server.InvalidRequestException: CICS INVREQ Condition(RESP=INVREQ, RESP2=17)
at com.ibm.cics.server.HttpRequest.READ(Native Method)
at com.ibm.cics.server.HttpRequest.getFormField(HttpRequest.java:635)
at com.ibm.cics.server.HttpRequest.getFormField(HttpRequest.java:607)
어떻게 해결할 수 있습니까? 여기에 내 코드
HttpRequest req = HttpRequest.getHttpRequestInstance();
String template = "<form name=\"response\">"
+ "<input type='radio' name='response' value=\"yes\" checked> Investigation needed<br>"
+ "<input type='radio' name='response' value=\"no\"> No investigation needed<br>"
+ "<input type='submit' value='Submit' onclick='clickAlert()'>"
+ "</form>"
+ "<script>function clickAlert() {alert(\"Selection submitted!\");}</script>";
HttpResponse resp = new HttpResponse();
Document doc = new Document();
doc.createText(msg);
doc.appendFromTemplate(template);
resp.setMediaType("text/html");
resp.sendDocument(doc, (short)200, "OK", ASCII);
if (req.getFormField("response") != null){
if (req.getFormField("response").equals("yes")){
t.out.println("SHE0008: Notify teller: Customer requested investigation. Teller please go to " + TELLER_URL);
}else{
t.out.println("No investigation needed");
}
}
다른 CICS 문제처럼 디버깅하는 것이 좋습니다. RESP = INVREQ, RESP2 = 17을 리턴하는 CICS API는 무엇입니까? 해당 API에 대한 [documentation] (https://www.ibm.com/support/knowledgecenter/SSGMCP_5.4.0/reference/commands-api/dfhp4_commandsummary.html)의 문제점은 무엇입니까? 어쩌면 관련 데이터의 일부 표시를 추가하여 코드에서 어떤 일이 벌어지고 있는지 확인할 수 있습니다. – cschneid
'입력 된 메시지에 잘못된 양식 데이터가 있습니다.'라는 메시지가 표시되지만 여전히 작동 중이고 오류가 발생합니다 ... –
자바 스택 추적은 줄 번호를 표시 한 다음 [CICSConditionException] (https : JCICS [javadoc] (https://www.ibm.)를 사용할 수 있습니다. JCICS 클래스를 기본 CICS API [https : // www. com/support/knowledgecenter/SSGMCP_5.4.0/reference/jcics-javadoc/com/ibm/cics/server/package- ibm.com/support/knowledgecenter/SSGMCP_5.4.0/reference/commands-api/dfhp4_commandsummary.html), RESP2 = 17을 조회하십시오. –