+ Start a Discussion
SirTravSirTrav 

does salesforce add anything to a HttpRequest

I am attempting to connect to a program called Fishbowl.  It runs a server off of a computer.  When I make the connection to it I get an error that says "incoming message length invalid, message length 1347375956 bytes"  I can take the xml out of my code and put it into their connection testing tool and it works.  here is my code:

public void connect(){
    HttpRequest req = new HttpRequest();
    req.setEndPoint('http://11.111.111.111:28192');
    
    
    DOM.Document doc = new DOM.Document();
        Dom.XmlNode envelope = doc.createRootElement('FbiXml',null,null);
            dom.XmlNode header2 = envelope.addChildElement('Ticket', null, null);
                dom.XmlNode header3 = header2.addChildElement('Key', null, null);
            dom.XmlNode header1 = envelope.addChildElement('FbiMsgsRq', null, null);
            dom.XmlNode body = header1.addChildElement('LoginRq', null, null);
                body.addChildElement('IAID', null, null).addTextNode('123456');
                body.addChildElement('IAName', null, null).addTextNode('FishbowlKyazmaTest');
                body.addChildElement('IADescription', null, null).addTextNode('his is a test of the connection');
                body.addChildElement('UserName', null, null).addTextNode('admin');
                body.addChildElement('UserPassword', null, null).addTextNode('ISMvKXpXpadDiUoOSoAfww==');
    req.setCompressed(true);
    req.setBodydocument(doc);
    req.setMethod('POST');
    Http http = new Http();
    system.debug(logginglevel.info, '*****req='+req);
    HTTPResponse res = http.send(req);
    System.debug(res.getBody());
}

 Any idea why it would be receiving such a large message?  

MaxPowerForceMaxPowerForce

There is no way the message is that large.  The 1347375956 number is a representation word 'POST' from the TCP stream.   I would install Wireshark (Windows) or run tcpdump (unix) on the computer that has Fishbowl installed and look at the XML that is actually being received and how the Fishbowl application service is responding to the web service request.  There is a good chance something is malformed.