Exapmle for SOAP Header in WS using JAXRPC Handler

Any one has example of how to use the SOAP Header in Webservice implementation using the JAX RPC handler?
We have a situation where several PL/SQL web services require some context being set in the PL/SQL package. I am planning to use the PL/SQL web service with some soap headers , when present the Handler will take those values from the SOAP header and make the extra pl/sql calls, before the BODY which will be mapped to the pl/sql procedure whose response will be sent back as the WS response..
I will really appreciate if some one show me the example on how to use the JAXRPC handler in JDEV.
Thank you very much.

Probably the easiest way is to insert
@Resource
WebServiceContext wsc;
in your @WebService annotated class.
Depending what you want to do a SOAPHandler might be appropriate.
also possible:
http://www.khapre.org/blog/archives/2008_08_01_index.aspx
Edited by: Konrad KRENTZ on Dec 1, 2009 8:56 PM

Similar Messages

  • Web Services Test Page: No input fields for SOAP header parameters?

    Hello,
    we're using OracleAS / OC4J 10.1.3.1 and have developed a web service that has some self defined SOAP header parameters.
    I would like to use the Web Services Test Page provided by the OAS but it seems that there is no opportunity
    to provide input values for these SOAP header parameters.
    Do I miss something there or is it not supported by OAS?
    I've read the documentation but could not find a clue.
    any help is appreciated,
    Regards,
    Martin

    I hear you. As you have probably heard, OC4J is being replaced by WebLogic Server and the 10.1.3.x releases are the last that will be produced. We'll do maintenance on it of course, but little/no new feature work. This would be a new feature we'd have to add, so I'm afraid there's not much chance in having it done.
    It's not ideal, and of course more work for you, but if you want to provide your client with a test page that exposes the SOAP headers as form fields, you could always develop and ship one yourself.
    -steve0

  • Query reg adding custom tags in SOAP Header - AXIS Receiver Adapter

    Hi All,
    I need to send custom tags as mentioned below to my traget webservice application. I think I can do this with Receiver AXIS adapter but not sure how it can be done. Can any of you suggest?
                                                  <WSContext>
                   <FromAppId>ABC</FromAppId>
                   <ToAppId>XYZ</ToAppId>
              </WSContext>
    Thanks,

    If you want to add custom tags in the soap header, one possible solution is use XSLT mapping or Java mapping to create header first then do message mapping for mapping the payload structure between your source and target  as usual.
    So in operation mapping you sequence mapping like this... first XSLT mapping for custom tags for the SOAP Header followed by payload mapping.
    Hope that helps.
    Search SDN for XSLT Mapping for soap header. Already we have handled these issues.

  • How to access SOAP header without using SOAP message handler

    I have a requirement to retrieve SOAP header information within each web services operation. So I can't use SOAP message handler. Is there any way to do that? BTW, I am not using workshop.
    Thanks.

    Howeve how can I put data into soap header in UDF? DynamicConfiguration won't work for soap header, right?
    Which data do you want ot put into the Header section.
    ASMA or Dynamic Configuration is used to read/ put the details from/ into the header elements.....
    Refer: http://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/frameset.htm
    From the help section:
    This information is not located in the payload of the message, but in additional message header fields.
    Regards,
    Abhishek.

  • Add soap header in SALT

    Hi everyone!
    I want to send a soap header(an UUID) using SALT, and honestly, I didn't found a detailed explanation or an example on how to do that.
    The only thing I know so far is:
    - Add in the ".wsdf" file: <Property name="mapsoapheader" value="true" />
    - And then somehow using "TA_WS_SOAP_HEADER" (previously included by wssoapflds.h) I will get what I need.
    So, am I in a good way to solve my problem?
    If yes, how exactly I should set TA_WS_SOAP_HEADER in my C code?
    I don't know if you need more details, just ask me and I'll reply to you as fast as I can.
    Thanks in advance,
    Daniel.

    If want to use soap header, The data type must be FML32.
    SALT will add a field TA_WS_SOAP_HEADER in user's FML32 buffer type.
    The feature only in SALT version greater than 12c Release 1

  • Get Custom SOAP Header Value in SOA Suite 11.1.1.6 using BPEL 1.1

    Hi Experts,
    We are using SOA Suite 11.1.1.6 and in one of the projects we have requirement to retrieve custom SOAP header value.
    This is enhancement to existing process which is developed using BPEL 1.1 and deployed to Production. So we cannot convert this now to BPEL 2.0
    We suggested to use custom XML element in Header the definition of which will be defined in custom XSD and stored in common location. However the 3rd party who are invoking this service will not be able to do any customization in their process to pass custom XML header.
    Please can you help me in providing any approach through which we can retrieve custom Header value from SOAP header using BPEL 1.1
    I have read some blogs for retrieving the custom XML header but they are using BPEL 2.0. I would like achieve this functionality using BPEL 1.1
    Appreciate your inputs.
    Thanks in Advance - RK

    Hello RK,
    Have you've tried to put the bpex:outputHeaderVariable on the invoke activity of the invoked service.
    <invoke name="Invoke"
                bpelx:outputHeaderVariable="HeaderVariable"/>
    Where the "HeaderVariable" reflects the XSD Datastructure of the received header.
    This is also specified here in section 6.19.1 How to Receive SOAP Headers in BPEL
    Please note that the exact header must be specified in the WSDL of the invoked service.
    Also note that in case of a soap fault. No header will be returned from the invoked service but only a /soap/body/fault part.
    Good luck!
    Melvin

  • 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

  • Unable to add custom SOAP header to consumer webservice in CRM( without using PI)

    Hello Experts,
    We have a requirement to consume webservice proxy in CRM without involving PI. We have WSDL file which has many services as depicted in the first screenshot.After checking old posts, I could add custom SOAP header by using if_wsprotocol_ws_header and there is no xml parsing error for ws_header.Have used if_ixml_stream_factory to check xml parsing error for header.
    '<soapenv:Header>'
    '<wsse:Security soapenv: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">'
    '<wsse:UsernameToken wsu:Id="UsernameToken-2">'
                '<wsse:Username>user id</wsse:Username>'
                '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">paswd</wsse:Password>'
                '<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MT0B9XFzsZJXXKmVKOsj/Q==</wsse:Nonce>'
                '<wsu:Created>2015-03-30T06:29:17.407Z</wsu:Created>'
    '</wsse:UsernameToken>'
    '</wsse:Security>'
    '</soapenv:Header>' INTO l_string.
    But when my ABAP program as a whole gets executed where consumer proxy is called, then it still throws XML parsing error - undeclared namespace prefix. As mentioned, there is no parsing error for header and WSDL file as a whole in SOAP UI tool works fine,by manually adding SOAP header.
    Have configured SOAMANAGER with logical port.Or any wrong setting in SOAMANAGER can cause this issue? When I tested webservice ping, it gave me attached error but I read in a SAP note that such error can be ignored.
    I want to know if some more setting/coding is required if we manually add custom header to a payload? Is PI really required to implement this requirement? Payload mapping has to be done to add custom header and if that can be taken care by ABAP coding and how?
    Can you please help?
    BR,
    Nisha Verma

    Hello Experts,
    I have not found the solution yet.
    Can anyone provide some insight??
    BR,
    Nisha Verma

  • How to use XHeaderName1 in SOAP header

    I have a scenario in which im passing the target URL of a webservice dynamically in my mapping udf.
    I have to pass the URL to the TServerLocation parameter in SOAP header. But the error i get is that the URL is too long for TServerLocation. So i have to split it and send it using XHeaderName1,XHeaderName2 and XHeaderName3.
    Can anyone tell me how to do this.
    i saw this blog which gives me some idea but still my scenario is not working
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    please Help

    Hi Sivasakthi Danasekaran,
    URL is an environment variable I think it will take 256 charecters only. You need to split it compulsorly.
    Reward points if needful.
    Thanks,
    RamuV

  • Using Message ID in the SOAP header (Sender)

    Hi Experts,
    The scenario is SOAP to IDoc.
    We have requirement to insert the Message ID in the SOAP header for avoiding duplicate messages from the SOAP client.
    Please note SOAP client is unable to support URL parameter, so we have to use Message ID in the SOAP header.
    So please suggest how to insert the Message ID in the SOAP header (WSDL) , and do we need to implement any mapping to retrieve the Message ID value from the SOAP header  - to create a PI message.
    Thanks in advance.
    MK

    But I want to know how we update the WSDL with the required Feild(messageID).
    I dont think you can update the wsdl url to include the messageID field...if you notice the other fields in the wsdl you will find all are static...however your messageID will be dynamic.....so just ask the SOAP client application to append the MessageId field and send the message.....at runtime the message id will be extracted by PI......did you test the scenario?...if no then test it once so that if there is an error we will come to know...
    Regards,
    Abhishek.

  • Reading Header data in a SOAP Envelope for SOAP Sender Adapter

    Hello All,
    Am using a SOAP sender adapter and want to use the data inside the SOAP Header for some routing purpose(extended receiver determination). Any SOAP message coming into XI will look something like below. But XI will pass the contents of <SOAP-ENV:Body> to Payload and <SOAP-ENV:Header> to the SOAP Header category you can see that in SXMB_MONI.
    Is there a way to read the data in my SOAP Header to be later used in my extended receiver determination.
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:Q-ENV="/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <SOAP-ENV:Header>
              <Q-ENV:Header>
                   <Q-ENV:Sender-Id>1</Q-ENV:Sender-Id>
                   <Q-ENV:Receiver-Id></Q-ENV:Receiver-Id>
                   <Q-ENV:Correlation-Id></Q-ENV:Correlation-Id>
                   <Q-ENV:Message-Id></Q-ENV:Message-Id>
                   <Q-ENV:Date-Sent></Q-ENV:Date-Sent>
                   <Q-ENV:Document-Type></Q-ENV:Document-Type>
                   <Q-ENV:Message-Format></Q-ENV:Message-Format>
              </Q-ENV:Header>
         </SOAP-ENV:Header>
         <SOAP-ENV:Body>
              <Q-ENV:Body>
                   <Q-ENV:Content-Type>text/xml</Q-ENV:Content-Type>
                   <Q-ENV:Message-Type></Q-ENV:Message-Type>
                   <Q-ENV:Encoding>UTF-8</Q-ENV:Encoding>
                   <Q-ENV:Message-Body>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Thanks for your replies in advance.
    Regards,
    Prashanth

    Hello,
    but they were not getting any response back from XI and the sending system kept resending the message.. may be it was acting like a HTTP post.
    The method that is used by the native SOAP Adapter is always HTTP Post. Not sure why you are not getting a response, have you checked the outbound firewall of the sending party or the inbound firewall of XI? To which SOAP URL are you sending to?
    Hope this helps,
    Mark

  • Modify SOAP header in ABAP for 3rd party WSDL

    Hi SDN,
    I want to consume a 3rd party WSDL in ABAP. I have created the proxy through SE80, and created the logical port through LPCONFIG. The WSDL I'm using needs me to include some authentication (developer key, and password) in the header portion of the SOAP message. Example below.
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://api.channeladvisor.com/webservices/">
       <soapenv:Header>
          <web:APICredentials>
             <web:DeveloperKey>XXX</web:DeveloperKey>
             <web:Password>XXX</web:Password>
          </web:APICredentials>
       </soapenv:Header>
       <soapenv:Body>
          <web:DoesSkuExist>
             <web:accountID>XXX</web:accountID>
             <web:sku></web:sku>
          </web:DoesSkuExist>
       </soapenv:Body>
    </soapenv:Envelope>
    How can I edit the SOAP header to include this information so that this WSDL will work when I call it? There must be a better way than hardcoding the SOAP call and using an HTTP client call.
    I've looked in google and SDN and haven't been able to find a good answer to this problem.
    Thanks guys.

    Have a search in SDN for "if_wsprotocol_ws_header" - there are several postings and examples and if you goto SE24 and look at the documentation attached to IF_WSPROTOCOL you can get to the example referred to in some of the SDN postings.  I also found "real" examples in SAP e.g. function group FITP_SABRE_WS, and I got it to work OK (eventually) after browsing some of these.
    Jonathan

  • Overriding Soap Header using Axis(SOAP) Receiver

    Hi Experts,
    I am having a problem in including the SOAP Header in the XML using the SOAP Axis Receiver Adapter. Well I am not sure on how to place this structure in the header:
    <SoapHeader>
        <Header1>
            <child1>
            <child2>
        </Header1>
        <Header2>
            <child1>
            <child2>
        </Header2>
    </SoapHeader
    I have already tried overriding the SOAP Header via Java Mapping but it is not working when I send it to the third-party. I believe this header should be directly encoded using the axis module, but I can only find examples for simple headers and not nested ones...
    Please help.
    Edited by: Mark Dihiansan on Sep 7, 2010 5:15 PM

    Hi,
    you simply place your header template in the handler configuration. If you need to set some values of the header dynamically, you can pass each value in the dynamic configuration header. The axis handler will fill the header with the supplied values.
    The Axis Note 1039369 describes a few header insertion examples that you should look at.
    regards, yza

  • 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.

  • Http Header for SOAP message.

    Hello,
    I need to set some custom HTTP Header when i send the SOAP message to an endpoint.
    I tried this..but doesn't solve my requirement.
    SOAPMessage soapmsg = messageFactory.createMessage();
    MimeHeaders mime = soapmsg.getMimeHeaders();
    mime.addHeader("SOAPAction", "xxxx");
    mime.addHeader("Sender", "yyy");
    SOAPMessage reply = connection.call(soapmsg, destination);
    Can anyone please guide me how to set HTTP headers for SOAP?
    Thanks,

    The following snippet is some code froma stand-alone web service client that I use for testing. It picks up an XML as the payload of the web service, wraps it in a SOAP message and fires it at the web service endpoint.
         System.out.println("Create the SOAP message.\n"); 
         MessageFactory messageFactory = MessageFactory.newInstance();
         SOAPMessage message = messageFactory.createMessage();
         System.out.println("Creating a DOM object from the JAXB payload.");
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              factory.setValidating(false);
                 factory.setNamespaceAware(true);
         DocumentBuilder parser = factory.newDocumentBuilder();
         Document doc = parser.parse("file:payload.xml");
         //  Add the HTTP headers.
         message.getMimeHeaders().addHeader("User-Agent", "Mozilla/4.0 [en] (WinNT; I)");
         message.getMimeHeaders().addHeader("Host", "localhost:9080");
         message.getMimeHeaders().addHeader("Content-type", "text/xml");
         message.getMimeHeaders().addHeader("SOAPAction", "http://www.xxx.com.au/wsdl/someWebService");
         message.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, "utf-8");
         SOAPEnvelope envelope = message.getSOAPPart().getEnvelope();
         envelope.addNamespaceDeclaration("n", "http://xxx/webService");
         envelope.addNamespaceDeclaration("xsd", "http://www.w3.org/2001/XMLSchema");
         envelope.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
         System.out.println("Adding the payload to the SOAP body.\n");
         SOAPBody body = message.getSOAPBody();
         SOAPBodyElement docElement = body.addDocument(doc);
         System.out.println("This is the SOAP message.\n");
         message.writeTo(System.out);
         System.out.println("\nPutting the payload on the wire.\n");
         SOAPConnectionFactory conFactry = SOAPConnectionFactory.newInstance();
         SOAPConnection connection = conFactry.createConnection();          
         URL endpoint = new URL("http://localhost:9080/xxx/services/yyy-webservices");
         SOAPMessage response = connection.call(message, endpoint);
         System.out.println("Payload sent. Closing the connection.\n");
         connection.close();

