GET, Modify, POST XML from Web Service Requests (Webtests)

I'm using load testing to exercise an API, so I'm creating many small webtests which mimic typical user operations.  One of my operations will be a GET of transaction data and a PUT of that same data, slightly modified.
I'm able to capture the response from the GET in an extraction rule and resubmit to the API, the question is how to manipulate the XML so that there's a small typical edit.   What's the best way to do this?  
I understand the nature of the web test plug-ins, as the "cartilage" around the bones of the webservice requests.  I would much rather angle towards a plugin than convert to a coded test and modify that way.  I like the normal non-coded
test interface but I dont know that the webtest plugin nor webtest request gives me the granularity the coded webtest does.  Unfortunately, I dont like the fact I can't easily debug through the coded webtest.
This seems like a straightforward operation. Do I understand all my options? How would you do this?

On further review, I might have figured this out.  I misunderstood something I read online.  The web test request plug-ins can be associated with an individual service call and aren't automatically applied to all service calls in a web performance
test collection.
.. I can do something like this to access my captured context information and manipulate the XML via XDocument/XElement.   - This demonstrates how to get my captured {{ResponseDocument}} from the extraction rule.
    public class XmlModification : WebTestRequestPlugin
        public override void PreRequest(object sender, PreRequestEventArgs e)
            MessageBox.Show(e.WebTest.Context["ResponseDocument"].ToString());
Difficile est tenere quae acceperis nisi exerceas

