How send to an XML web service?

I am brand new to Flex. I am writing a program that uses web services to send and receive data. I got so that he can receive the XML of the web service. However, I also need to send it, and I'm stuck.

I tried the following code:

< mx:WebService id = "MyService".
"WSDL =" http://localhost/FlexTest/service1.asmx?WSDL "
useProxy = "false".
result = "resultHandler (Event)" >

<!-Entry: XML Document... Output: String->
< mx:operation name = "HelloPersonAcceptsXmlDocumentReturnsString" >
< mx:request >
< personXmlDoc > xmlPerson < / personXmlDoc >
< / mx:request >
< / mx:operation >

<!-Entry: XML node... Output: String->
< mx:operation name = "HelloPersonAcceptsXmlNodeReturnsString" >
< mx:request >
< personXmlNode >
xmlPerson.Person
< / personXmlNode >
< / mx:request >
< / mx:operation >

<!-Entry: String (XML Format)... Output: String->
< mx:operation name = "HelloPersonAcceptsXmlStringReturnsString" >
< mx:request format = "xml" >
"< personXmlString > < p1:Person xmlns:p1 =" http://impact-tech.com/schemas/FlexTest "> < p1:ID > f1bd45fc - 544 b-489 d-83cf-349d1f9740ec < / p1: I D > < p1:FirstName > Joe < / p1:FirstName > < p1:MiddleName > c. < / p1:MiddleName > < p1:LastName > kick < / p1:L astName > < p1:BirthDate > 2006-09-11 T 14: 03:04.4755443 - 04:00 < / p1:BirthDate > < p1:IsMarried > < /p1:IsMarried > false < p1" : NumChildren > 0 < / p1:NumChildren > < p1:NetWorth > 100000 < / p1: NetWorth > < / p1: Pers on > < / personXmlString >
<!-{xmlPerson.toXmlString ()} < personXmlString > < / personXmlString >->
<!-{txInput.text} < personXmlString > < / personXmlString >->
< / mx:request >
< / mx:operation >

< / mx:WebService >

In the first operation, 'HelloPersonAcceptsXmlDocumentReturnsString', I try to send an XML object. During the second operation, 'HelloPersonAcceptsXmlNodeReturnsString', I try to send the root node, xmlPerson.Person. In both cases, what is actually sent is literally the text that I put in the node < application >, not the object the text refers. For the first, "xmlPerson" then gets sent to the target, not the XML doc what it refers to.

In the third operation, I tried three different things, and two are commented. I tried to refer to the XML object using the toXmlString() method, but again, it has literally sent the text "xmlPerson.toXmlString ()". I tried the brace link, but then nothing is sent to the web service. I also tried to build the XML node and with values, but I get an error from the web service saying that it cannot be analyzed because there is an illegal line 1, position 1 character. The only thing that worked was to add a text entry box, copy - paste the exact same structure XML that I tried to build manually and then use binding to the text property of the control InputText. Then it works fine. But I can't actually do, it's just to test.

So my question is how a < application > node that is part of the web service operation that makes reference to an object and sends the value of this object to the web service, not literally all text is typed into this node. I looked at Web Services and sections of the help data binding and did not see examples on this. Everything was much more simplistic with binding to controls. Can someone help a newbie, please?

I do not understand how this isn't a matter of Flex Builder, since it has to do with how Flex Builder interacts with web services and how objects are used in the binding in MXML.

But anyway, I got this code for future reference of someone else to research work in this forum:

Declare a custom in MXML class has been the key to allow the correct link:


"WSDL =" http://66.129.123.211/FlexTest/service1.asmx?WSDL "
useProxy = "false".
result = "resultHandler (Event)" > "




{testPerson.GetXmlDoc ()}

Tags: Flex

