Avatar of jhughes4
jhughes4 asked on

Issue trying to post to a .NET application through HTTPS

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.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at DispatchService.HRISMessageRouter.MessageRouter.Route(String HRXML) at DispatchService.DispatchMessage.Dispatch(String 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("Variable_2");                                          
                             
      url = new URL("https://theurl.asp");                          
     urlConn = url.openConnection();    
     
urlConn.setDoInput (true);                        
urlConn.setDoOutput (true);                        
urlConn.setUseCaches (false);        
urlConn.setAllowUserInteraction(false);        
//urlConn.setRequestProperty("Content-type", "text/xml; charset=" + "UTF-8");            
//urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");      
//urlConn.setRequestProperty("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("SOMETHING 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***
Java.NET ProgrammingJava EE

Avatar of undefined
Last Comment
Mick Barry

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mick Barry

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
jhughes4

I was able to verify that I'm sending all the necessary data with the XML.  I even took their XML and hard-coded it.  I can take that same XML and put it into the HTML page and it works fine.
SOLUTION
Mick Barry

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck