Advertisement

05.21.2008 at 07:48PM PDT, ID: 23423143
[x]
Attachment Details

Issue trying to post to a .NET application through HTTPS

Asked by jhughes4 in Java Programming Language, .NET, J2EE

Tags: Sun, Java, 1.5

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***
Start Free Trial
 
 
[+][-]05.21.2008 at 08:13PM PDT, ID: 21620620

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Programming Language, .NET, J2EE
Tags: Sun, Java, 1.5
Sign Up Now!
Solution Provided By: objects
Participating Experts: 1
Solution Grade: B
 
 
[+][-]05.21.2008 at 08:34PM PDT, ID: 21620706

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 08:39PM PDT, ID: 21620715

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628