Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Contributor
Posts: 2
Registered: ‎10-08-2010
My Device: Not Specified

HttpMessage.setMethod(HttpMessage.POST) is changed by GET, on BlockingSenderDestination

I’m trying to migrate a Blackberry application to OS 7, it was built for OS 6 (my app is working on OS 6), theoretically it should not bring any problem, at least point it is true, but I found a problem that I still cannot resolve. When have executed calls to web services (SOAP), I'm setting the HttpMessages for using POST method, but when the call is executed, it have arrived to the server with GET method (and it not going to have, was intentionally disabled), it is a big problem for me , because the Sever with which am working doesn't have support for working with GET (I have always "Http 500 error"). It doesn't happens on the simulator side, just happens on the device side. Do you know any workaround for it ? Is a problem with OS version ? (See below for the code that I'm using, and for the code)




Model: Bold 9930

Carrier: Sprint

OS: 7.0 Bundle 1296 (v7.0.0.241, Platform


Simulator (On the simulator side I don't have any problem)


ModelBold 9930

OS: 7.0 Bundle 1962(v7.0.0.440, Sept_24_2011_signed, Platform


 public void run()
            BlockingSenderDestination blockSendDest = null;

                URI uri = URI.create(URL_BASE);
                    = (BlockingSenderDestination) DestinationFactory.getSenderDestination(
                    senderContext.getName(), uri);

                if (blockSendDest == null)
                    blockSendDest = DestinationFactory.createBlockingSenderDestination(
                        senderContext, uri);

                ByteMessage requestMessage = blockSendDest.createByteMessage();
                requestMessage.setTransportHeader("Content-Type", "text/xml;charset=UTF-8");
                requestMessage.setTransportHeader("SOAPAction", "\"\"");
                // getBodyRequest() -> Insert SOAP request, works fine, was tested on SOAP UI
                ((HttpMessage) requestMessage).setMethod(HttpMessage.POST);
                Message response = blockSendDest.sendReceive(requestMessage);

                if (response != null)

catch (Exception ex)