Similar Messages

  • Binding xml from web service to java objects

    I would appreciate if someone can tell me where can i get information regarding
    binding of xml from web service to java objects in weblogic 6.1 .
    Thanks,
    ag

    Hi Ag,
    To my knowledge, the only information on this topic is whatever you find in the
    documentation. What exactly do you want to know?
    Can you post a set of specific questions?
    Regards,
    Mike Wooten
    "ag" <[email protected]> wrote:
    >
    I would appreciate if someone can tell me where can i get information
    regarding
    binding of xml from web service to java objects in weblogic 6.1 .
    Thanks,
    ag

  • How to get client Ip address from web service

    Hello folks,
    I am quite new to web service and developing a web service using netbeans6.0 IDE, where i have to know which client called/used the service, After googling i got code snippet like below
    inject a WebServiceContext instance into your WebService class, and use it in each WebMethod to get the current request's MessageContext Map. Get the SERVLET_REQUEST item from that, cast as an HttpServletRequest. From that HttpServletRequest, you can invoke getRemoteAddr() to get the client's IP.
    @WebService
    public class MyService{
    @Resource
    WebServiceContext wsCtxt;
    @WebMethod
    public void myWebMethod(){
    MessageContext msgCtxt = wsCtxt.getMessageContext();
    HttpServletRequest req = (HttpServletRequest)msgCtxt.get(MessageContext.SERVLET_REQUEST);
    String clientIP = req.getRemoteAddr();
    }But it throws error in my PC like
    Service invocation threw an exception with message : null; Refer to the server log for more details
    Exceptions details : java.lang.reflect.InvocationTargetExceptionIs there any way that says client pc ip address using netbeans6.0 Or what went wrong in my code?
    Largely Thanks in advance.
    SRI.

    I am afraid,
    javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:340)
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121)
    at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:148)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:311) ... 35 more Caused by: javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:187) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117) at $Proxy102.processMessage999(Unknown Source) ... 40 more Caused by: java.lang.NullPointerException at org.shar.Handle.processMessage999(Handle.java:120) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361) ... 2 more

  • Get client ip address from Web Service hosted on OAS 10.1.2

    Hi,
    Can anyone advice how to get the client IP from a web service (java) hosted on Oracle Application Server 10.1.2.
    The below code works if the web service is hosted on Tomcat.
    MessageContext msgCtxt = MessageContext.getCurrentMessageContext();
    String IP = (String)msgCtxt.getProperty("REMOTE_ADDR");
    This code is causes built errors on the OAS 10.1.2 since it needs Axis and many other Jars. I tried to insert the jars needed but unfortunately when i was able to compile it returned a java.lang.NullPointerException.
    Is there a way to get the IP address of the client that calls this web service ?
    Or is there a way to read the SOAP request maybe i can retrieve the client IP from it.
    Thanks for your support,
    regards

    http://forums.sun.com/thread.jspa?threadID=5371892&messageID=10636223
    Thank you!

  • How do I extract xml from web service

    I am using a web service to send a soap envelope to a third party and I need to troubleshoot the data being sent.
    How do get the code to show me the xml it sending in the soap envelope?

    Hi jmatrone,
    As your issue is related to web service, it is not supported here.
    You could post it in the ASP.net forum for better supports, thanks for your understanding.
    http://forums.asp.net/
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Import/Load XML from Web Service or URL?

    Hi,
    Like many, I'm new to LCD 8.2.  I have a form with subforms and repeating rows currently bound via a schema, but that can change if need be.  I'm able to import/export file-based XML and that process works well.
    However I'd rather not subject my end-users to browsing for an XML file, and loading it, and I'd like to provide something more elegant. In short, I'd like to import XML from either a web service (returning a single value being the XML document) or by loading the XML directly from a URL by a single button click.
    Is this possible?
    Much appreciated,
    Dave

    http://blogs.adobe.com/stevex/2007/06/http_post_update.html
    http://forms.stefcameron.com/2007/05/21/connecting-to-a-web-service/
    http://www.flexlive.net/?p=70

  • Having a problem parsing XML from web service & dropdown list

    I have 2 data connections that are programmatically invoked via exit event on different fields in form.  Both have identical code with only difference is that one populates a multiselect list box and one populates a drop down list.  The one that populates the listbox works fine.  Everytime Field A changes, it is fired and the results parsed then listblox updated.  The one with the drop down list is not working at all.  The form is used in Workspace.  When I use the javascript debugger, I see the correct node values output to the console window.  The problem is that the value is not successfully added to the drop down list existingFileNumber.  Anyone have any great ideas?  Like I said, this works perfectly in the same form for a different web service and a listbox.
    Here is the code for firing and parsing the dropdown list data:
    Form.sRoutingTransmittalSlip.sPreparer.existingFileNumber.clearItems();
    Form.sRoutingTransmittalSlip.phaseHidden.rawValue="PI";
    xfa.connectionSet.getInfo.execute(0);
    var pls2=xfa.datasets.createNode("dataGroup","pls2");
    pls2.loadXML(Form.sRoutingTransmittalSlip.fileNumbersHidden.rawValue,false,true);
    xfa.datasets.data.nodes.append(pls2);
    var dataGroup=xfa.resolveNode("xfa.data.pls2.Matters");
    var dataGroupLength=dataGroup.nodes.length;
    if (dataGroupLength==0) {}
    else {
      for (var i=0;i<dataGroupLengthl;i++){
         console.println(dataGroup.nodes.item(i).nodes.item(0).value);
         Form.sRoutingTransmittalSlip.sPreparer.existingFileNumber.addItem(dataGroup.nodes.item(i ).nodes.item(0).value);

    Do this instead
    [Bindable]
    var xlTopics:XMLListCollection;
    private function LoadResults(event:ResultEvent):void{
    var xmlResult = XML(event.result); //only use lastResult in
    binding expressions
    trace(xmlResult.toXMLString()); //to be sure of what you have
    xlTopics = new XMLListCollection(xmlResult .children());
    //all the child nodes of the root
    Tracy

  • How to get available fields list from web service

    hi,
    i'm using webservices to create ,update and deleting a alead.
    what i want is i want all the id of available fields in my account ?
    how acn i get those id's ?
    regards,
    praneeth

    hi,
    thank u for reply.
    i would like to create a servlet to insert alead to OCRM,
    but for that the user selects the fields he want to insert and provides corresponding values to those selected fields.
    so that i need to display all the fields available in my OCRM account.
    regards,
    Praneeth

  • Using Native Oracle XML DB Web Services - REST POST web service possible?

    My goal is to expose some pl/sql procedures as a REST web services.
    The Database is 11gR2
    The request method needs to be a POST (not GET as a request will perform insert/updates ) - the request body will contain a xml structure
    Have setup XMLDB Database-native Web Services as per
    11g documentation "Using Native Oracle XML DB Web Services"
    It seems this setup support only SOAP requests!?
    RESTful webservice with GET is (sort of) supported using
    Embedded PL/SQL Gateway as describer here:
    http://ora-00001.blogspot.com/2009/07/creating-rest-web-service-with-plsql.html
    Although no support for POST
    Obviously the post is from 2009 so just want to know if anything changed since.
    Has anyone found a way to expose pl/sql procedures using XML DB or other approach as a REST POST web services?
    (As the relative low number of calls/hour and also the aim to have the least amount of moving parts therefor looking for a DB centric solution)
    Thanks
    Pete

    I think the post referred to was more an exercise of what could be achieved. The quickest way, nowadays, to get this done with not too much hassle is via APEX
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35128/restful_svc.htm
    M.

  • How to bind list data to XML Web service request

    How do I bind specific columns in a DataGrid to the Web
    service request? I'm having trouble finding any documentation that
    addresses that specific pattern, i.e. sending a complex list to the
    server via a Flex Web service send() command. I'm fairly new to
    Flex programming and don't know if what I want to do is possible.
    Here what I've been able to do so far.
    1. Using a Web service called a service on the server and
    retrieved a complex list.
    2. Poplulated a DataGrid with the result
    3. The user has selected multiple rows from the DataGrid
    using a checkbox column
    4. The user pressed a button that calls a Web service send().
    This Web service should only send data from only two columns and
    only for those rows the user has checked.
    5. I can loop over the DataGrid and find the selected rows
    and put them in another ArrayCollection called 'selectedRows'.
    The issue is that I don't know how to bind 'selectedRows' to
    the Web service. Right now I'm reading up on "Working with XML" in
    the Programming with ActionScript 3.0 chapter. But I'm just fishing
    here. No bites yet.

    Don't bind. Build the request object programatically, as you
    are doing with your selectedRows AC, and send(myObject) that.
    Tracy

  • How get data from Web Service with token?

    Can I get data from Web Service made with Java?
    This WS has a Token.
    Any ideas o reference?
    Regards!
    Fran Díaz | twitter: @frandiaz_ | Blog: {geeks.ms/blogs/fdiaz/} | Communities: {onobanet.es} & {secondnug.com}

    We've now added this ability to Web.Contents. You can say something like
    Web.Contents("http://my.web.service/1", [Headers=[#"The-Token"="0a0138ef2d"]])
    and it will pass a header with the key "The-Token" and the value "0a0138ef2d" as part of the HTTP request. For security reasons, this will only work for anonymous web requests.
    The December preview can be downloaded from
    http://www.microsoft.com/en-us/download/details.aspx?id=39933&WT.mc_id=blog_PBI_Update_PowerQuery

  • How to create a proxy to retrieve the xml file from web services

    Hi Every one,
    We have a requirment where we receive a xml file from Kenexa, a third party HR tool using a middleware tool. from SAP side We have to create a proxy to retrieve the xml  file from web services by initiating call through middleware tool i used earlier.
    these are the steps i intend to follow to accomlish the requirement.  
    1) middleware tool has to initiate the call to kenexa web services to  receive the xml file when it is available.
    2) On SAP we need to create a ABAP Proxy service provider to middleware where this file can be received.
    Can any one guide me how i can create a proxy to retrieve the xml  file from web services by initiating call through other middlewre (its not PI). 
    Any help would be really great, i am not a ABAP developer, so please help me with this. Thanks.

    Thank for reply.
    The computers are in different locations, but yes it's possible, the users in this enviroment are all local administrator of the machines, and we can distribute the script centrally from the DC automatically
    Acrobat use Java, right? I'm not so expert in java, but something about it could not be so difficult to manage.
    Do you know some place where i can get some info about JS and acrobat?

  • Complex xml types in a web service request

    Hello,
    I'm a newcomer to APEX and wondered how to create complex data types in a web service reference, and how to address these fields from a page item type. I have a wsdl containing nested lists of strings and don't know how to solve this in APEX, can anyone help me?

    hi Jonjeao,
    i too searching the steps and refrerences for my project.
    i found the solution from
    http://www.oracle.com/technology/products/database/application_express/pdf/Using_Oracle_Application_Express_to_Interact_with_XML-RPC_Style_Web_Services.pdf
    please try your url with xml to web service.
    Thanks
    ~Logaa
    Edited by: Logaa on Apr 2, 2009 1:35 AM

  • Help needed: Handling web service requests from a J2SE application

    I want to write an J2SE application that is able to receive and parse web service requests. I want the application to, when started, start listen for incoming requests on a specific port.
    So far, I have embedded Apache Tomcat and Apache Axis in my application so that they parse the incoming requests and pass them on to my application logic.
    This seems like a very cumbersome way of doing it. I have included an almost full J2EE server in my application just to be able to parse web service requests.
    Is there an easier way? What technologies could I use? Any help would be greatly appreciated.

    Thanks for the help!
    It seems awfully complex though. Couldn't one just
    listen to incoming requests on a socket and use some
    good tool to parse them?
    Of course you could. One of the projects in that list is a 1 class java file. It could listen for requests, then you could parse the posted SOAP messages using JAXP and pass the requests on to your application. This will require a good understanding of SOAP however, and it may end up taking more time than simply using the JWSDP with a slightly beefier server.
    Given that there is only a handful carefully
    specified requests that the application needs to be
    able to respond to it seems overkill to include a
    full servlet enabled server...

  • Sending document to oracle xml gateway web service and body is url encoded

    Hello,
    a question from a complete newbie to web services. I have some code that is sending a soap message to an oracle xml gateway web service. In the soap message the values in the soap body look like &lt ;CNTROLAREA&gt ;
    when I would be expecting <CNTROLAREA>. What I have been told is that the content of the ReceiveDocument element has been url encoded which causes the &lt and to correct it I need to change the paramater type from object to xmlnode and to build the request as an xmldocument. The xmlnode and xmldocument comes from a .net guy so I've been trying to find the equivalent in java but am not having any luck. I have a lot of reading to do but was wondering if someone might be able to point me in the right direction on how to correct the problem. I captured the soap message being sent using tcpmon. Why does the body have the &lt instead of the < as I was expecting and is there an xmldocument type? The header part of the soap message looks as I expect. "><soapenv:Header><ns1:XMLGateway_Header xmlns:ns1="http://xmlns.oracle.com/apps/fnd/XMLGateway"><ns1:MESSAGE_TYPE>XML</ns1:MESSAGE_TYPE>. It is being sent as a com.oracle.xmlns.apps.fnd.XMLGateway.XMLGateway_Header type.
    thanks
    Thanks
    Edited by: twf123 on May 5, 2010 11:59 AM
    Edited by: twf123 on May 5, 2010 12:00 PM

    twf123 wrote:
    What I have been told is that the content of the ReceiveDocument element has been url encoded which causes the &lt and to correct it I need to change the paramater type from object to xmlnode and to build the request as an xmldocument. Where do you change the parameter type?
    The xmlnode and xmldocument comes from a .net guy so I've been trying to find the equivalent in java but am not having any luck. How do you get the data from .net guy? Which interface do you use? What processing do you do after receiving the data?

Maybe you are looking for

  • Using FPGA program to collect data for long time without 'gap'

    Our data collection system has a NI-PCIe 7852R card. We want to collect data at up to 10 KHz for up to 10 to 30 minutes. The data amount is too large so we have to separated them into multiple Array and save in multiple files. We do not want to loose

  • Find the Missing font text content in indesign document

    How to find and get the missing font content in the indesign documents by using the SDK. give a tips and techniques. Anybodys help me.

  • Detecting slow inserts

    We have an application that does hundreds of inserts per second to a specific table. Naturally we are worried about performance there. Is there a way to detect when insert into the table takes over X seconds? Ideally the time this occured, the insert

  • Can't buy more storage on iCloud

    I can't buy more storage on iCloud I do not own a computer

  • Where to find/download linux driver

    where can i find/download USB driver for NI USB6008 ??? the ni.com web site indicates that it is supported, but when downloading the HARDWARE DDK, the README said it is NOT supported... can it be somewhere else ???