Adding WS Security in SOAP header for calling soap services from PI

When i am calling a wss enabled webservice from soapui with the header parameters
Username , Password and Password Type - PasswordText , it is able to get results. The soapui tool automatically adds the following in the soap header -
     <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-9368150" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>xxxxx</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxxx</wsse:Password>
            <wsse:Nonce>aOA1P6t2hJPRyuraQ/IliQ==</wsse:Nonce>
            <wsu:Created>2009-07-10T14:58:33.781Z</wsu:Created>
         </wsse:UsernameToken>
      </wsse:Security>
However , in PI when the following configurations are made -
Web Services Security option selected in soap receiver adapter
In Receiver Agrrement -
Security Standard -  http://docs.oasis ....
Security Procedure (Request) - None
Security Procedure (response) - None
the user tokens don't seem to generated and it is giving an authentication error . Is there any process of generating this in the outgoing soap header from PI.
SOAP Axis framework is not installed at present  and working on PI 7.1 SP6.
Looking forward for your replies

same issue for me too.
Try using WS adapter on receiver side .
If you are able to attach SOAP header with WSSE fields using SOAP adapter at reciever channel let me know how you did it.

Similar Messages

  • How to add security credentials to SOAP header for EBS Web Service call..

    All,
    I am trying to invoke a webservice that I successfully exposed as a WSDL Web Service using EBS Integrated SOA Gateway. I am using OBIEE 11g Action Framework which uses WebLogic.
    Here are the steps I completed:
    - I exposed a WSDL web service in EBS R12 via Integrated SOA Gateway
    - I granted the access to this service in EBS R12 to user SYSADMIN
    - I used OBIEE 11g to make a Action to call the Web service (using Action Framework) by searching for the WSDL
    - When I try to execute the action: I get the error:
    Action could not be invoked.
    ServiceExecutionFailure :
    Error invoking web service HR_PHONE_API_Service at endpoint http://ip-10-87-33-3.ec2.internal:8000/webservices/SOAProvider/plsql/hr_phone_api/ Missing <wsse:Security> in SOAP Header
    PROBLEM: I am unsure how to add the credentials for SYSADMIN user and password to add the SOAP username/pwd to the outgoing call. Anyone on this forum know how to set up the SOAP to call with the correct credentials? I have been looking at the documentation but it is not clearly explained.

    Dear Heiko,
    did you solve this problem?
    We are facing the same problem. Every parameter that requries "cmd" does not work. I guess we don´t use this paramter the right way.
    Best, Chris

  • How to set SOAP Header When Calling Business Service (OSB) Using Split-Join

    Hi,
    We need to call WSDL based webservice which requires heading static content for successful call. As we need to call the same service parallely, hence we want to use Split-Join.
    Looked at couple of forum links, noted that we can't play with headers while working with Split-Join.
    For curiosity, just want to check any option other than using proxy as mediator in setting header information.
    Regards
    Venkata Madhu

    Venkata,
    You still have the option, if you hv n't tried this one.
    To enable this capability, you must declare the header parts along with the body parts in a single request/response message in the Split-Join WSDL and in the WSDL of the proxy or business services invoked by the Split-Join. With the message parts declared in the WSDLs, SOAP header content is available to Split-Joins in the request/response message variables.
    Following is an example of the message and binding definitions in the WSDL.
    Message
    <wsdl:message name="retrieveCustomerOverviewByIdRequestMessage">
    <wsdl:part name="retrieveCustomerOverviewByIdRequest"
    element="co:retrieveCustomerOverviewByIdRequest"/>
    *<wsdl:part name="serviceContext" element="sc:serviceContext"/>*
    </wsdl:message>
    Binding
    <wsdl:input>
    <soap:body use="literal" parts="retrieveCustomerOverviewByIdRequest"/>
    *<soap:header message="tns:retrieveCustomerOverviewByIdRequestMessage"part="serviceContext" use="literal"/>*
    </wsdl:input>
    hope it helps !!
    Regards,
    Abhinav

  • Remove Soap Header while calling a WS from BPEL 11g

    Hi
    My requirement is to remove the entire SOAP Header tag in the invoke activity. How this can be achieved? Please help
    thanks
    Sesha

    Note sure if this possible.. but just wondering if you can try using <bpelx:remove> extention to delete the soap header variables..
    Other viable option is to write SOAP Message handlers on your outbound webservices...

  • Calling web Service from the Custom Adapter.Is it Possible?

    Hi Experts,
                    I am having requirment in which i have to cal com.sap.aii.mapping.lookup.LookupService for calling web Service from the Custom Adapter.Is it Possible?
    Regards,
    Rajesh.D

    Hi Rajesh..
    Just looking the problem in another angle.. if there is no constraint that you have to use XI specific API to call the web service, why dont you use usual Java API used for calling a web service inside you custom adapter (I have Microsoft background.. donno exactly how it is done in Java,, but in .NET kind of a language it is possible). SInce your adapter is in Java itself and is capable of calling web service.. collect or lookup the data whatever you want and validate...
    Just a thought..
    VJ

  • How to add Custom Attributes in the SOAP header for OWSM

    Hi,
    I like to know how to add the Custom Attributes in the SOAP header for OSWM username token authentication.
    Currently we are getting the header element like
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    here we need to add the attribute "soap:mustUnderstand="1" , so the element will look like
    <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    Any info on this will be helpful.
    Thanks,
    ArunM

    Hi Jay, you can make it in more than 1 way.
    I suggest you the following:
    - create an URL iview that points to any URL you want.
    - define a Resource that points to the iview (with a window name, to open in new window)
    - define an Area that points to the resource
    - add your new Area to the your current Area Group
    Regards!

  • OSB: Attach SOAP Header for SOAP Fault

    Hi,
    Is there a way to return OSB SOAP Fault with custom SOAP Header?
    Currently, when SOAP Fault happens, SOAP Header is not returned. I would like to insert some elements in the SOAP header and return when SOAP Fault happens.
    Thanks.

    Hi Eric,
    Thanks for your tips. It was helpful!
    I've managed to insert custom SOAP header to a SOAP fault.
    In service error handler,
    1. Construct custom header and replace header variable content
    2. Replace body content with fault variable
    3. Reply with failure
    Thanks.

  • Can we edit SOAP Header for an Outbound ABAP Proxy message?

    Hi,
    Can we add some information such as dynamic configuration to the SOAP header for the outbound ABAP Proxy from ABAP report in SAP Application System?
    Regards,
    Praveen Gujjeti.

    Hi Praveen, have you found soulution for this? Can you share it with me?
    From here http://help.sap.com/saphelp_nw70/helpdata/EN/d6/49543b1e49bc1fe10000000a114084/content.htm
    The help described that:
    Set logging in the message header. This means that this message is logged even if logging is deactivated explicitly in the configuration. The logging information is part of the message header:
    ¡        <SAP:Logging>1</SAP:Logging>
    Activates logging explicitly.
    ¡        <SAP:Logging>0</SAP:Logging>
    Deactivates logging explicitly.
    So it means that we can edit SOAP header for outbound ABAP proxy. But i haven't find the correct method to do that.

  • Extension of Standard SOAP Header Information in SOAP Adapter

    We are currently trying to call an eBay Web Service via SAP XI and we are using the SOAP Adapter in XI to achieve this.
    The following Authentication Information is required in the SOAP Header for accessing the eBay Web Service:
    - Token
    - ApplicationID
    - DevelopmentID
    - CertificationID.
    Unfortunately, the standard SOAP Adapter supports only certain SOAP Header Information (like User Authentication or Certificate Authentication).
    Is it possible to extend the SOAP Header Information in the SOAP Adapter (or somewhere else in XI) beyond the standard configurations?
    Thanks for your support.
    Alexander Bange

    Hi Jin,
    thanks for your input and sorry for my late reply but I wanted to wait for feedback from SAP who actually confirmed your recommendation.
    I had a second thought about this and it came to my mind that I actually don't want to extend the SOAP Header elements but simply fill the mentioned authentication elements with values. This cannot be done in the message mapping as only the SOAP body elements (i.e. the payload) can be mapped.
    Do you know if and how I can fill the SOAP header elements with values in XI?
    I already tried to include this information as fixed values in the WSDL description and load it into XI. Then I looked into the WSDL description and an error message occured stating that XI could not parse the XML Document (Fatal Error: com.sap.engine.lib.xml.parser.ParserException:  = expected in attlist(:main:, row:18074, col:54)).
    If there is no solution for the latter, I will have to try nosoap solution. Still this would be a little awkward.
    Thanks again for your valuable support.
    Best Regards.
    Alex

  • How to call web services from PL/SQL?

    Hi,
    Can one help in how to call web services from PL/SQL? Steps, pros and cons, etc....
    Thanks in advance

    Here's some example skeleton code to get you started...
      PROCEDURE p_soap_request(p_username IN VARCHAR2, p_password IN VARCHAR2, p_proxy IN VARCHAR2) IS
        soap_request  VARCHAR2(30000);
        soap_respond  CLOB;
        http_req      utl_http.req;
        http_resp     utl_http.resp;
        resp          XMLType;
        soap_err      exception;
        v_code        VARCHAR2(200);
        v_msg         VARCHAR2(1800);
        v_len number;
        v_txt Varchar2(32767);
      BEGIN
        UTL_HTTP.SET_PROXY(p_proxy);
        -- Define the SOAP request according the the definition of the web service being called
        soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>'||
                       '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'||
                       '  <SOAP-ENV:Body>'||
                       '    <m:DownloadRequest xmlns:m="http://www.website.net/messages/GetDetails">'||
                       '      <m:UserName>'||p_username||'</m:UserName>'||
                       '      <m:Password>'||p_password||'</m:Password>'||
                       '    </m:DownloadRequest>'||
                       '  </SOAP-ENV:Body>'||
                       '</SOAP-ENV:Envelope>';
        http_req:= utl_http.begin_request
                  ( 'http://www.website.net/webservices/GetDetailsService.asmx'
                  , 'POST'
                  , 'HTTP/1.1'
        utl_http.set_header(http_req, 'Content-Type', 'text/xml');
        utl_http.set_header(http_req, 'Content-Length', length(soap_request));
        utl_http.set_header(http_req, 'Download', ''); -- header requirements of particular web service
        utl_http.write_text(http_req, soap_request);
        http_resp:= utl_http.get_response(http_req);
        utl_http.get_header_by_name(http_resp, 'Content-Length', v_len, 1); -- Obtain the length of the response
        FOR i in 1..CEIL(v_len/32767) -- obtain response in 32K blocks just in case it is greater than 32K
        LOOP
            utl_http.read_text(http_resp, v_txt, case when i < CEIL(v_len/32767) then 32767 else mod(v_len,32767) end);
            soap_respond := soap_respond || v_txt; -- build up CLOB
        END LOOP;
        utl_http.end_response(http_resp);
        resp:= XMLType.createXML(soap_respond); -- Convert CLOB to XMLTYPE
      END;Using secure web services (https)...
    Web serivces call in Plsql
    As for 'pros and cons'... there's nothing to compare against... either you want to call a web service or you don't.

  • Call Custom Service from Event Receiver as Current User

    Hello,
    i bang my head on this problem for days now:
    My custom web service hosted in Sharepoint 2013 needs to know the logged on user name. I used to have a self-written impersonation in my service client before, but with switching to claims authentication this should be obsolete.
    So within my service i decode the user from
    IClaimsPrincipal icp = Thread.CurrentPrincipal as IClaimsPrincipal;
    IClaimsIdentity ci = (IClaimsIdentity)icp.Identity;
    String User = ci.ToString();
    This works well when i call the service from a custom aspx page.
    It utterly fails when i call the service from a List Item Event Receiver. The User always is the Application Pool Account.
    This is the Client code to open the Channel:
    private void SetChannelFactory(
    MyServiceApplicationProxy proxy,
    Uri address)
    if (null == proxy)
    throw new ArgumentNullException("proxy");
    if (null == address)
    throw new ArgumentNullException("address");
    // Check for a cached channel factory
    string endpointConfigurationName = GetEndpointConfigurationName(address);// Get the endpoint configuration name
    if ((null == s_ChannelFactory) || (endpointConfigurationName != m_EndpointConfigurationName))
    lock (s_ChannelFactoryLock)
    if ((null == s_ChannelFactory) || (endpointConfigurationName != m_EndpointConfigurationName))
    // Create a channel factory without specifying an endpoint address
    // so it can be cached and used for multiple endpoint addresses
    s_ChannelFactory = new ConfigurationChannelFactory<IMyServiceContract>(
    endpointConfigurationName, proxy.Configuration, null);
    // Configure the channel factory for claims-based authentication
    s_ChannelFactory.ConfigureCredentials(SPServiceAuthenticationMode.Claims);
    foreach (var operation in s_ChannelFactory.Endpoint.Contract.Operations)
    DataContractSerializerOperationBehavior behavior = operation.Behaviors.Find<DataContractSerializerOperationBehavior>() as DataContractSerializerOperationBehavior;
    if (behavior != null)
    behavior.MaxItemsInObjectGraph = 2147483647;
    // Store the current endpoint configuration name.
    m_EndpointConfigurationName = endpointConfigurationName;
    private IMyServiceContract GetChannel(
    MyServiceApplicationProxy proxy,
    Uri address)
    //Create Channelfactory
    SetChannelFactory(proxy, address);
    // Create a channel from the channel factory.
    return s_ChannelFactory.CreateChannelActingAsLoggedOnUser(new EndpointAddress(address));
    All research pointed out that "CreateChannelActingAsLoggedOnUser" would pass the current user (which is correctly identified within the event receiver!) to the service, but it doesn't work for my event receiver...
    Any advice on this would be great!
    With kind regards,
    Joachim

    You should be able to get the current user id from the SPListItemEventProperties object. From here you should be able to create a Claim. For example get the user by using
    user = SPWeb.Users.GetByID(properties.CurrentUserId)
    SPClaim claim = SPClaimProviderManager.CreateUserClaim(user.email, SPOriginalIssuerType.TrustedProvider, issuerIdentifier);
    https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.claims.spclaimprovidermanager.createuserclaim(v=office.14).aspx
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • Is it possible to call web service from ABAP SAP 4.6 c..If yes how

    Hi Friends,
    Is it possible to call web service from ABAP-SAP 4.6 c..If yes Could you please let me know how.
    Thanks in Advance.
    Murali Krishna K
    Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:09 PM
    Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:11 PM

    Olivier CHRETIEN wrote:>
    > Hi Terry,
    >
    > So these function modules must use the SAPHTTPA RFC destination which uses the exe saphttp.exe ?
    >
    > How much abap code lines do you have for a web service call ?
    > Do you have to code the call specifically for each different web service ?
    > Are you able to use the WSDL ?
    >
    > Nice job if you have coded your own private SOAP runtime !
    >
    > But I don't think this is an easy solution for everybody...
    >
    > Regards,
    >
    > Olivier
    Yes, SAPHTTPA (runs on application server) and/or SAPHTTP (runs on front-end pc), one of which, is required for HTTP communication.  So far, nothing too elaborate as far as SOAP goes, but the logic is simplistic.  Here's some sample code:
      DEST = 'SAPHTTPA'.
      TRANSLATE HOST TO LOWER CASE.
      MYURL = 'wssrvTest/Service.asmx/GetByOrderItem'.
      CONCATENATE HOST MYURL INTO MYURL.
      REQUEST_HEADERS-DATA = 
                  'Content-type: application/x-www-form-urlencoded'.
      APPEND REQUEST_HEADERS.
      CLEAR REQUEST_HEADERS.
    *........Convert Order Number to External Format........................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ORDER
           IMPORTING
                OUTPUT = ORDER.
    *........Convert Item Number to External Format.........................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ITEM
           IMPORTING
                OUTPUT = ITEM.
    *........Convert Material Number to External Format.....................
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = MATERIAL
           IMPORTING
                OUTPUT = MATERIAL.
      CONCATENATE 'sOrder=' ORDER
                   INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CONCATENATE '&sItem=' ITEM
                   INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CONCATENATE '&sMaterial=' MATERIAL
                  INTO REQUEST_BODY-DATA.
      APPEND REQUEST_BODY.
      CLEAR REQUEST_BODY.
      CALL FUNCTION 'HTTP_POST'
           EXPORTING
                ABSOLUTE_URI          = MYURL
                RFC_DESTINATION       = DEST
                BLANKSTOCRLF          = 'X'
           TABLES
                RESPONSE_ENTITY_BODY  = RESPONSE_BODY
                REQUEST_ENTITY_BODY   = REQUEST_BODY
                RESPONSE_HEADERS      = RESPONSE_HEADERS
                REQUEST_HEADERS       = REQUEST_HEADERS
           EXCEPTIONS
                CONNECT_FAILED        = 1
                TIMEOUT               = 2
                INTERNAL_ERROR        = 3
                TCPIP_ERROR           = 4
                DATA_ERROR            = 5
                SYSTEM_FAILURE        = 6
                COMMUNICATION_FAILURE = 7
                OTHERS                = 8.
      CHECK SY-SUBRC = 0.  "more appropriate msg goes here
      LOOP AT RESPONSE_BODY.
        IF RESPONSE_BODY+0(7) <> '<string' AND
           RESPONSE_BODY+0(8) <> '</string' AND
           RESPONSE_BODY+0(5) <> '<?xml'.
          SPLIT RESPONSE_BODY-DATA AT '=' INTO FIELD_NAME FIELD_VALUE.
          TRANSLATE FIELD_NAME TO UPPER CASE.
          CASE FIELD_NAME.
            WHEN 'HEIGHT'.
              HEIGHT = FIELD_VALUE.
            WHEN 'WIDTH'.
              WIDTH = FIELD_VALUE.
            WHEN 'LENGTH'.
              LENGTH = FIELD_VALUE.
            WHEN 'WEIGHT'.
              WEIGHT = FIELD_VALUE.
            WHEN 'QTY'.
              QTY = FIELD_VALUE.
          ENDCASE.
        ENDIF.
      ENDLOOP.
    Hope this helps...
    Terry
    Edited by: Terry West on Feb 4, 2008 3:08 PM

  • Is there a way to call web service from 2 servers??

    Hi,
    I need to know if its possible to call web service from 2 different servers without having load balancer??? I mean, if one of the server has heavy work on, then it should call web service from the other server.
    Thanks in advance.
    Best Regards.

    Hi,
    WebLogic Cluster has this feature ( Load Balancing & Failover ). If you will deploy your WebService to a WebLogic Cluster and then If you will put a Proxy in front of it like (Apache)...Then it is Possible.
    <h3><font color=maroon>What All You Need To Do ? ...... as following</font></h3>
    <b><font color=maroon>Step1).</font></b> Create a WebLogic Cluster (minimum two ManagedServers)
    http://weblogic-wonders.com/weblogic/2010/04/28/weblogic-clustering-in-remote-boxes/
    <b><font color=maroon>Step2).</font></b> Install a Proxy like Apache in frot of them like following:
    http://weblogic-wonders.com/weblogic/2010/05/13/apache-proxy-as-static-content-repository/
    Or
    http://weblogic-wonders.com/weblogic/2010/08/01/weblogic-httpclusterservlet-proxyserver/
    <b><font color=maroon>Step3).</font></b> Now Configure a FrontEnd Host for your Cluster by providing the ProxyServer Host name as the FrontEnd of your Cluster. This step is required to Generate the Dynamic WSDL with the Address of the Frontend.(Not of a perticular WebLogic Server)
    http://weblogic-wonders.com/weblogic/2010/06/21/configuring-frontend-host-and-port/
    <b><font color=maroon>Step4).</font></b> Deploy your WebService on the Cluster
    <b><font color=maroon>Step5).</font></b> Now Hit the WebService using the Proxy URL:
    Example:
    http://ProxyHostname:proxyPort/ServiceContextRoot/ServiceURI?WSDL
    Thanks
    Jay SenSharma

  • Calling web service from Obiee

    Hi,
    I want to get data from webservice and show the results in a dashboard.
    I checked http://www.artofbi.com/index.php/2009/08/consuming-a-web-service-in-obiee-presentation-services-using-jquery-cdn/ web site.
    But the author is retrieving data from a web page by sending parameter to querystring like
    yqlq=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22YHOO%22%2C%22AAPL%22%2C%22GOOG%22%2C%22MSFT%22%2C%20%22PTRY%22)&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env&callback=?";
    But as I know we can not call web services with parameters like this.
    How can I call web service from BI?
    Could you please suggest articles or sample codes, documents etc.
    Regards,
    bye

    Hi,
    I controlled this document. The document is explaining Oracle BI web services for extracting information from Oracle BI and showing them in other environments. But I want to get results from a web service ( for example a web service which returns currency rates, weather information or sharepoint lists) and then represent them in Oracle BI Dashboards.

  • Calling Web Service from CRM using proxy

    Hi all,
    I'm facing a problem trying to call a web service from CRM (WAS 620) via XI 3.0. The response that XI recieves from the web service contains SOAP Envelope, and the mapping fails because of it. I built the proxy manually, because if I load WSDL the proxy generation in CRM generates error that sais that external definition coudn't be used.
    Is there any way to remove SOAP envelope from the response while mapping?
    Is it possible to call web service from WAS 620?
    Thanks!!!!
    Anya.

    Hi Manish,
    SOAP adapter does pass the message to XI (this message contains SOAP envelope although XI expects to get message without it), and during the mapping step i get "Runtime Exception in Message-Mapping transformatio~".
    I suppose it's because i created proxy manually. I did so because when i imported WSDL, and tried to generate proxy in CRM, i got an error message that said that proxy couldn't be generated because external definitions are only allowed in XI 3. But my XI version is 3.0! And when I generate the same proxy in my R/3 system that is installed on WAS 640, it works.
    What can I do?
    Cheers,
    Anya.

Maybe you are looking for