soap and http

Hello

I know how to create and send SOAP message, for example like that:

SOAPConnectionFactory soapConnFact = SOAPConnectionFactory.newInstance();

SOAPConnection soapConnection = soapConnFact.createConnection();

SOAPMessage response = soapConnection.call(soapMessage, "http://localhost:8080/WebService/WebService");

But i have lack of fundamental knowledge. That this mean that soap message will be sent via http? I heard that soap message can be sent via many different protocols. But if will be sent via http, is there any way to set http headers? I assume, that soap envelope is the main element in http message body.

Could anyone clarify that for me?

Thank you in advance and best regards.

[742 byte] By [architect_in_the_futurea] at [2007-11-27 6:03:33]
# 1

Hi there, umm.. i'm not an expert expert in this area, but i'll try to answer yr questions..

>> that this mean that soap message will be sent via http?

in your code, the soap message will be sent via http, as u've specified in the URL.

from my understanding, soap message is an xml which has got security feature in it. i.e. u can specify things like user name and password to logon to the web service. it is not mandatory though... u can submit an xml without any security header to a web service, as long as it is the kind of message the web service is expecting.

http is the actual protocol for transferring your soap message over the internet (i'm not sure if u can adjust the http header though)... if u're familiar with the OSI network 7 layers, http should be used by the Layer 5 Session layer, whereas soap should be in either Layer 6 (presentation) or layer 7 (application). in order words, soap is used to form your message; http will wrap the soap message inside its body, and it will then provide connectivity to the destination.

hope this help.

JWKC-5ivea at 2007-7-12 16:46:27 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...