Can I create a SOAP message object from a string?

can i create a soap message object in saaj with a string containing soap xml?
I know messageFactory has a constructor that
public abstract SOAPMessage createMessage(MimeHeaders headers, InputStream in)
does anyone know how to use this? Specifically transform a SOAP message in string format to something i could pass this constructor.
Is there a better way to do this?
I'm not EVER going to use apache's tomcat or GLUE or anyting and need to send a soap message from a client to a server via SOAP. I need to be able to transfer a String SOAP document to something i can search for elements with.

sorry for being critical but the tutorial you just linked to is for the most part USELESS. it doesnt deal with Java just what a SOAP message looks like. yeah, i get it, its like xml. now how do i do what i want to with saaj?
something like
String sm;
sm = in.readLine(); //gives me a whole SOAP document (pretend)
sm--->>>MAGIC------>>>>>MIMEHeaders headers & InputStream sm_in
MessageFactory factory = MessageFactory.newInstance();
SOAPMessage message = factory.createMessage(headers, sm_in);
SOAPBody soapBody = message.getSOAPBody();
Name bodyName = factory.createName("YUP","m","http://theinternet/YUP");
Iterator iterator = soapBody.getChildElements(bodyName);
SOAPBodyElement bodyElement = (SOAPBodyElement)iterator.next();
String yup = bodyElement.getValue();
System.out.println("YUP element of the SOAP document is " + yup);what is the MAGIC in the above code?

Similar Messages

  • Can we create a BAM data Object from two tables

    Hi ,
    I want to pull the data from two tables and create a BAM data object, Is it possible in BAM?
    Do the needful
    Regards,
    Francis

    The sample way is using AQ on database. You can create a database view to join the tables. And create AQ on the view, create a ems to listen on the queue.

  • After downloading 4.0 I get this message: JavaScript application can't create mcafee plug-in object: TypeError: components.classes[cid] is undefined

    I finished downloading Firefox 4.o to my Mac OS.X.
    When I try to open a website I get the message:
    [JavaScript Application] can't create mcafee plug-in object: TypeError: Components.classes[cid] is undefined
    If I click the OK button, the site opens, but without the McAfee alert at the bottom of the window.
    I had just downloaded 3.6.16, and got box suggesting download version 4.0 for better security, but that seems to be where the problem is!

    That indicates that an add-on you are using is not compatible, considering the other errors it is possibly the McAfee add-on. To confirm what add-on is causing this use the procedure in this link - https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • The following error message came when I tried to open Firefox and install Firefox Home. "can't create mcafee plug-in object: TypeError: Components.classes[cid] is undefined"

    The following error message came when I tried to open Firefox and install Firefox Home.
    "can't create mcafee plug-in object: TypeError: Components.classes[cid] is undefined"

    This issue can be caused by an extension or plugin that isn't working properly.
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • Can you create an object from a string

    I have been working on creating a dynamic form, creating the
    form items from an xml file. I am getting very close to conquering
    this task. I will share it when it's complete.
    However, I am stuck at the moment trying to create an object
    from a string. For example, if the xml item is an HBox I want to
    create an HBox. Like this: parentObject = new arrayOfFormItems[
    index ]..type ()
    This isn't working. First, is this possible using some syntax
    I am unaware of in Flex? I don't want to use a large if or case
    statement if possible.
    Thanks in advance for your help!

    Thank you very much. Indeed that did solve the one problem. I
    missed the casting as a Display Object. That is awesome!
    I do still however, have to instantiate one of every item I
    want to dynamically create or I get the following error when I try
    to create a dynamic object that I have not instantiated before.
    ReferenceError: Error #1065: Variable HBox is not defined.
    at global/flash.utils::getDefinitionByName()
    at MyForm/buildForm()
    at DynamicForm/::onComplete()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    I read that you have no choice but to instantiate one of each
    type to force the linker to link the code for that class into the
    .swf. Unless you know another way to force it.
    This is what I have in my Application mxml to get it to work:
    <mx:HBox>
    <mx:Text visible="false"/>
    <mx:TextArea visible="false"/>
    <mx:TextInput visible="false"/>
    <mx:DateField visible="false"/>
    </mx:HBox>
    And those are the types I'm using to test with. . . I will
    have to add all the others I want to use as well . . .

  • How to Call web service operation by creating plain SOAP message in client?

    Hi
    Thank you for reading my post.
    I have some questions about using web methods of a web service which i would be very gratfull if you could answer.
    I should implement a web service that should receive a file with some other parameters from client and another web service which should receive some parameters and return a file.
    I used a mechanism like the following one to handle the condition and it just works. But I have a problem, I need to create dynamic invocation and I must create soap message and send it to webservice (no IDE generated code)
    What i need is one or two tips or a sample that shows how we can send and receive files by web services.
    I want to know how we can create the SOAP message ourself and then send it to the web service endpoint and it call the web method and ....
    Imagine the following web method, How i can invoke it by creating soap message myself and sending it to end point.
    @WebMethod
    public String saveFile(@WebParam(name = "fileName") String fileName, @WebParam(name = "fileContent") byte[] fileContent) {
    // TODO implement operation
    return "Something";
    Another question is :
    Does this mechanism that i used to transfer files is OK?
    Is it optimized or there are some other ways to do this job.
    I should say that i put one week on handlers to use soap attachments and i get no result.
    So, Please let me know if you know or have some sample that show me how to do the above job.
    Thanks.

    Hi
    From NW04s SP8 you can create webservice systems from within VC , and you will have the option of adding a user and password to authenticate. You can find it at Tools>>Define web service system. You will see a check box url requires user and password.
    If for some reason you can not do it in VC then you should create the system in the portal and fill out the usermapping screens.
    Jarrod Williams

  • Can't create mcafee plug-in object: TypeError: Components.classes[cid] is undefined

    I updated to Firefox 4.0 and ever since then, I get this message when I try to open Firefox:
    can't create mcafee plug-in object: TypeError: Components.classes[cid] is undefined
    I have a Mac and have McAfee protection for Mac. This problem did not happen before I updated Firefox. Once I click on "OK" Firefox opens.

    This issue is most likely caused by a McAfee extension that isn't working properly and you will have to disable the extension that causes it.
    You can also check if there is an update available from McAfee that fixes this problem.

  • How can I fill a table of objects from cursor with select * bulk collect???

    Hi All, I have a TYPE as OBJECT
    create or replace type dept2_o as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    I can fill a table of objects from cursor with out select * bulk collect...., row by row
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    i integer;
    begin
    i:=0;
    dept_o_tab.extend(20);
    for rec in (select * from dept) loop
    i:=i+1;
    dept_o_tab(i):=dept2_o(
    deptno => rec.deptno,
    dname => rec.dname,
    loc =>rec.loc
    end loop;
    for k IN 1..i loop
    dbms_output.put_line(dept_o_tab(k).deptno||' '||dept_o_tab(k).dname||' '||dept_o_tab(k).loc);
    end loop;
    end;
    RESULT
    10 ACCOUNTING NEW YORK
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    But I can't fill a table of objects from cursor with select * bulk collect construction ...
    declare
    TYPE dept2_t IS TABLE of dept2_o;
    dept_o_tab dept2_t:=dept2_t();
    begin
    dept_o_tab.extend(20);
    select * bulk collect into dept_o_tab from dept;
    end;
    RESULT
    ORA-06550: line 6, column 39;
    PL/SQL: ORA-00947: not enough values ....
    How can I fill a table of objects from cursor with select * bulk collect???

    create or replace type dept_ot as object (
    deptno NUMBER(2),
    dname VARCHAR2(14),
    loc VARCHAR2(13));
    create table dept
    (deptno number
    ,dname varchar2(14)
    ,loc varchar2(13)
    insert into dept values (10, 'x', 'xx');
    insert into dept values (20, 'y', 'yy');
    insert into dept values (30, 'z', 'zz');
    select dept_ot (deptno, dname, loc)
      from dept
    create type dept_nt is table of dept_ot
    declare
       l_depts dept_nt;
    begin
       select dept_ot (deptno, dname, loc)
         bulk collect
         into l_depts
         from dept
       for i in l_depts.first .. l_depts.last
       loop
          dbms_output.put_line (l_depts(i).deptno);
          dbms_output.put_line (l_depts(i).dname);
          dbms_output.put_line (l_depts(i).loc);    
       end loop;
    end;
    /

  • Creating a Mavericks USB boot drive after the horse has bolted.  Can I create a bootable USB drive from my iMac after installing Mavericks without saving the Install OS X Mavericks.app file?  Do I need to re- download the whole 5.29 Gb again?

    Creating a Mavericks USB boot drive after the horse has bolted.  Can I create a bootable USB drive from my iMac after installing Mavericks without saving the Install OS X Mavericks.app file?  Do I need to re- download the whole 5.29 Gb from the App Store again?  My problem is my 4Gb/month allowance on a 12 month contract.  I cannot purchase a data block from my ISP and although my speed is theoretically slowed to 64k after reaching my 4Gb, it actually ceases to download in reality.

    HI tasclix, it depends what you mean by an OS X boot drive.
    If you want a recovery disk from which you can reinstall (by re-downloading) or recover from a time machine backup, then nbar is correct.
    If, however, you want to boot and run the OS X installer from the USB drive (so that you don't need to download again), then you will need a copy of "Install OS X  Mavericks.app"; see this article:
    http://support.apple.com/kb/HT5856
    Before downloading again, search your system to see if the installer is still there - it's usually in the /Applications folder unless it has been deleted, but check your whole system for it anyway, you never know, you might still have it somewhere.
    Message was edited by: SilverSkyRat

  • How to create a Document object from a string.

    If I use the following code, the input String cannot contain "\n", otherwise, it generates errors.
    in the following code, inputXMLString is a String object that has xml content.
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(new InputSource(new StringReader(inputXMLString)));          How can I create a Document object from a string with "\n" in the string?
    Thanks.

    If I use the following code, the input String cannot
    contain "\n", otherwise, it generates errors.That's going to be a huge surprise to thousands of people who process XML containing newline characters every day without errors.
    Perhaps your newline characters are in the middle of element names, or something else that causes your XML to be not well-formed. I'm just guessing here, though, because you didn't say what errors you were getting.

  • Creating an arrays of objects from a class

    I was wondering does any one know how to create an array of objects from a class?
    I am trying to create an array of objects of a class.
    class name ---> Class objectArray[100] = new Class;
    I cant seem to make a single class but i need to figure out how to create an array of objects.
    I can make a normal class with Class object = new Class

    There are four lines of code in your for-loop that actually do something:
    for(index = 0; index < rooms.length; index++) {
    /*1*/  assignWidth.setWidth(Double.parseDouble(in.readLine()));
    /*2*/  rooms[index] = assignWidth;
    /*3*/  assignLength.setWidth(Double.parseDouble(in.readLine());
    /*4*/  rooms[index] = assignLength;
    }1.) Sets the width of an object, that has been instantiated outside the loop.
    2.) assigns that object to the current position in the array
    3.) Sets the width of a second object that has been instantiated outside the loop
    4.) assigns that other object to the current position in the array
    btw.: I bet you meant "assignLength.setLength(Double.parseDouble(in.readLine());" in line 3 ;)
    Since each position in an array can only hold one value, the first assignment (line 2) is overwritten by the second assignment (line 4)
    When I said "construct a new room-object and assign it to rooms[index]" I meant something like this:
    for(index = 0; index < rooms.length; index++) {
        Room aNewRoom = new Room();
        aNewRoom.setWidth(Double.parseDouble(in.readLine()));
        aNewRoom.setLength(Double.parseDouble(in.readLine());
        rooms[index] = aNewRoom;
    }1.) Constructs a new Object in every iteration of the for-loop. (btw: I don't know what kind of objects you're using, so this needs most likely modification!!)
    2.) set the width of the newly created object
    3.) set the length of the newly created object
    4.) assign the newly created object to the current position in the array
    -T-
    btw. this would do the same:
    for(index = 0; index < rooms.length; index++) {
        rooms[index] = new Room();
        rooms[index].setWidth(Double.parseDouble(in.readLine()));
        rooms[index].setLength(Double.parseDouble(in.readLine());
    }but be sure you understand it. Your teacher most likely wants you to explain it ;)

  • How can I create a java.awt.Image from ...

    Hi all,
    How can I create a java.awt.Image from a drawing on a JPanel?
    Thanks.

    JPanel p;
    BufferedImage image =
        new BufferedImage(p.getWidth(), p.getHeight, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = image.createGraphics();
    p.paint(g);
    g.dispose();

  • How can I print a text message conversation from my iPhone? Not using screenshots.

    How can I print a text message conversation from my iPhone? Not using screenshots. It's around 500 messages so screenshots is not a option.

    Yes, you can delete from iphone:
    http://manuals.info.apple.com/enUS/iPhone_iOS4_UserGuide.pdf
    It is covered in the manual.
    Page 172:
    "Delete a podcast: In the Podcasts list in iPod, swipe left or right over the podcast, then
    tap Delete. "

  • How can you create a writable PDF document from a PPT presentation ?

    How can you create a writable PDF document from a PPT presentation ? Upper part with the image , lower part with a free space in order to take notes for students during presentation or course.
    Thanks.
    B

    You can make a PDF file out of you notes and handouts but using the Adobe PDF printer.
    Open your PowerPoint Document then go to “File” “Print”
    Select ‘Adobe PDF” Printer
    Under slides, select which way you want to print. Note it will not print to a printer but to a PDF file.
    After then go into printer Properties and Setup PDF properties, do the following: (see second image below)
    Default: PDF/A 1-b
    Adobe Security: none (change as needed)
    Adobe Output folder: Prompt for Adobe file name
    Adobe Page size: Letter (change as needed)
    Check the following check boxes
    View Adobe PDf Results,
    Add Document Information,
    Rely on system fonts only,
    Delete Log files for successful jobs.
    Select OK
    A pop will ask you where you want to save the document. The file extension should be PDF. After giving the file name select okay and the file should popup as a PDF. Down side is if you want to speaker notes included then you will have to do another file, like wise with just screen shots then combine into one PDF document.
    I used Acrobat IX Pro. So to do this you need Acrobat IX or X Pro.
    Hope this will help.
    Tiger26

  • Hi,  My IMac Superdrive has gone bust and i need to re-install Adobe CS5.5 design premium middle east version.   I have the original version DVD with me.   But i am unable to install.   Can i create an USB installation drive from the DVD or can you please

    Hi,  My IMac Superdrive has gone bust and i need to re-install Adobe CS5.5 design premium middle east version.   I have the original version DVD with me.   But i am unable to install.   Can i create an USB installation drive from the DVD or can you please send me a link to download the Middle east version of Adobe CS 5.5 design premium.   After downloading i can enter the product key which i had bought.  appreciate if anybody can offer a solution urgently.   All my jobs are held up. thanks

    Download CS5.5 products
    Mylenium

Maybe you are looking for

  • No phone/broadband for a week!!!!!

    April this year, phone and bb went off late one night - seems someone pinched some cable locally - was a week before we got services back.  No compensation offered. Last Tuesday, 1.30 in morning, same thing happens, half village cut off.  NO ONE AT B

  • Itunes was updated on my windows computer and now itunes will not work

    While downloading an update of itunes, I rec'd an error message that it was not installed successfully.  Now if I try to start itunes I get a message "APSDaemon.exe system error Program connot start because MSVCR80.dll is missing.  Try reinstalling t

  • Emails with MS word attachments not arriving, but Pages attachments okay

    When I send an email with a Word attachment that was originally created in MS Word (v 11.3.5), the email does not arrive at its destination. I've started bcc'g myself to doublecheck and it seems consistent, no matter where it is going. It shows up as

  • IGrid DeSelect Property Not Functioning When Set In Javascript

    I am trying to dynamically turn on and off the [AllowDeselect] property in an iGrid, using JavaScript.  The need is driven by the lack of a deselect event in the applet.  I am updating a row selection count on the web page, as a user selects and dese

  • Exception : java.lang.NoSuchMethodError: sun.io.ByteToCharGBK.getIndex1()[S

    Hi, We are having webApplication Built using servlets.When invoking a URL ( HTTP GET) we are getting exception and stack trace shows JSP Error: Request URI:/OA_HTML/OA.jsp Exception: java.lang.NoSuchMethodError: sun.io.ByteToCharGBK.getIndex1()[S Any