The problem may come from a missing SOAPAction http header.
The best way would  be to use a soap="true" and let servicemix-http
handle the soap envelope stuff: you just need to pass the xml content
instead of the full soap request:
<ns0:getQuote xmlns:ns0="urn:xmethods-delayed-quotes"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
<symbol xsi:type="xsd:string">IBM</symbol>
</ns0:getQuote>

On 10/25/06, spelletier <[EMAIL PROTECTED]> wrote:

Here is a very simple test for the servicemix-http component, when running it
I get a org.apache.commons.httpclient.NoHttpResponseException: The server
64.124.140.30 failed to respond.

public void test()
throws Exception
{
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("http://test";, "MyProviderService"));
        me.getInMessage().setContent(new
StreamSource(getClass().getResourceAsStream("request.xml")));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getFault() != null) {
                fail("Received fault: " + new
SourceTransformer().toString(me.getFault().getContent()));
            } else if (me.getError() != null) {
                throw me.getError();
            } else {
                fail("Received ERROR status");
            }
        } else {
            logger.info(new
SourceTransformer().toString(me.getOutMessage().getContent()));
        }
}

protected AbstractXmlApplicationContext createBeanFactory()
{
        return new ClassPathXmlApplicationContext("spring.xml");
}

What I tried was simply to define one http endpoint in spring.xml that is
configured to call the stock quote web service at
http://64.124.140.30:9090/soap (the web service used in ServiceMix
examples).

When I try it in Eclipse's Web Services Explorer it works fine, the stock
quote web service correctly returns the quote.  In eclipse.txt (in
attachment) there is the TCP stream reconstruction from the packet capture
using Wireshark (Ethereal), in which we can see that the server responded
with HTTP/1.1 200 OK.  I then copy/pasted from eclipse.txt the captured soap
request into request.xml to try it with the http binding of ServiceMix.  The
packet capture for the test with ServiceMix is in
servicemix-http_soap-false.txt.  The same soap envelope was sent, but this
time no response.  The only thing that looks different between Eclipse and
ServiceMix is the http-header.

What is also interesting is that if I configure in spring.xml the http
endpoint with soap="true", the soap request sent is (obviously) a bad
request (2 soap envelopes, 2 <soapenv:Body>), but now the server respond
with a soap Fault and HTTP/1.1 500 Internal Server Error instead of not
answering anything.  The packet capture (tcp stream reconstruction) for the
test with soap="true" is in bad-soap-request.txt.

Any idea what I'm doing wrong?

Thanks!

http://www.nabble.com/file/3829/eclipse.txt eclipse.txt ,
http://www.nabble.com/file/3830/servicemix-http_soap-false.txt
servicemix-http_soap-false.txt ,
http://www.nabble.com/file/3831/bad-soap-request.txt bad-soap-request.txt ,
http://www.nabble.com/file/3832/spring.xml spring.xml ,
http://www.nabble.com/file/3833/request.xml request.xml
--
View this message in context: 
http://www.nabble.com/NoHttpResponseException-in-servicemix-http-tf2505661.html#a6986059
Sent from the ServiceMix - User mailing list archive at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to