WebService setting xml request

I'm a .NET developer learning Flex
I'm trying to set the xml request in the flex webservice.  A little background, I'm uploading a file to a third-party and they respond with xml data I want to use.  I want to take that xml and pass it to a .NET webservice.  I have verified the .NET webservice gets called everytime but its not getting the xml data.  What am I missing?  Here is my code.
private function responseHandler( event:DataEvent ) :void{
var response:XML = XML( event.data );
var service:WebService = new WebService();
service.wsdl = "http://localhost/FlashUploadWeb/WebSerivce/Video.asmx?wsdl";
service.loadWSDL();
var operation:Operation = new Operation(null, "UpdateVideoFile");
operation.addEventListener(ResultEvent.RESULT, onWSResult, false, 0, true);
operation.addEventListener(FaultEvent.FAULT, onWSFault, false, 0, true);
operation.request = response;
service.operations = [operation];
operation.send();

I'm a .NET developer learning Flex
I'm trying to set the xml request in the flex webservice.  A little background, I'm uploading a file to a third-party and they respond with xml data I want to use.  I want to take that xml and pass it to a .NET webservice.  I have verified the .NET webservice gets called everytime but its not getting the xml data.  What am I missing?  Here is my code.
private function responseHandler( event:DataEvent ) :void{
var response:XML = XML( event.data );
var service:WebService = new WebService();
service.wsdl = "http://localhost/FlashUploadWeb/WebSerivce/Video.asmx?wsdl";
service.loadWSDL();
var operation:Operation = new Operation(null, "UpdateVideoFile");
operation.addEventListener(ResultEvent.RESULT, onWSResult, false, 0, true);
operation.addEventListener(FaultEvent.FAULT, onWSFault, false, 0, true);
operation.request = response;
service.operations = [operation];
operation.send();

Similar Messages

  • XML request in Flex WebService using ActionScript

    Hi,
    I'm having a problem with dumping the request XML. When I send XML request to a web service with soapUI, it gives me normal results, but when I try to do the same thing in Flash using Flex, the web sevice responds with a SOAP fault. This is basically what I'm doing:
    var xml = XML('<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://some.web-sr.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header/><SOAP-ENV:Body><ns1:SomeOperation><ns1:data></ns1:data></ns1:SomeOpera tion></SOAP-ENV:Body></SOAP-ENV:Envelope>');
    wsOperation = getWsOperation('SomeOperation');
    wsOperation.resultFormat = 'e4x';
    wsOperation.request = xml;
    wsOperation.send();
    Result: <faultstring>The path is not of a legal form. ---&gt; The path is not of a legal form.</faultstring>
    How can I dump the request xml which was actually sent to the web service by Flex? Or what am I doing wrong here?
    Thanks in andvance,
    MC

    At last, after three days of reading the WHOLE INTERNET and posting this I have managed to dump the request data
    var assetToken = wsOperation.send();
    trace(assetToken.message);
    Hope this helps anybody else.
    Regards,
    MC

  • Does income xml request get validated against wsdl?

    Hi, there:
    I'm using document/literal web service. My question is: Does income xml request get validated automatically against wsdl complex type xml schema? If not is there any configuration way we can set to validate income xml request automatically?
    I searched posts in this forum, it seems the same question was asked long long time ago already, but no answer. So, I want to check that question again.
    I simply tested my web service by using soapUI, it seems no xml validation implemented on any request at all.
    Highly appreciated if any help or comment, thanks a lot in advance.
    David

    Thank you very much jwenting for the reply. We are using jbossWs.
    Yes, I definately agree that it's very cool that wsdl is generated on the fly, and all xml message is parsed to java bean automatically by jaxb. However, my 2 cents is:
    1. How can I generate other xml schema restrictions in wsdl on the fly except "enum" (ex. pattern, minInclusive, maxInclusive etc.)? Currently, it seems only @XmlEnum can generate "enum" restriction in wsdl automatically, no other restrictions could be generated automatically in wsdl.
    2. Even if I have those restrictions defined manually in wsdl, as it doesn't implement validation on income xml request, and I should do the validation inside my webservice logic, which means that even if I have those xml schema restrictions defined in wsdl, they are useless.
    That's the reason I want to check if anyway the validation can be implemented automatically on income xml request.
    Again, highly appreciated any further helps or comments. Thanks a lot in advance.
    David

  • Create a cache for external map source - Error in parsing xml request.

    When doing the following:
    Create a cache for external map source
    I get "error in parsing xml request" when setting the following
    Map service Url:
    http://neowms.sci.gsfc.nasa.gov/wms/wms?version=1.3.0&service=WMS&request=GetCapabilities
    It looks like it is breaking on "&". Any suggestions?
    Rob

    Hi Chris,
    thanks for your reply!
    I've tried to add the following into persistence.xml (although I've read that eclipseLink uses L2 cache by default..):
    <shared-cache-mode>ALL</shared-cache-mode>
    Then I replaced the Cache bean with a stateless bean which has methods like
    Genre findGenreCreateIfAbsent(String genreName){
    Genre genre = genreDAO.findByName(genreName);
    if (genre!=null){
    return genre;
    genre = //Build new genre object
    genreDAO.persist(genre);
    return genre;
    As far as I undestood, the shared cache should automatically store the genre and avoid querying the DB multiple times for the same genre, but unfortunately this is not the case: if I use a FINE logging level, I see really a lot of SELECT queries, which I didn't see with my "home made" Cache...
    I am really confused.. :(
    Thanks again for helping + bye

  • How to work with Fedex xml request

    Hi Developers,
    In USPS I can send the xml request with http url in the browser and successfully getting the xml response. How can we achieve the same concept in FedEx?
    Is this possible?
    In FedEx site i downloaded the xml-transaction pdf, which contains the multiple xml request. I don't know how to test it with the browser.
    Sample xml request for Fedex which i founded in the above mentioned pdf is shown below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <FDXSubscriptionRequest xmlns:api="http://www.fedex.com/fsmapi" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance"
    xsi:noNamespaceSchemaLocation="FDXSubscriptionRequest.xsd">
    <RequestHeader>
    <CustomerTransactionIdentifier>String</CustomerTransactionIdentifier>
    <AccountNumber>123456789</AccountNumber>
    </RequestHeader>
    <Contact>
    <PersonName>Jim Smith</PersonName>
    <CompanyName>Creative Widgets</CompanyName>
    <Department>Shipping</Department>
    <PhoneNumber>5405559900</PhoneNumber>
    <PagerNumber>9999999999</PagerNumber>
    <FaxNumber>5405559901</FaxNumber>
    <E-MailAddress>[email protected]</E-MailAddress>
    </Contact>
    <Address>
    <Line1>123 Main Street</Line1>
    <Line2>1st Floor</Line2>
    <City>Anycity</City>
    <StateOrProvinceCode>VA</StateOrProvinceCode>
    <PostalCode>24060</PostalCode>
    <CountryCode>US</CountryCode>
    </Address>
    </FDXSubscriptionRequest>
    and they also provide the sample xml response which is given below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <FDXSubscriptionReply xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="FDXSubscriptionReply.xsd">
    <RequestHeader>
    <CustomerTransactionIdentifier>String</CustomerTransactionIdentifier>
    </RequestHeader>
    <MeterNumber>1234567</MeterNumber>
    <SubscribedService>FedEx Express Shipping</SubscribedService>
    </FDXSubscriptionReply>
    I want to know how to send the above mentioned FedEx xml request in the browser to reach the FedEx Server or how to achive the FedEx xml request using java
    code.
    But these concepts is possible in the USPS because we make a connection with http url(provided by usps) and then we will send the xml request, where as in FedEx the http url is inside the xml structure. So how can we achive this?
    Please help me to come out from this problem
    Thanks
    Srinivasan

    You might have to tweak this code some to get it to work, but it should at least lay the groundwork for solving your problem:
    Code Snippet
    /* Declare an XmlNode object and initialize it with the XML response from the GetListItems method. The last parameter specifies the GUID of the Web site containing the list. Setting it to null causes the Web site specified by the Url property to be used.*/
                System.Xml.XmlNode nodeListItems =
                    MyListsService.GetListItems
                    (listName, viewName, query, viewFields, rowLimit, queryOptions, null);
    System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
    xd.LoadXml(nodeListItems.OuterXml);
    System.Xml.XmlNamespaceManager nm = new System.Xml.XmlNamespaceManager(xd.NameTable);
    nm.AddNamespace("rs", "urn:schemas-microsoft-com:rowset");
    nm.AddNamespace("z", "#RowsetSchema");
    nm.AddNamespace("rootNS", "http://schemas.microsoft.com/sharepoint/soap");
    System.Xml.XmlNodeList nl = xd.SelectNodes("/rootNS:listitems/rs:data/z:row", nm);
    foreach(System.Xml.XmlNode listItem in nl)
      listBoxProsjekter.Items.Add(listItem.OuterXml);
    I hope this helps!
    Please look into the following site for more info:
    http://msdn2.microsoft.com/en-us/library/4bektfx9(vs.80).aspx

  • How to set XML.ignoreWhitespace = false; in HttpService /Result?

    Please ask these kind of questions on flexcoders or the Adobe Flex Forums.  This is for development of the SDK itself.<br /><br />Matt<br /><br /><br />On 11/17/08 12:56 AM, "venubwal" <[email protected]> wrote:<br /><br />A new discussion was started by venubwal in<br /><br />Developers --<br />  How to set XML.ignoreWhitespace = false;  in HttpService /Result?<br /><br />I want to carry/preserve Leading & trailing spaces<white spaces> in event's result....<br />I am using service as :<br />_webService = new HTTPService();<br />_webService.url = serviceUrl;<br />_webService.method = "POST";<br />_webService.resultFormat = "e4x";<br />......<br />...Again i am checking it as -in<br />private function serviceResultHandler(event:ResultEvent):void<br />        {<br />        stopExecution();<br />        var doc:XMLDocument = new XMLDocument();<br /> doc.ignoreWhite = false;<br />        XML.ignoreWhitespace = false;<br />doc.parseXML(event.result as XML);<br />       Alert.show(event.result.toString(),"....serviceResultHandler...");<br /><br />But, i am not able see L&T spacesin alert() where I can see L&T spaces in Servlet/Java side which assigned as metaResponse<br />as....<br />      OutputStream writer = response.getOutputStream();<br />      OutputStreamWriter outputStreamWriter = new OutputStreamWriter(writer,"UTF-8");<br />JaxbSerializationUtil.serializeObjectToWriter(outputStreamWriter, metaResponse);<br /><br />________________________________<br />View/reply at How to set XML.ignoreWhitespace = false;  in HttpService /Result? <a href=http://www.adobeforums.com/webx?13@@.59b70bd4><br />Replies by email are OK.<br />Use the unsubscribe <a href=http://www.adobeforums.com/webx?280@@.59b70bd4!folder=.3c060fa3>  form to cancel your email subscription.

    By Using XML.ignoreWhitespace = false; <br />I am able to Store/Carry/Save L&T white spaces in XML and i can retrive values with whitespaces...<br /><br />It is in case of loading from Java<DB> to Flex.<br /><br />But the actual problem is with xmlObject.toString()/toXMLString()<br />is not able to carry whitespace, while it should carry as parameter to Java Servlet..so that it can be get using request.getParameter() [..then it is serializing/deserializing]<br /><br />So, how i can preserve the L&T whiteSpaces on XML.toString()/toXMLString() method.<br /><br />OR else<br />How we can set Http request attribute in Flex, so that we can use ( AnY_Object)request.getAttribute()...

  • How to send concurrent xml request to Soap service.

    Hi
    I am working in a scenario. where i need to send more than 10 concurrent xml request to soap service hosted in IIS.
    and that service directly pools to biztalk recieve location. Presently i am sending a single request through soap ui.
    Is there any tool available to send more than 10 xml request to service. If not then how we send through C#.code

    Hi Anagh,
    Microsoft BizTalk LoadGen 2007 Tool would be the perfect fit for your requirement where you need to send "Concurrent" request to SOAP.
    Using LoadGen you can configure it use to number of concurrent threads to send messages. In its config file, it has a section called
    <NumThreadsPerSection> which can be used to set the number of concurrent threads that LoadGen will use to send messages.
    Read one of my old blogposts where I have talked about using LoadGen for simulating message load for SOAP services.
    http://indway-is.blogspot.co.uk/2009/01/loadgen-testharness-for-soap-transport.html
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Define the User/Passwort for a XML request ProcessInstanceStateChanged

    Hi,
    I created a workflow which starts another workflow on a remote system via web activity "start workflow" function and then waits till the workflow on the remote system is processed and calls back to the original system.
    In the original system I can define which user and password is used for the xml communication to the remote system, which works fine. SWXML show the XML messages on both systems and the worklow is started by the specified user.
    When the Workflow in the remote system is processed the system creates a XML request ProcessInstanceStateChanged
    to inform the calling system that the process is done and it can go on with the workflow there, but this XML document just seems to get lost. The SWXML shows no status for the document in the remote system and there is no entry for this document in the original system.
    The documentation says that I have to specify the users for which XML requests are accepted. But there is no information how I can configure the workflow in the remote system to use a special user and password for that. Can anyone tell me where to configure this? (currently the xml is send via wf-batch user which cannot work due to the genereted password etc.).
    Thanks in advance
    Roman

    From the little information available here I can suggest following:
    1.     Check the Account validity and authorizations of the User used for authentication from DOT NET. If possible, assign SAP_ALL in Development and repeat tests. Later we can narrow down the access easily.
    2.     There is a known Kernel issue with ICF logon message handling, described in SAP Note 1241566 - Set of corrections: Logging on 1/2008. Check if the recommended Kernel patch level is already applied.
    If none of the above helps, please send me the following:
    1.     Trace file for the work process 0 in transaction ST11 on the application server spsisd_ISD_00
    2.     Generate trace files with the highest trace level (3) as per SAP Note: 507994 - Generating plug-in trace files for troubleshooting and send it over.
    We can look at various Kernel and Service level calls from trace files which should help us identify the root cause.

  • How to view XML-Request sent to Mapviewer

    Hello,
    I am using the Mapviewer Javascript Api and would like to have a look at the xml request which was sent to the Mapviewer. When setting the log level to FINEST I can see the requests but not the real XML.
    All hints are welcome.

    Hi,
    You can catch this in different ways:
    - browser addons/plugins (FireBug, HTTPFox for firefox or something similar for your browser) etc;
    - if you prefer some kind of network sniffer - wireshark or similar helps;
    these are the things I usually use, someone can share other ways;
    regards, michael

  • Last error code set: Unresolved requests in buffer SID

    Hi All,
    We are installing EHP4 SP6 in our ECC 6.0 system. Weu2019ve created a .xml
    file in our solution manager and calculated a download queue with the MOPZ. The installation is on a Windows 2003 32 Bit platform with a SQL server 2005 SP2 DB. There is 40Gb pagefile and 15Gb memory available. The latest SAP kernel (254) is also installed.
    In roadmap step 5 (Preprocessing) the installation stops with the
    message: u201CChecks after phase MAIN_SHDRUN/ACT_UPG were negative! Last
    error code set: Unresolved requests in buffer <SID>Check logfiles 'ACTUPG.ELG' and 'J:\EHPI\abap\log\SAPehpi.ECO'u201D
    In the log files there many entryu2019s of: DDIC ACTIVATION ERRORS and
    RETURN CODE in SAPAW70106.VCW 1 ETP111 exit code : "12"
    By looking at the logfiles, it seems to be a problem with the job RDDMASGL in the shadow instance. The job terminates and a runtime TSV_LIN_ALLOC_FAILED error occurs.
    Iu2019ve changed some parameters in the shadow instance profile to:
    abap/heap_area_total = 4000000000
    ztta/max_memreq_MB = 1000
    ztta/roll_area = 2000000
    ztta/roll_extension = 2000000000
    abap/heap_area_dia = 2000000000
    abap/heap_area_nondia = 2000000000
    em/initial_size_MB = 2048
    But after repeating the phase, the installation stops again.
    Hopefully some of you can provide me some information so that I can solve this problem and continue the installation.
    Thanks in advance for your reply and support.
    Kind regards,
    Rik Hut

    Hi,
    Choose option Accept non-severe errors and repeat the phase. Because sometimes in ACT_UPG phase it tries to activate some obsolete object and get stuck.
    Thanks
    Sunny

  • Cannot send XML request message - TREX doesn't return FQDN

    Hello all,
    is there any way to configure TREX, so that it always returns it's FQDN?
    I get the following error message from our SAP XECO (Shop) Java System.
    Full Message Text
    Object with category com.sap.isa.catalog.trex.TrexCatalogServerEngine could not be instantiated. Reason: cannot send XML request to http://saptx3:30305/TREX; reason: saptx3 (Errorcode 7262)
    The problem is, that TREX doesn't return it's FQDN.
    The TREX service as such is correctly configured in TREX Service "nameserver.address", "tcpip://hostname.domain:30301".
    I added the line
    SAPGLOBALHOST=saptx3.domain
    to the sapprofile.ini file. This didn't do the trick, unfortunately.
    Thanks a lot for your advice !
    Best Rgs,
    Thorsten

    HI Thorsten,
    Please ensure that your setting match that of note: 1479923 -  TREX: Queue server missing in KM TREX Monitor
    and also please check the following:
    Also do you have any proxy or firwall between TREX and the portal?
    It can to be that the problem is related to the proxy configuration in
    the Portal. Could you please check if you specified proxy in the
    System Administration -> System Configuration ->Service Configuration->
    Applications (Content Catalog) -> com.sap.portal.ivs.httpservice ->
    Services -> Proxy
    If a proxy server is entered there, you have to enter the TREX host in
    the http - bypass Proxy Servers.
    many thanks
    Orla.

  • Error processing XML request, java.lang.IllegalArgumentException

    Hi all,
    In my code I can successfully connect to server and send the content which is an XML content:
    param = java.net.URLEncoder.encode(s, "UTF-8");
    java.io.PrintWriter out = new java.io.PrintWriter(connection.getOutputStream());
    out.print(param);
    Read the response from server:
    java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(connection.getInputStream()));
    while((input = in.readLine()) != null)
    response += input + "\r";
    System.out.println("Client : received : "+response);
    Following is the response I receive from server:
    Client : received : <html><h1>Error processing XML request</h1>java.lang.IllegalArgumentException: No xml request posted</html>
    Has anybody know what the problem is? Why this error is issued?
    Any help is greatly appreciated.

    Dear legosa,
    Thanks so much for the replies. What you wrote makes absolute sence, w/o flush() or close(), it seems that I'm sending only balnk to output!
    I don't know how can I fix the 500 Internal Server Error; below is my complete code that does this part, can you tell me if you see sth. wrong in this code?
    param = java.net.URLEncoder.encode(aTrans.xmlDoc, "UTF-8");
    url = new URL("https://xml.test.surepay.com");
    connection = (HttpURLConnection)url.openConnection();                    
    connection.setDoInput(true);
    connection.setDoOutput(true);
    connection.setUseCaches(false);
    connection.setRequestMethod("POST");
    connection.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
    String sLen = "" + param.length();
    connection.setRequestProperty("Content-length", sLen);
    connection.setRequestProperty("Accept", "text/plain");
    connection.connect();
    System.out.println("Client : Connected");
    java.io.PrintWriter out = new java.io.PrintWriter(connection.getOutputStream());
    System.out.println("Client : Writing Content");
    out.print(param);
    out.close();
    System.out.println(connection.getURL());          
    System.out.println(connection.getResponseCode() + " " + connection.getResponseMessage());
    System.out.println(connection.getURL());
    System.out.println("Client : Waiting for response from Server");
    java.io.BufferedReader in = new java.io.BufferedReader(new java.io.InputStreamReader(connection.getInputStream()));
    System.out.println("Client : Opened input stream");
    while((input = in.readLine()) != null)
    response += input + "\r";
    System.out.println("Client : received : "+response);

  • How can I send an XML request to the server using JSP

    Can anybody say how to send a xml request
    For ex:
    Address:__________
    City: ________
    State:__________
    Country:________
    and a Submit Button.
    By clicking on the Submit Button -- xml request had to go to the server.
    Please send the detailed code for it

    xml http request..is that wat your are looking for?

  • How can I send an XML request to the server using servlets

    How can I send an XML request to the server using servlets

    http://forum.java.sun.com/thread.jspa?threadID=5158333
    http://forum.java.sun.com/thread.jspa?threadID=5158705
    Crossposting is lame.

  • How to set xml tag to nothing in indesign using applescript?

    Hi guys,
    I need set xml tag to nothing(for tables)  in indesign using applescript.
    Please help me.

    Hi,
    tell application "Adobe InDesign CC 2014"
        tell active document
            if (count of story) > 0 then
                tell story 1
                    if (count of tables) > 0 then
                        tell table 1
                            set tag_name to associated XML element ----------------> i can't get xml  tag, i am receiving the  xml tag is nothing.
                            if (tag_name = nothing) then
                                display dialog ("This table has no tag")
                            else
                                set markup_tag to markup tag of tag_name
                                set n to name of markup_tag
                                display dialog ("Tag name is " & n)
                            end if
                        end tell
                    end if
                end tell
            end if
        end tell
    end tell
    I can't get xml tag for table,  i am received nothing

Maybe you are looking for

  • How can i restore a Previous session if someone has just opened the Firefox browser and closed it bfore I got on the same computer?

    I had 2 lots of windows with multiple tabs thatI wanted to re-open the next timethe computer was on, but someone else was on the computer and opened firefox and now i can't restore my previous session of tabs in the 2 windows.

  • Extend BAPI_BILLINGDOC_CREATEMULTIPLE?

    I have a requirement to create an invoice from a non-SAP billing application. Additionally, I have a need to extend the invoice with additional values. For example, I would like to add - perhaps - a flag signifying if this was an invoice on behalf of

  • Apply different font styles in single text frame

    hi all how can i apply different font styles in a single text frame using indesign script ? for example : "dasdnasndasndlasndnasdlasdasdas" may i know is it possible to do that and how to do that ? thanks

  • JMS getObject() Error deserializing object for client

    I am using WL6.1 and having a problem deserializing an object for a           client that doesn't have access to the corresponding implementation           object in its CLASSPATH (it only deals with the interface). From           previous posts, I r

  • Customizable EQ in Zen Mi

    hi people...i ran a search for this topic and am surprised to find out that there's pathetically little info about this feature in zen micro. Anyway, i wanted to make full use of this awesome feature because i realised that if i use the other EQ sett