Discussions

XML & Web services: How to add a soap header with weblogic webservice (client)

  1. Hi,

    I am using weblogic to write a webservice client,
    need to add some headers to soap message.
    How can I do?

    The code(ws client) I wrote like below:
    -------------------------------------------
    // Setup the global JAXM message factory
    System.setProperty("javax.xml.soap.MessageFactory",
    "weblogic.webservice.core.soap.MessageFactoryImpl");
    // Setup the global JAX-RPC service factory
    System.setProperty("javax.xml.rpc.ServiceFactory",
    "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    try {
    MultimediaConferenceService service = new MultimediaConferenceService_Impl("wsdl url");
    return service.getMultimediaConference();
    } catch (IOException e) {
    log.error("Create MultimediaConferenceService_Impl error:", e);
    } catch (ServiceException e) {
    log.error("Get MultimediaConference error:", e);
    }
    ---------------------------------------------------
  2. You could setup a Handler/HandlerChain and register it for your ws-client as described here: http://edocs.bea.com/wls/docs81/webserv/interceptors.html#1052635 br Svante Kumlien http://www.kumliens.se