FreeKB - SOAP in WebSphere - Getting Started
SOAP in WebSphere - Getting Started

Home > Search


Before we getting how SOAP is used in WebSphere, let's first level set on what SOAP is. I like to think of SOAP as a protocol that is used when system "a" is communicating with system "b". In other words, there is no human interaction. SOAP is non-human systems communicating.

 

For example, let's say you have an application server federated into the dmgr. In the dmgr, you can start or stop the application server. SOAP is used when the dmgr needs to talk to the application server.

 

A SOAP message is nothing more than an XML file that is transmitted from system "a" to system "b". The receiving system will consume the SOAP message and do what the message tells the system to do. The SOAP header is optional, the body is required.

<?xml version='1.0' Encoding='UTF-8' ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> 
 <env:Header>
   ...
 </env:Header>
 <env:Body>
   ...
 </env:Body>
</env:Envelope>

 

A SOAP transaction is typically a sort of request and response situation, where system "a" will send the SOAP request and system "b" will send the SOAP response. Consider a scenario where system "a" sends an invalid password in the SOAP request, like this.

<?xml version='1.0' Encoding='UTF-8' ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> 
 <env:Header>
     <wss:UsernameToken>                                              
        <wss:Username>john.doe</wss:Username>                        
        <wss:Password>bogus</wss:Password>                        
     </wss:UsernameToken>                                             
   </wss:Security> 
 </env:Header>
 <env:Body>
   ...
 </env:Body>
</env:Envelope>

 

In this scenario, the SOAP response from system "b" could look something like this.

<?xml version='1.0' Encoding='UTF-8' ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> 
 <env:Header>
 ...
 </env:Header>
 <env:Body>
   <errorcode>invalid password</errorcode>
 </env:Body>
</env:Envelope>

 

If you are going to only be using the WebSphere admin console (ISC), you probably would never run into a situation where you need to do anything with SOAP. However, if you find yourself using the wsadmin.sh (Linux) or wsadmin.bat (Windows) commands, you most certainly will find yourself doing some SOAP related configurations. For example, let's say you need to use wsadmin to start or stop an application server. One way to invoke wsadmin is to use the -user and -password options. However, this is highly discouraged, as the username and password can be intercepted.

wsadmin.sh -user your_username -password your_password

 

In this situation, it would be much better to add the username and password to the soap.client.props file. Notice the file name has SOAP! That's because SOAP is used when invoking the wsadmin command line tool.

com.ibm.SOAP.securityEnabled=true
com.ibm.SOAP.loginUserid=your_username
com.ibm.SOAP.loginPassword=your_password
com.ibm.SOAP.loginSource=none

 

Since SOAP is a protocol, a certain port is used for SOAP messages. You can get the SOAP port in the dmgr admin console, at System administration > Deployment manager > Ports. By default, a dmgr will use port 8879 for SOAP.

 

WS-Security is used to secure SOAP messages.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 969c4 in the box below so that we can be sure you are a human.




Comments