New to SOAP - How to create SOAP message for the SOAP described

Hi Friends,
Im bit new to SOAP-JAVA interactions.
I have an SOAP describing
POST /abc/WebSrevices/MyService.asmx HTTP/1.1
Host: 127.0.0.1
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/BillingAddressValidation"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<BillingAddressValidation xmlns="http://tempuri.org/">
<inXml>string</inXml>
</BillingAddressValidation>
</soap:Body>
</soap:Envelope>
My question is How can I construct an equivalent JAVA message using SAAJ
I wrote like the following
public void performSOAPReadWrite(String transaction){
try{
SOAPConnectionFactory scf = SOAPConnectionFactory. newInstance();
SOAPConnection con = scf.createConnection();
MessageFactory mf =
MessageFactory.newInstance();
SOAPMessage msg = mf.createMessage();
SOAPPart sp = msg.getSOAPPart();
SOAPEnvelope envelope = sp.getEnvelope();
//Adding Content to the Header
envelope.getHeader().detachNode();
SOAPBody body = envelope.getBody();
SOAPElement billingAddressValidation =
body.addChildElement("BillingAddressValidation","http://tempuri.org/");
SOAPElement inXml =
billingAddressValidation.addChildElement("inXml");
inXml.addTextNode(transaction);
URL urlEndpoint = new URL(DEFAULT_SERVER);
// 127.0.0.1/abc/WebSrevices/MyService.asmx
System.out.println("Sending Message");
SOAPMessage reply = con.call(msg,
urlEndpoint);
System.out.println("Reply is "+reply);
}catch (Exception e) {
e.printStackTrace();
// TODO: handle exception
Can any one let me know whats wrong in this ?
Thanx in advance
Im waiting for ur reply
Mahesh Raja Vandyala
Senior Analyst

Hi,
When im running the program I am getting a
javax.xml.soap.SOAPException: Failed to send message:java.io.IOException: The server at http://127.0.0.1/abc/WebSrevices/MyService.asmx returned a 500 error code ( Internal Server Error )
Please ensure that ur URL is correct and the Web service has deployed
This is web service is provided by .net team and im required to take the services of that web service to retrieve some information provided by that.
I can launch the webservice definition thru IE....their they have provide a text box with a Invoke button.
The same data that im sending thru code if invoked thru IE is working fine.
I suspect that the way Im construcint the SOP message is wrong.
Any help in finding out the correctness of the Message in the java code ?
Thanx
Mahesh

Similar Messages

  • How to give error message for the screen element text field when wrong i/p

    How to give error message for the screen element text field when wrong i/p
    when wrong input given
    eg. 
    I have a text box with SBOOK-CARRID
    so when user give wrong entry in text box i.e LG
    then I should give some error stating that the the input is invalid or not available ,
    now it showing the error of standard messages,
    i want manual message to be displayed when error comes.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi all,
    Thank you for your valuable reply,
    but the thing is that its a screen field,
    i.e text box not a selection screen
    i created in screen layout
    with name sbook-carrid
    now i want to get error message display if wrong i/p is given
    thank you.
    Regards,
    Jagrut bharatkumar Shukla,

  • How to create a validation for the project coding mask

    Hi,
    Would just like to ask how to create a validation for the project coding mask wherein the WBS elements hierarchy will be checked against the template saved. For example,
    project coding mask is XXXX-XXXXX-XX-X-X-X-00-X
    mother WBS should be XXXX-XXXXX-X and lower level WBS would be XXXX-XXXXX-XX.
    The validation should not allow a mother WBS to be XXXX-XXXXX-XX.
    How can we go about this?

    Hi Jacquiline Bersamin,
    You can use validation with the combination of the level and the coding mask.
    In the validation:
    Pre requisite: WBS level = 1
    Validation: Prps-posid = prps-posid :1-12:
    Message : Error
    If required you can give the parameters for your detail error message.
    Please let me know if this does not work.
    Thanks
    Regards
    Srinivasan Desingh

  • How to create a password for the pdf file

    In Adore Acrobat XI, how to create a password for the file? The help states going to Tools Menu and clicking on Protection tab - but there is no such option. In the file - properties - security screen, it shows the security details but does not allow to edit it.

    I think you may be mixing up two different products: Adobe Reader (free), and Acrobat ($$).

  • HOW TO CREATE SEVERAL folder for the generation and READING FILE

    HOW TO CREATE SEVERAL folder for the generation and READING FILE WITH THE COMMAND utl_File.
    please give an example to create 3 folders or directories ...
    I appreciate your attention ...
    Reynel Martinez Salazar

    I hope this link help you.
    [http://www.adp-gmbh.ch/ora/sql/create_directory.html]
    create or replace directory exp_dir as '/tmp';
    grant read, write on directory exp_dir to eygle;
    SQL> create or replace directory UTL_FILE_DIR as '/opt/oracle/utl_file';
    Directory created.
    SQL> declare
      2    fhandle utl_file.file_type;
      3  begin
      4    fhandle := utl_file.fopen('UTL_FILE_DIR', 'example.txt', 'w');
      5    utl_file.put_line(fhandle , 'eygle test write one');
      6    utl_file.put_line(fhandle , 'eygle test write two');
      7    utl_file.fclose(fhandle);
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> !
    [oracle@jumper 9.2.0]$ more /opt/oracle/utl_file/example.txt
    eygle test write one
    eygle test write two
    [oracle@jumper 9.2.0]$
    SQL> declare
      2    fhandle   utl_file.file_type;
      3    fp_buffer varchar2(4000);
      4  begin
      5    fhandle := utl_file.fopen ('UTL_FILE_DIR','example.txt', 'R');
      6 
      7    utl_file.get_line (fhandle , fp_buffer );
      8    dbms_output.put_line(fp_buffer );
      9    utl_file.get_line (fhandle , fp_buffer );
    10    dbms_output.put_line(fp_buffer );
    11    utl_file.fclose(fhandle);
    12  end;
    13  /
    eygle test write one
    eygle test write two
    PL/SQL procedure successfully completed.
    SQL> select * from dba_directories;
    OWNER                          DIRECTORY_NAME                 DIRECTORY_PATH
    SYS                            UTL_FILE_DIR                   /opt/oracle/utl_file
    SYS                            BDUMP_DIR                      /opt/oracle/admin/conner/bdump
    SYS                            EXP_DIR                        /opt/oracle/utl_file
    SQL> drop directory exp_dir;
    Directory dropped
    SQL> select * from dba_directories;
    OWNER                          DIRECTORY_NAME                 DIRECTORY_PATH
    SYS                            UTL_FILE_DIR                   /opt/oracle/utl_file
    SYS                            BDUMP_DIR                      /opt/oracle/admin/conner/bdumpRegards salim.
    Edited by: Salim Chelabi on Apr 4, 2009 4:33 PM

  • How to create a playlist for the movies I have?

    Hope someone can help me here. How do you set the movies to play continuously? I can't seem to create a playlist for the movies. You can create playlist for podcast videos and musics but how do you creat playlist for the 3 movies I have got on my iphone?
    Any help will be greatly appreciated.

    Not exactly true. As absurd as it sounds, if you have just one music track in your playlist, then you can select it from the Playlists section on the iPhone and play your videos, movies etc. one after the other.
    I have created a completely empty music track in Garageband which I drag onto the end of each and every video playlist I create. An ugly solution, but it works.
    You have to remember to check the playlist in both the Video and Music sections in iTunes->Devices->Your iPhone.

  • How to create search path for the file on the desktop..

    hello experts..
          I have used gui_upload module to upload the data from flatfile to the internal table, in that how can i create search path for the file selection in the selection screen, also please help me the code to update the ztable.
    thanks

    HI
      If iam not wrong you want to select a file from a location that you don't know so if this is ur problem then use the function module
    F4_FILENAME
    this FM helps to locate and select the desired file from the system.
    Sample code that you can check is
    How to get windows filename
    PARAMETERS: lv_file LIKE rlgrap-filename.
    Method 1
        CALL FUNCTION u2019KD_GET_FILENAME_ON_F4u2019
        EXPORTING
        MASK = u2019,.txt,.*u2019
        STATIC = u2019Xu2019
        CHANGING
        FILE_NAME = LV_FILE.
    Method 2
    CALL FUNCTION u2019F4_FILENAMEu2019
    EXPORTING
             program_name = syst-cprog
             dynpro_number = syst-dynnr
             field_name  = u2019 u2019
         IMPORTING
             file_name   = LV_FILE.
    Regards
    Pavan

  • How to creat business process for the user?

    Hi
    when i use to create message in notif_creat i am getting error message Business partner Neni_SM does not exist
    please help me
    Regards
    Neni

    Problem : when i use to create message in notif_create i am getting error message Business Partner Neni_sm cannot be the reporter
    Admin_sm(Key user)
    Neni_sm(sub user)
    Neni_sm1(sub user)
    Step Followed
    1L.ogon to System Admin_sm go to Code:BP
    2.When I use to select Display in BP role as “Employee”
    3 required Data filled in “address tab”
    4.In Identification tab  I can only c subtab
    Employee data:
             Personnel number
             User Name:neni_sm
    5.When I use to select Display in BP role as “Employee in cfloders”
    Employee data:
             Personnel number
             User Name :neni_sm
    Identification number
              External BP number :<SID>< installation number of the system>only this 2 r possible
    Now problem is  When I  logon to Neni_sm(sub user)system  create message in notif_creat i am getting error message <b>Business Partner Neni_sm cannot be the <u>reporter</u></b>
    <b>Requirement</b>: I have to give access to create message for the following user Neni_sm(sub user)
    Neni_sm1(sub user) 
    Where I have already  created user: neni_sm and also   roles
         SAP_SUPPDESK_ADMIN
         SAP_SUPPDESK_CREATE
         SAP_SUPPDESK_DISPLAY
         SAP_SUPPDESK_PROCESS
    Please help me
    Regards
    Neni

  • How to create an Invoice for the sales order using the T-Code VF01

    Hello Experts,
    How to create an Invoice for a sales order using the T-Code VF01?
    Thanks in advace,
    Suma

    hi,
    Make the following settings-
    1. Create sales document and billing type
    2. assign billing type in sales document type config VOV8
    3. Activate itemcategory as sales order related billing
    4. Maintain copy control header and item level between sales order and billing
    5. Maintain pricing procedure for sales order and billing
    6. Define Output procedure in case to print invoice
    Regards
    Goutham

  • How to create a matchcode for the list of Customers "Group key" KNA1-KONZS

    Hi All,
    with reference to the creation of "Group key" KNA1-KONZS for Customers,
    I'd like to know if is possible to create a matchcode for the list of Customers "Group key" created.
    Thanks
    Gandalf

    Hi
    MAINTAIN THE GROUP KEY IN GENERAL DATA ---CONTROL DATA SCREEN
    If the customer or the vendor belongs to a group, you can enter a group
    key here. The group key is freely assignable.
    If you create a matchcode using this group key, group evaluations are
    possible.
    KNA1-KONZS
    Cya
    udayakumar

  • How to create a BADI for the sceanrio

    Hi abapers,
    I have a scenario as follows.
    I create a Transaction where in i put the details of the product and quantity for a particular project's site. The amount gets calculated based on the products  unit value and its displayed in net value field. Now the user saves the transaction and a number gets generated. If the net value amount is less than 500 then the user can approve , if its greater than 501 and less than 1500 then a mail should be generated to his superior who is able to approve and ifs amount is greater than 1501 then a mail should be generated to the top of hierarchy who should approve it.
    Now the real challenge is if the same project card  has more than 1  new request and the amount is less than 500 the user should not be able to approve  instead it should generate a mail to his hierarchy for approval  since  the site has already been exceeded its limit of approval. bcoz earlier 500 and current 400 which will make it to greater than 500.similarly for the hiearchy.How do i go about  it.
    Now i want to create a BADI  on the save event of transaction to check the net value amount as well as check for earlier amounts saved for the particular site.
    Any help will be appreciated.
    Regards,
    Navin .

    hai navin
    r u using ECC 6.0 or 4.7 if 4.7 u can create badi defintiion directly form se18 transaction
    and define the interface and its methods , once u define them activate them
    and to use in ur code u create an instance of ur badi name
    and then use
                     cl_exithandler=>get_instance  method in instance name parameter just pass ur badi name and this will create a badi defintion in ur code, and an oen can implement it
    if u r usign ecc6.0 then u can either create new badis usign enhancments or classical badis
    for clasical badis just go to menu  utilites and create classical badis and follw the sam eprocedure
    regards
    m.a

  • Help to create log message for the failure of procedure

    Hi,
    I want to create a log message ,if my stored procedure stops executing or gets hanged due to some reasons.
    Can any one guide me how can i include this log message in some external file so as each time my stored procedure fails a message will be logged in the file that the procedure has failed or hanged.
    pls help
    regds
    debashis

    I'm afraid I don't understand what you're trying to accomplish here. What is "command is successfully executed" intended to represent in your CREATE statement and in the anonymous PL/SQL block.
    What do you mean "it should occur in row by row order" and "success message of execution should be displayed in the log file"?
    Why are you trying to log to an external file rather than a table in the database? When you start talking about "row by row" and "success message", that starts to imply that you're going to be logging a lot of stuff. Logging a lot of data to an external file is going to be a substantial performance burden. Are you sure that is what you want to accomplish?
    Justin

  • How to create clean text for the web in Photoshop/Illustrator

    I am puzzled to death on how in the world to get clean text for the web in Photoshop/Illustrator, particularly white text. I want my text to turn out exactly like the text at this website: thepainteddoor.org
    If you scroll down to the bottom of that page, notice the titles "Featured Media", "Social Networking", and "Contact Information". They are all .gif images. I have tried to replicate what these images look like for about 3 hours now to no avail. Can anyone tell me how to do this? It just looks like a simple outline or drop shadow, but I can't get it to show up like that. If someone could help me replicate that effect with text (aka make it show up clean as an image), I would graciously give them money through PayPal*.
    * = I will only give cash if it will replicate it exactly (and I mean exactly)..and it won't be too much..I'm a poor college student. :-P
    Thanks in advance!
    Thomas

    You would do it the way I created it:
    Select the Text tool in Photoshop and set the font and parameters as I have listed.  Then enter whatever text you like.  It will be rendered over the top of the lower layers you may have in the document.  Save as an image of the appropriate type and you're there.
    Note that "lower layers you may have in the document" could conceivably be none at all (i.e., you render the text over a transparent document).  You could imagine saving that as a .png with transparency and get light text in an image that could then be put over the top of anything else.  The alpha mixing will see to it that the edges smoothly blend with the background.  I haven't actually tried this (I usually do try my own suggestions) because of lack of time right now.
    -Noel
    Edit:  Markerline and I seem to be on the same crystal-controlled wavelength. 

  • How to handle warning message for the fields in tab merging , PERSONAS 2.0

    Hi all,
    Please advice me on the below issue.
    In a transaction VA32 , I have merged the fields from one tab to another tab using tab caching.
    when i try to change the value of  a merged fields , it throws the warnings message. So it is continuously looping from one tab to another tab.
    So i tried to use the additional editor concepts in tab caching as below.
    Looping is stopped and throws warning message in the same tab.
    All the changes are saved successfully only when the enter button is clicked once in the main screen, else the changes are not saved and my previous value remains.
    Anybody have an idea on how we can use Additional actions in Tab caching concepts.
    Thank you,
    Arun

    Hi Kranthi,
    When i try to save the fields which i merged from different tab is not saving.
    Please find the below details.
    Green highlighted fields are custom fields which is merged from different screen like header or item overview screen. This is handled in script button.
    Red highlighted fields are merged from different tab like shipping or sales using tab caching concept.
    While changing the value of the fields which is merged from different tab , and press ENTER then it throws the Warning message if occurs.
    After warning message, if i try to save using the script button for copying all the custom fields which is merged from different screen , pasted it to their respective screens and also saved.
    Its working fine.
    When i try to save it before pressing ENTER button then the respective changes had made in the merged fields from different tab are not reflected.
    How we can handle this issue?
    Thank you,
    Arun

  • How to create a service for the OHS (Apache 2.0) on Windows?

    I've downloaded the Oracle HTTP Server (Apache 2.0) (10.1.3.3.0).
    It works also fine with DB 10gR2 and APEX.
    But how do I create a windows service for the opmnctl.exe?
    Thanks
    Ralph

    I've downloaded the Oracle HTTP Server (Apache 2.0) (10.1.3.3.0).
    It works also fine with DB 10gR2 and APEX.
    But how do I create a windows service for the opmnctl.exe?
    Thanks
    Ralph

Maybe you are looking for

  • Using Mac as a broadcast monitor

    I have a unibody macbook pro and am wanting to use it as a broadcast monitor for field production, we are using a panasonic p200 and wanting to know what is the best way to play back with minimum or no lag, i have final cut studio and also adobe on-l

  • No sound in Quicktime 7.5

    Hi all, i've just updated my QuickTime to 7.5 through Software Update, i was already using QuickTime to watch movies, now the image still works but there's no sound in some .avi movies that used to have it (sound still present in others)?? the wmv mo

  • Function Module for Changing status of a Functional Location.

    Hello, I am writing a Proxy for changing the Functional Location (T code IL02). I need to set the Deletion flag for the Functional Location. Can any body help me with how to do this. As data will be coming from XI and I have to update the Functional

  • Permission errors for AIR forum

    I keep trying to visit the Adobe Air forum and I keep getting an error (a javascript alert box actually) which says "Error: Sorry, you do not have permissions to access the requested object". WTF?

  • Aggregate query on global cache group table

    Hi, I set up two global cache nodes. As we know, global cache group is dynamic. The cache group can be dynamically loaded by primary key or foreign key as my understanding. There are three records in oracle cache table, and one record is loaded in no