Link to home
Start Free TrialLog in
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***
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhughes4
jhughes4

ASKER

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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial