I'm having an issue doing an HTTP post to a .NET application. The error that I get is below, I'm curious to know if anyone has seen an error like this before. It's obviously a .NET error.
Error while dispatching hrxml [ Server was unable to process request. ---> Procedure 'sp__LogMessage' expects parameter '@pi_ClientID', which was not supplied. at System.Web.Services.Protoc
ols.SoapHt
tpClientPr
otocol.Rea
dResponse(
SoapClient
Message message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protoc
ols.SoapHt
tpClientPr
otocol.Inv
oke(String
methodName, Object[] parameters) at DispatchService.HRISMessag
eRouter.Me
ssageRoute
r.Route(St
ring HRXML) at DispatchService.DispatchMe
ssage.Disp
atch(Strin
g HRXML)]
The java code that I'm using is below. I noticed that if I change the setRequestProperty I get different errors. Anyone have any ideas as to what .NET expects? The people who own the web server, aren't able to access their logs for some reason. They do have a test tool that uses HTML, but I haven't been able to find the right combination for setRequestProperty, of course I'm assuming that's the issue but I don't know at this point. Thanks in advance
***JAVA CODE***
try{
URL url;
DataOutputStream printout;
URLConnection urlConn;
DataInputStream input;
StringBuffer buf = new StringBuffer();
String var2 = (String)getVariableData("V
ariable_2"
);
url = new URL("
https://theurl.asp");
urlConn = url.openConnection();
urlConn.setDoInput (true);
urlConn.setDoOutput (true);
urlConn.setUseCaches (false);
urlConn.setAllowUserIntera
ction(fals
e);
//urlConn.setRequestProper
ty("Conten
t-type", "text/xml; charset=" + "UTF-8");
//urlConn.setRequestProper
ty("Conten
t-Type", "application/x-www-form-ur
lencoded")
;
//urlConn.setRequestProper
ty("Cache-
Control", "no-cache");
printout = new DataOutputStream (urlConn.getOutputStream ());
String content = var2;
printout = new DataOutputStream (urlConn.getOutputStream ());
printout.writeBytes (content);
printout.flush ();
printout.close ();
input = new DataInputStream (urlConn.getInputStream ());
String str;
while (null != ((str = input.readLine())))
{
buf.append(str);
}
input.close();
System.out.println("This is the return--: " + buf.toString());
}
catch(Exception e){
addAuditTrailEntry("SOMETH
ING BAD: " + e);
}
***END OF JAVA CODE****
****HTML TEST TOOL***
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-><HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY>
<font color = green size = 5><B><U>Staging</U></B> </font>
<BR>
<font color = blue size = 6>Interface for integrations</font>
<B>
https://something.asp</
B>
<FORM action="
https://something.asp"
method=post>
<P><STRONG>Paste test XML here:</STRONG>
<P>
<P><TEXTAREA name=HRXMLDOC rows=20 cols=100></TEXTAREA> </P>
<P><INPUT type=submit value="Submit Query"></FORM></P></BODY><
/HTML>
***END HTML***
Start Free Trial