Amit,
I’m not sure that I fully understand your question. The soap client typically sends the soap message over http or https. The client supplies the authorization information as HTTP header variables, not in the body of the soap message.
The way in which you specify the authorization varies depending on what client you are using. The webMethods-supplied pub.client:soapHTTP and pub.client:soapRPC services provide an “auth” record structure for you to supply the authentication type (usually “Basic”), username and password.
A plain ole java client that uses the HttpUrlConnection class to send a soap message would use something like the following to specify the authorization information:
//Create connection to the server
URL u = new URL(server);
URLConnection uc = u.openConnection();
HttpURLConnection connection = (HttpURLConnection) uc;
//Set connection parms
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestMethod("POST");
//Set connection authorization
String userInfo = userName + ":" + password;
BASE64Encoder encoder = new BASE64Encoder();
byte[] userInfoBytes = userInfo.getBytes(); // I18n bug here!
String authInfo = "Basic " + encoder.encode(userInfoBytes);
connection.setRequestProperty("Authorization", authInfo);
Other soap testing utilities or development environments like .Net accomplish the same thing, but in different ways.
Hope this helps,
Mark Carlson
Conneva, Inc.
#webMethods#Flow-and-Java-services#Integration-Server-and-ESB