How to get SOAP Message while Request in WebService.. ?

i am working on Web Logic WebService. I have created Web service and deployed into server.
But now is there any ways to get the SOAP Message while request because i want to add some headers to the my SOAP Message before it sent to the backend.
SOAPMessageContext smc=null;
SOAPMessage soapMsg = smc.getMessage();
System.out.println("SOAP MESSAGE :"+soapMsg);
But I am getting NullPointerException.
any Help ??...
ThankQ.
Ajay

Hi
In your code the NullPointerException is expected as the message context is null and not initialized before you call getMessage method on it.
You can use soap handlers (client/server side handlers) to add the headers to the message before it is sent to the server.
Soap handler has methods like below in which you can add the headers.
* Handles incoming web service requests and outgoing callback requests
public boolean handleRequest(MessageContext mc)
System.out.println("Soap message is: \n " +
((SOAPMessageContext)mc).getMessage() + "\n");
return true;
More docs at http://e-docs.bea.com/wls/docs100/webserv_adv/handlers.html
Vimala-

Similar Messages

  • How to get soap message sent out

    Hi,
    I used a client proxy in ABAP to consume a web service.
    However I got errors saying there is 'Unexpected elemement' in SOAP message.
    To find out the root cause, i would like to get the soap message sent out from the proxy.
    Is there any way to do that?

    Thanks to all your guys

  • How to get Soap Request xml in application.cfc

    Hi
    if api getting soap request using cfhttp like below:
    <cfxml variable="mydata">
    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <soapenv:Header />
       <soapenv:Body>
           <ns:service_soap_call soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            <login>test</login>
            <password>test</password>
          </ns:service_soap_call>
       </soapenv:Body>
    </soapenv:Envelope>
    </cfxml>
      <cfhttp url="http://sm.iclp-dubai.ae/research/wsdl/MyPointsBank.cfc?wsdl" method="post" charset="utf-8" result="myresult">
           type" value="text/xml">
            <cfhttpparam type="header" name="SOAPAction" value="">
           <cfhttpparam name="soapInput" type="xml" value="#trim(mydata)#"/>
    </cfhttp>
    then how to get Soap Request in application cfc.
    like :
    <cfif IsSOAPRequest() >
      <cfset soapreq = GetSOAPRequest() />
    </cfif>
    I want to validate the soap xml Request before calling targeted CFC.
    Any suggestion!.

    Let me see whether I understand. Are you attempting to achieve something like this:
    test.cfc
    <cfcomponent output="no">
    <cffunction name="testFunction" returntype="any" access="remote">
    <cfargument name="soapInput">
    <cfset var inputXML = arguments.soapInput>
    <cfset var soapBodyText="">
    <cfset var noBodyTextError="">
    <cftry>
        <cfset soapBodyText = xmlSearch(inputXML,"//soapenv:Body/text()")[1].xmlValue>
        <cfsavecontent variable="noBodyTextError"><?xml version="1.0" encoding="utf-8"?><soapenv:Envelope     xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>java.lang.Exception: Body not found.</faultstring></cfsavecontent>
        <cfif trim(soapBodyText) is "">
        <cfthrow>
        </cfif>
        <cfreturn inputXML>
    <cfcatch type="any">
    <cfreturn noBodyTextError>
    </cfcatch>
    </cftry>
    </cffunction>
    </cfcomponent>
    tester.cfm
    <cfxml variable="mydata">
            <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wor="https://www.worldmilesafrica.com">
       <soapenv:Header/>
       <soapenv:Body>
       </soapenv:Body>
    </soapenv:Envelope>
    </cfxml>
    <cfinvoke webservice = "http://127.0.0.1:8500/workspace/wsTest/test.cfc?wsdl"
              method = "testFunction"
               returnVariable = "result">
           <cfinvokeargument name="soapInput" value="#trim(mydata)#" >
    </cfinvoke>
    <cfdump var="#result#">

  • I am getting error message while attempting to upgrade the software to iOS 6.1.3

    Hi,
    Need help on this, i am getting error message while attempting to upgrade the software to iOS 6.1.3

    The Current iOS for the iPhone 4s is iOS 7
    How to update your iPhone, iPad, or iPod touch

  • Ipad - I keep getting the message 'your request could not be completed'

    I can't seem to download any apps from the apps store and I get the message your request cannot be completed. Any ideas?

    Hbauer60 wrote:
    ...  How do I get around this?
    You cannot.
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • How to get automatic message output

    Hi,
    How to get automatic message output while creating po cause i have done all setting in the config but still it does not work what else i have to do.
    And 1 more thing how we can maintain condition record for Printoutput & External send for one output type.
    Regards,
    Anant

    Hi,
    Please follow the below steops for the Output of Purchase Order
    1. Condition Table
    SPRO > Material Management> Purchasing -> Message -> Output Control->Condition Tables->Define Condition Table for Purchase Order
    Select:
    Purchasing Doc. Type, Purch. Organization, Vendor
    2. Access Sequences
    SPRO ->     -> Purchasing -> Message -> Output Control->Access Sequences->Define Condition Table for Purchase Order
    3. Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Types->Define Message Type for Purchase Order
    *4. Message Determination Schemas*
    4.1. Message Determination Schemas
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Maintain Message Determination Schema
    4.2. Assign Schema to Purchase Order
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Assign Schema to Purchase Order
    5. Partner Roles per Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control-> Partner Roles per Message Type ->Define Partner Role for Purchase Order
    6. Condition Record
    Navigation Path: SAP Menu-> Logistics -> Material Management -> Purchasing-> Master data-Messages- MN04
    Here you can maintain the condition record.
    All above steps u can do from transacton NACE also
    now when u create po in the messages u will get the out put method as u have maintained in the above steps.
    Regards,
    Manish

  • I recently purchased itunes match, but I get the message "The requested URL was not found on this server".

    I have had problems with playing music on my Iphone 5 from day 1.  I have purchased almost 500 songs in itunes, and only a handful would play.  I decided to purchase IMatch, but playing music is even more difficult.  It quickly skips through my playlists showing me the artwork/album cover for each song, and will occassionally play a song, but I mostly get the message "The requested URL was not found on this server". 
    Help Please!  I need my music on my phone for 2 hours/day!

    Ok, then as long as the videos reside on your PC, do the following:
    1) In iTunes on your PC, unsync the music videos (On the Music tab, uncheck "Include Music Videos, and then sync your iPad).
    2) Sync the music videos back to the iPad (check that same box again and sync once more).
    Does this fix it?

  • "When I try to create a new file I am getting this message:  "While executing getDynamicContent in AddressURL.htm, a JavaScript error occured".... what should I do?  Thank you, Lisa

    "When I try to create a new file I am getting this message:  "While executing getDynamicContent in AddressURL.htm, a JavaScript error occured".... what should I do?  Thank you, Lisa

    Troubleshoot JavaScript errors | Dreamweaver CS4, CS5, CS5.5, CS6
    Start with steps #4, #12 and #10.
    Nancy O.

  • How to get default values while using the transaction "BP"

    Hi Group,
    I have a query on how to get default values while using the transaction <b>BP</b>?
    The thing is:
    when I enter into the transaction "BP", I need to see some default values to some of the input fields in the screen.
    how can I achieve this?
    So please kindly let me know the procedure to achieve this.
    Thanks & Regards,
    Vishnu.

    Hi,
    The events of BDT can be used to default some fields on creating a partner.
    For this create a function module for ISDAT. attach that event in BUS7.
    In the ISDAT funtion modulethe following code should be used.
    For example to set the nationality:
    I_BUSDEFAULT-NATIO = 'DE.
    CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
    EXPORTING
    i_busdefault = I_BUSDEFAULT
    Regards, Smita.

  • I am trying to download the apps for Netflix, hbo go, pandora radio and xfinity tv. When I click on any of these links I get the message, "your request Could not be completed."

    I can't even find the hbo go or Netflix app on ITunes or the App store. When I go directly to the hbo go website or Netflix website and try to download the apps directly I keep getting the message, "your request Could not be completed." after the message pops up I am then bumped to the App store. Does anyone have a solution?

    http://itunes.apple.com/us/app/hbo-go/id429775439?mt=8
    http://itunes.apple.com/us/app/netflix/id363590051?mt=8

  • Getting error message while defining Profit Center

    Dear Expert,
    Kindly suggest while adding profit center in profit center setup on profit center field earlier it allowed to save the profit center name in alpha numeric but recently we are getting error message while updating or adding on new profit center"Conversion failed when converting the nvarchar value "Profit Center Name" to data type int (CINF)".
    If anybody had a solution or came across this kind of situation then please forward us your valuable information that would be really great to tackle and out come from this issue.
    Thanks in Advance
    Regards
    Krishna

    Dear Krishna,
    What is your B1 version and PL? Is it upgraded from an old one?
    Thanks,
    Gordon

  • Getting error message while opening PDF file.

    Hello Experts....
    I'm getting error message while opening the attached PDF file in mail.
    I'm Sending the payslip to mail which is converted into .PDF format.
    Where exactly the problem i m not getting.
    Please help....

    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
          EXPORTING
            src_spoolid                    = rqident
            no_dialog                      = ' '
           DST_DEVICE                     = out_parms-pdest
          PDF_DESTINATION                =
           get_size_from_format           = out_parms-pdest
          IMPORTING
            pdf_bytecount                  = bytecount
           pdf_spoolid                    = pdfspoolid
          LIST_PAGECOUNT                 =
           btc_jobname                    = jobname
           btc_jobcount                   = jobcount
          TABLES
            pdf                            = out_tab
          EXCEPTIONS
            err_no_abap_spooljob           = 1
            err_no_spooljob                = 2
            err_no_permission              = 3
            err_conv_not_possible          = 4
            err_bad_destdevice             = 5
            user_cancelled                 = 6
            err_spoolerror                 = 7
            err_temseerror                 = 8
            err_btcjob_open_failed         = 9
            err_btcjob_submit_failed       = 10
            err_btcjob_close_failed        = 11.
      IF sy-subrc NE 0.
      ENDIF.
    *CALL FUNCTION 'BAPI_GET_PAYSLIP_PDF'
    EXPORTING
       employeenumber       = PERNR-PERNR
       sequencenumber       = '00001'
       payslipvariant       = 'PAYSLIP-PM'
    IMPORTING
      RETURN               =
      PAYSLIP              = PAYSLIP
      PDF_FSIZE            =
    ******************CONVERTING PAYSLIP(XSTRING) TO BINARY FORMAT******
    call function 'SCMS_XSTRING_TO_BINARY'
       exporting
         buffer                = payslip
      APPEND_TO_TABLE       = ' '
    IMPORTING
      OUTPUT_LENGTH         =
       tables
         binary_tab            = OUT_TAB.
        check not ( out_tab[]  is initial ).
        refresh i_record.
        clear : i_record.
        call function 'QCE1_CONVERT'
          tables
            t_source_tab         = out_tab
            t_target_tab         = i_record
          exceptions
            convert_not_possible = 1
            others               = 2.
        if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
       do.
         i_record = it_attachment_long.
         append i_record.
         shift it_attachment_long left by 255 places.
         if it_attachment_long is initial.
           exit.
         endif.
       enddo.
        select single ltx into subject from t247
                   where mnr eq pn-begda+4(2)
                     and spras eq 'EN'.
        condense subject.
        concatenate 'Payslip for the month of' subject pn-begda+0(4)
                                  into subject separated by space.
        describe table lt_objbin lines l_att_lines.
        read table lt_objbin index l_att_lines.
        lv_document_data-doc_size = tab_lines * 255 .
        lv_document_data-obj_name = 'Payslip'.
        lv_document_data-obj_descr = subject.
    e-mail body
        clear lt_objpack-transf_bin.
        lt_objpack-head_start = 1.
        lt_objpack-head_num = 0.
        lt_objpack-body_start = 1.
        lt_objpack-body_num = tab_lines.
        lt_objpack-doc_type = 'RAW'.
    LT_OBJPACK-doc_size = STRLEN( LT_OBJTXT ).
        append lt_objpack.
    For e-mail attachment
        lt_objhead = 'payslip.pdf'.
        append lt_objhead.
        lt_objbin[] = out_tab[]."i_record[].
        "describe table i_record lines l_att_lines.
        describe table out_tab lines l_att_lines.
    CLEAR LT_OBJPACK.
        lt_objpack-transf_bin = 'X'.
        lt_objpack-head_start = 1.
        lt_objpack-head_num = 0.
        lt_objpack-body_start = 1.
        lt_objpack-body_num = l_att_lines.
        lt_objpack-doc_type = 'PDF'.
        lt_objpack-obj_name = 'attachment'.
        lt_objpack-obj_descr = 'payslip'.
        lt_objpack-doc_size = ( l_att_lines - 1 ) * 255 + strlen( lt_objbin ).
        append lt_objpack.
    make recipient list
       " check user_mail_id is not initial.
        lt_reclist-receiver =  user_mail_id.
        lt_reclist-rec_type = 'U'.
        append lt_reclist.
        call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          exporting
            document_data              = lv_document_data
            put_in_outbox              = 'X'
            commit_work                = 'X'
          tables
            packing_list               = lt_objpack
            object_header              = lt_objhead
            contents_bin               = lt_objbin
          contents_txt               = lt_objtxt
            receivers                  = lt_reclist
          exceptions
            too_many_receivers         = 1
            document_not_sent          = 2
            document_type_not_exist    = 3
            operation_no_authorization = 4
            parameter_error            = 5
            x_error                    = 6
            enqueue_error              = 7
            others                     = 8.
        if sy-subrc = 0.
          write:/ 'Mail sent to', 30 user_mail_id.
          write : sy-uline.
        else.
          write:/ 'Error encountered'.
        endif.
        clear : lt_objpack, lt_objhead, lt_objbin, lt_reclist.
        refresh : lt_objpack, lt_objhead, lt_objbin, lt_reclist.
       clear : filepath+3(17), pdffile, encryptpdf, batch_file.
        clear : out_tab, i_record, filetable.
        clear : user_mail_id, password.
      else.
        write : 'payslip not generated'.
      endif.
    end-of-selection.
    Please Check....

  • Before page refresh how to get alert message

    Hello ..
    If user refreshes webpage then from flex side how to get alert message.
    Thanks in advance.

    If you don't want it to say "Microsoft Internet Explorer," you can use a different browser. :-)
    But, seriously...
    If you really want to customize the appearance of a dialog, you can make one with DHTML that looks like anything you want. You can make it look like a system dialog if you want, but you don't have to. (In fact, if you make it look like a Windows dialog, it will stick out like a sore thumb if someone is using another OS.)
    I had to create some of these for an online testing application I wrote, because they wanted the tests to be timed, and I discovered that, in Internet Explorer, you could stop the clock just by opening certain dialogs, so I had to suppress "right-clicking," remove the menu bars, and use custom dialogs to communicate with the user. Since then I've re-used these dialogs in a number of other projects. They're pretty handy.

  • After upload I get this message:The requested URL  was not found on this se

    After a 'fresh' upload I get this message: The requested URL /terpsichoresmentor/Welcome.html was not found on this server. I tried both Cyberduck and Go Daddy - same result. (I've used Cyberduck in the past successfully) Both Firefox and Safari give me this message. Called Go Daddy and tech support told me that he could view my website and that this is a problem within my browsers. I cleared the private data in Firefox to no avail. Have done nothing in Safari (yet). Any ideas? Thanks in advance. - peggy

    Interesting, but I didn't.
    Whatever the cause, what you have posted clearly indicates that the name of the topmost page of your site somehow got changed from Welcome to welcome_.
    Plus you have your site at another url:
    http://www.terpsichoresmentor.com/terpsichoresmentor/welcome_.html
    This indicates that you uploaded it twice, once with the folder called "terpsichoresmentor" and once without it.

  • Getting error message while updating Job attributes using PP03 for IT1641

    Hey Guys,
    We are getting error message while updating Job attributes using transaction PP03 for IT1641 (WC Attributes for JOB): 'Client has status not modifiable'.
    Update to the infotype 1641 should not require open SAP system. Would anyone suggest any SAP note/solution?
    Thanks...
    Edited by: Karan Gheewala on Apr 3, 2008 9:06 PM

    Solved using Note 123383 - WC: Customizing worker's compensation tables
    Thanks,..

Maybe you are looking for

  • Release Strategy for Contract is not getting picked whereas it is ok for PO

    Dear Experts, I have created release strategy for PO with doc type, p.org, net value as chars and frg_ekko as class and release group as 02. I kept NB,FO,MK and WK as char values. it is working fine for PO's whereas it is not getting picked for Contr

  • URL View in VC7.1

    Hi all, Apparently , from VC7.1 onwards, the URL View is no longer available.  I managed to mimic this behaviour by using hte "Hyperlink" action from a button , for example, however, this always opens a NEW windows, while we prefer to embed the targe

  • Sending purchase order through e-mail

    Hi, I need to send purchase order in PDF through e-mail. I know it is possible to automatically have it sent to the vendor, but my requirement is different. PO is created as conversion of PREQ, so I need to send it not to vendor directly, but to the

  • Static Header followed by dynamic header in a single table

    static1 static2 static3 =[dynamic] Hi Experise, I need a static header followed by the dynamic one as shown above, tried a lot but not able to make it.Can you guys help me please ? thanks, Santhosh

  • Refund checks out of AP

    Hello, We are trying to issue customer refund checks out of AP. What is the process (standard if any, since we are on the same box) to send the refund details to AP for the check to be issued out of there. What preliminary steps need to be done to th