Similar Questions

  • How can I activate the web service on 8600

    How can I activate the web service on 8600

    How can I activate the web service on hp 8600

  • How to create the channel listens for XML/web services line

    Hi, I'm new to B2B 11 g, would ask tht,.

    I followed the tutorial of B2B using generic file and it works fine. However,.
    If I want to receive the trading partner thought web XML server, how can I configure the channel look, what protocol to use.


    And can any1 kindly refer me to any link or info?

    Thank you.

    However... If remote partner is going to send me thought web services and no thought record, should I do something on my B2B? has I need specific, any channel listen extra?

    N ° no additional configuration is required to receive files via HTTP. Just ask your TP to post files on one of the below URL.

    http://hostname:soa_server_port/b2b/httpReceiver or http://hostname:soa_server_port/b2b/transportServlet

    If you just want to test your B2B, if it is correctly configured best way is to have another facility of B2B (may be a new domain) who will laugh at your configuration TP. This configuration of B2B send message to your B2B on HTTP (on one of the above URL) and see if gets treated with success.

    If you just want to test if your B2B is ready to accept messages over HTTP, then go to the URL above browser and make sure that you see below message-

    "B2B Server is ready to accept messages HTTP from the trading partner.

    Kind regards
    Anuj

  • How to send data to a Web service

    Hello everyone. I have a very simple example of sending data (2222) to an existing Web service as follows:

     topmostSubform.Page1.SEND::click - (JavaScript, client)
    var url="http://Localhost:8080/4DWSDL";
    var serv = SOAP.connect(url);
    app.alert("hello ");
    serv.MethodeSOAP(2222);
    app.alert("hello 2");
    
     
    

    However, it works fine in Acrobat, but not in the drive. Is it possible to make it work?

    In addition, although in this example, the data to be sent are only worth 2222, but my goal is to send all the information from the form to a Web service. Someone has tried it before, or is there an other way easier to do? I would appreciate any suggestion on your part thanks

    Hello

    Via web service calls data connections will not work in the drive, unless the form has been activated in LC Reader Extensions ES2 to drive:

    I have a summary here:

    http://www.assuredynamics.com/index.php/2010/11/using-LiveCycle-Forms-in-Acrobat-and-Reade r.

    Hope that helps,

    Niall

    Ensure the dynamics

  • hidden field fill with xml - Web service call

    Hello world

    I developed a web service, my web service method expects an xml string.

    I have a new data connection, which is my wsdl file...

    Now, my challenge is how to fill in this field with the xml of my form, so that my my method can manupulate it.

    Secondly, the same button that calls my web service for the e-mail form once the web service has been called, send the form in PDF format.

    You'll really appreciate your help.

    ACE

    You can use the command to populate a field with the XML of the form below.

    FieldName.rawValue = xfa.data.saveXML ("pretty");

    To run the Web service and then send an email

    1. first place binding the Web service Execute button and make it invisible / hidden

    2. place a normal button on the form and in the writing code click event to call the Web service and then send the e-mail.

    Call the click event of the button webservice

    WebserviceExecuteButton.execEvent ("click");

    Send an email

    event.target.submitForm ({cURL: "mailto:" + strToAddress + "?"}) subject = "+ strSubject +"& body ="+ strMessage, cSubmitAs:"PDF", cCharset:" utf - 8 "});"

    Replace the names with your form variables in the above line.

    Thank you

    Srini

  • Can I receive via an XML web service in the PDF form?

    Hi all, I am able to send data to a server via a web service configured in my button send email.  Once the data has been received on the server, a reference number is returned.  My problem starts here as reference number comes back in my browser and not in the PDF file.  How can I get the reference number in the PDF?  Thank you J

    If you actually submit the XML via a web service you shodul be able to bind the output of the web service to a field in your form. You have configured a data connection to a WSDL file?

    You say that you submit via a webservice in your button send email. That made no sense than that described two submit operations on the same key. I suspect that you send us by e-mail and that the server is answer via a HTML page... .Hence the browser is to intercept and place it on the screen (outside your PDF file).

    Hope that helps

    Paul

  • How encryption works in the web services connector?

    Hi, I wanted to ask if someone could explain or point me to somewhere where its explained how encryption in Web Service connector (connector guide did not help) because I feel like there is a black box in the way that works part of the connector.

    This is what is happening to me.

    When I request an account the IOM sends to the SOA, a SOAP message with this field:

    user < __NAME__ > < / __NAME__ >

    Do0emq9XxVlYdbBxRUFSpciLqp77p6WYXQzATr8UysI = < __PASSWORD__ > < / __PASSWORD__ >

    But SOA sends a SOAP like it even though im using the oimcp/WS_CONNECTOR_OUTBOUND to decrypt the way that the Webservices connector Guide tells me to do section 5.1

    the user < USER_ID > < / USER_ID >

    Do0emq9XxVlYdbBxRUFSpciLqp77p6WYXQzATr8UysI < PASSWORD > = < / PASSWORD >

    < PasswordConfirm > Do0emq9XxVlYdbBxRUFSpciLqp77p6WYXQzATr8UysI = < / passwordConfirm >

    Somehow the DB records the real password not the hash, but if the size of the password in the DB field is smaller than the size of the hash I get a SQL error even if the

    password real has the right length. And change the size of the field in the DB is not always an option.

    Happents another odd thing, is that if I do not declare the passwordConfirm field in < property name = "password.field.xpath.locations" type = "xs: String" > / ns3:PASSWORD, / ns3:passwordConfirm < / property > even if the sending of SOAP by the SOA is always: "

    the user < USER_ID > < / USER_ID >

    Do0emq9XxVlYdbBxRUFSpciLqp77p6WYXQzATr8UysI < PASSWORD > = < / PASSWORD >

    < PasswordConfirm > Do0emq9XxVlYdbBxRUFSpciLqp77p6WYXQzATr8UysI = < / passwordConfirm >

    I get the error that do not match the password and passwordConfirm.

    And to make things even more bizarre if I wire the password, lets say, e-mail and declare this field as needed the decryption of the stored value is the hash. Even if the password is the normal password.

    Also, is there a way for the SOA to send the password in plain text?

    Hello Leo,

    If you have correctly configured oimcp/WS_CONNECTOR_OUTBOUND policy, there should not be any errors and it works without problem.  Unhappiness about using policy - is that the errors you will see when it does not work are not really useful to discover the cause of the problem.  In fact, the most useful tool I found the resolution of the problems with politics is WireShark.

    I used the strategy in multi-instance test scenarios and also support for several customers who try to use the policy.  From my experience, I guess that decryption is being ignored due to an error in your code. If WireShark gives you not with sufficient detail to indicate where the error is, I would say a SR in support to solve the problem more openness.

    Hope that helps,

    Amy

    -----

    When closing a thread as answered don't forget to mark the messages correct and useful to make it easier for others to find.

  • [JDev 12 c] How do I imply a Web service (with authentication) method?

    Hallo,

    in my merger ADF Web Application I have to call some methods of a REST Web service, but I have no way to have the WSDL or w.

    I only know the URL of the container methods and the name (and parameters) of each method.

    How can I call the webservice methods in JDeveloper?

    The RESTful Client and Proxy JDeveloper component is not useful for me: he needs the URL of the WSDL/w but, as I said before, I did not.

    I also tried to use JDeveloper Webservice data control , but I had problems configuring.

    Would you kindly suggest me a way - also in pure Java (so without using a component JDevelpoer) - to call a Web service method and read his answer?

    The Web service needs to the authentication of the client so I would like to know also how do I do the authentication (username + password) by programming.

    Many thanks in advance,

    Federico

    Hi - I did using this approach: https://blogs.oracle.com/imc/entry/adf_mobile_the_specific_of

    If you need to pass the security credentials, see: http://blog.teaminformatics.com/tag/mobile-application/

    Rich.

  • How to connect to a Web service remote php?

    Can develop a Mobile Flex Application using a php webservice hosted remote php on a server? How?

    Thanks, I'm learning that i can deploy my php webservices, do a find & replace the local url for the url for testing remotely. I need to secure my Web services before deployment.

  • How to call an external web service to IOM?

    Hello

    I have a question on how to call a web service outside of the IOM to breast for example create user processes? How do we need to; With the adapter and task in the process?
    Any recommendations?

    Thanks in advance!

    Yes to the JavaTask'll tie you in this java code and java code, you can call your webservices

    Thank you

  • File - XML - Web services

    Hello
    Can I get an answer on this issue please?
    If we use ODI to interact with an external web service, the web must
    service (in XML) response to be written in a file on the disk? Is it possible
    to receive the XML response and treat it without it first being
    written to disk?

    Hi Brian,.

    You must write the XML response to a file and then process using an interface.

    -Julien

  • How can I register a web service for BSE without JDeveloper?

    We use Oracle SOA Suite 10 g (10.1.3.3). We try to find a way to register a web service for BSE without using JDeveloper. All the docs and examples using JDeveloper. Everyone was able to do it with any other IDE or manually? If so, can you point me to this process?

    Thank you
    J

    When you deploy BPEL with JDeveloper processes are automatically enroll in BSE. If you want to do this without JDeveloper, you should use ANT, or BPELC / OBANT tool. These tools compile and deploy the process for the BPEL PM and register for BSE.

    http://orasoa.blogspot.com/2008/05/build-tool-deploy-AIA-BPEL-ESB-Java.html

    Marc

  • How do I change email Web Services to something, I remember

    When I was installing my new HP 7525 printer, it uses an e-mail address by default ending [email protected]

    I would like to change to something that I can remember. How can I do?

    SIGNATURE

    GoTo hpconnected.com, sign in (you should have a log in account already, when you first get this address to email eprint.

    After login, you can change the email address by clicking on 'settings' under the printer (in the "Device" tab).

  • XML Web services configuration problem

    WHEN RUNNING

    long value 500

    set pagesize 100

    XQUERY declare default element namespace " " http://xmlns.Oracle.com/xdb/xdbconfig.xsd "; "

    for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-liste/servlet [servlet-name = "orawsv"]

    return $doc

    I GOT AN ERROR

    Error from line 3 in order:

    Select column_value xmltable (' declare default element namespace "http://xmlns.oracle.com/xdb/xdbconfig.xsd"; "")

    for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-liste/servlet [servlet-name = "orawsv"]

    return $doc')

    Error in the command line: 4 column: 146

    Error report:

    SQL error: ORA-02000: lack of keyword COLUMNS

    02000 00000 - "missing %s keyword."

    Please help, I need configuration db xml

    Still, I get the same error I asked when I try to run the same script with sql developer.

    OK, you are using SQL Developer.

    Replace quotes simple quotes here:

    servlet-name = "orawsv".

    It should now work without error, but you end up with this:

    COLUMN_VALUE

    ----------------------

    (XMLTYPE)

    which is not very useful.

    So you should better use XMLTable first:

    SELECT xmlserialize (happy column_value)

    FROM XMLTable)

    XmlNamespaces (default 'http://xmlns.oracle.com/xdb/xdbconfig.xsd'),

    "for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig/webappconfig/servletconfig/servlet-liste/servlet [servlet-name ="orawsv"].

    return $doc '

    ) ;

  • How to get the response from the web service

    Hello

    My requirement is necessary send the UI ADF input parameter and get web service respone. I created proxy WSDL-based methods. Now in my action button earpiece that I wrote the logic below.

    {} public void submitAction (ActionEvent actionEvent)
    Add the code in the event here...
    BigDecimal merNam = null;
    String number = this.it1.getValue (m:System.NET.SocketAddress.ToString ()); my entry value
    merNam = new BigDecimal (number);
    MV MerchantValidate = new MerchantValidate(); / / created by jdeveloper when proxy generation.
    mv.setMerchantNumber (merNam); / / the value input to the web service
    System.out.println ("merchant number is:" + mv.getMerchantNumber ());

    Mr. MerchantValidateResponse = new MerchantValidateResponse(); / / create object of response class
    String result = mr.getResult (); / / try to get the answer
    System.out.println ("result:" + result); / / I'm getting null as a result
    / * this.setResult (mr.getResult ());
    System.out.println ("the answer is:" + this.getResult ()); * /

    Can someone help how to pass values to the web service and get the response. And how can we get the Web service data control.

    It's very urgent pls help. I'm not for this technology.


    }

    Hello

    You can view the tutorial for a good understanding on creation and use of a Web Service data control:

    http://www.Oracle.com/technology/OBE/obe11jdev/11/wsdc/wsdc.htm#T1

    Thank you
    Vishal

Maybe you are looking for