Siebel Web UI Dynamic Developer Kit Guide > Using Native Web Service Technology Stacks >

Example of Setting and Getting SOAP Headers Using Oracle WebLogic

The following example demonstrates how to set and get Siebel session management and authentication SOAP headers using Oracle Web Logic.

public class SessionAccessControlTest implements com.bea.jws.WebService
     static final long serialVersionUID = 1L;

     /** @common:control */
     public WSDLFolder.SessionAccessControl sessionAccessControl;
          * @common:operation
          public MySessionBean Login(String Username,String Password)
               MySessionBean sessiontok=new MySessionBean();

               HeaderDocument hd = null;
                         hd = HeaderDocument.Factory.parse(
                         "<SOAP-ENV:Header xmlns:SOAP-ENV=\"\">" +
                         "<ns1:SessionType xmlns:ns1=\"\">Stateless</ns1:SessionType>" +
                         "<ns2:UsernameToken xmlns:ns2=\"\">"+Username+"</ns2:UsernameToken>" +
                         "<ns3:PasswordText xmlns:ns3=\"\">"+Password+"</ns3:PasswordText>" +
               Element h1 = (Element) hd.newDomNode().getFirstChild();
               sessionAccessControl.setOutputHeaders(new Element[] { h1});

               catch (XmlException xe)

               Element e[]=sessionAccessControl.getInputHeaders();
               System.out.println("sESSION id "+ sessiontok.getValue());

               return sessiontok;


Siebel Web UI Dynamic Developer Kit Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.