Maybe you are looking for

  • Extremely URGENT! How to pass a parameter from html to form?

    Hi Guys, I want to be able to pass a parameter to a Pre-Query trigger (from a html page to an Oracle form.) Right now, I hard coded the Pre-Query trigger (i.e. set_block_property('datablock_name', default_where, 'tableName.fieldName = '||:datablock.f

  • SQLERRM: ORA-29913: error in executing ODCIEXTTABLEOPEN callout

    SQLERRM: ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-00554: error encountered while parsing access parameters KUP-01005: syntax error: found "minussign": expecting one of: "binary_double, binary_float, c

  • Message F5201 not appearing

    Dear Friends, We have defined posting periods in OB52 Transaction, but user is able to make transaction in system in previous period than mentioned in System. i.e. system is not issuing message F5201 as an error message. Please suggest the solution f

  • Copy IPhoto 08 library to different laptop for 09?

    I have an IBook with Iphoto 08. What is the best way to copy that library to a new MacBook Pro with Iphoto 09 and migrate while leaving the existing Iphoto 08 library in tact on the IBook? I would be moving data across wireless network. Thanks for an

  • Load balancing and Application Server

    Hi guys, IHAC who have EBS + Kofax + OUCM (Oracle UCM) and needs to purchase load balancers for the installations. He is between Cisco and Radware load balancers and he says that Radware's ones have a module for Oracle Applications. Do yo have any id