troubleshooting Question

Issue trying to post to a .NET application through HTTPS

Avatar of jhughes4
jhughes4 asked on
Java.NET ProgrammingJava EE
3 Comments1 Solution506 ViewsLast Modified:
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***
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros