Tools to test WSE enabled SOAP service - soap

Is there a tool that can test WSE-Enabled SOAP Web service?

I think you want to check the outgoing and incoming soap packets.
Use fiddler.
http://www.fiddler2.com/fiddler2/
As soon as you hit the webservice, fiddler will display the outgoing request's xml.
You can also try out firefox's console (disable by default). The console shows all the request/response details.
Fiddler will get the job done for sure.

I'm not entirely sure about the WSE element, but my first port of call for testing SOAP Web Services is SoapUI
A brilliant tool for calling services and inspecting the results with minimal effort - even before you start to look at its in depth capabilities (which are considerable) and far easier than playing with proxies in the first instance.

Related

What tools can be used to capture Http request with full path?

There are a number of tools one can use to capture HTTP requests for debugging purposes:
Request.bin
Hookbin
Puts.box
However, all of them provide a simple url such as request.bin/axyz. As I am testing a Rest API, I can set my base url to be request.bin/axyz but my request will look like
PUT request.bin/axyz/clients/3
and will not be matched by any of the mentioned tools. Are there useful tools?
If you are doing testing on desktop machines, you can simply try an HTTP Proxy.
Charles Proxy and Fiddler (and many more) must do the trick.

GWT Logging : Send server output to Client

I'm working with GWT's Logging mechanism to show:
Client logging output in client's Browser (using com.google.gwt.logging.client.HasWidgetsLogHandler)
Client logging output in server log (com.google.gwt.logging.server.RemoteLoggingServiceImpl)
Server logging output in server log (using java.util.logging.*)
Is it reasonable and possible to show server log in a client debug component?
Would you advise to send server logging to client instead of using an extra "tool" to access the server log? Which can be a comfortable realization for detached server logging?
In the server-side, you can use any tool you like, obviously... in the client-side, GWT provides all these wonderful options you mentioned, including the RemoteLogger which lets you log stuff going on in the client-side in the server (which is not something you would want to do in production, but for debugging may be helpful).
It's hard to understand why you would need logs to go the other way, ie. from server to client..... maybe you don't have access to the server?? But then how are you going to work on the GWT code, which lives in the server??? Just doesn't add up... if you have access to client logging (be it hosted-mode GWT.log("") messages, production mode java.util.logging, or even the Remote logger), and you have your server logs, you have the whole picture already!
In my opinion, the answer to your question:
Is it reasonable and possible to show server log in a client debug component?
is simple:
No, it is not reasonable.
However, if you really must, do it using GWT's RPC mechanism which allows you to send almost anything at all to the client (within the GWT limits, of course), including log messages....

Forward HTTP RESTfull API requests from http server to my application

I have a question about the design of an application I'm working on.
I made a monolithic java application with sockets open 24/7, something like a game server. I'm just trying to say it's a single jar application instead of a modular servlet/page based web application.
I would now like to add a RESTful API to this application. So people/clients can make HTTP requests to my application to obtain certain info. Because of the monolithic nature of my java application I'm unsure of how to implement this. One other important thing: I'm expecting multiple requests per second, so it would be nice if I could have an existing http server handle the requests, and somehow forward them to my app to set up a reply, and have the http server send it again.
Some things I have thought of:
wrap my application in a tomcat application, although I'm not sure if tomcat can run an application continuously instead of mapping to servlets on request.
open a socket and parse incoming http requests myself (or there is propably a lib for that?). I fear this will have an impact on performance, and would rather use existing http servers because they are optimized for high traffic.
use an excisting http server to handle the requests (apache, lighttp, ...) and have it forward requests to my app via things like scgi, or use a server that can forward via XMLRPC. Are there any other technologies/protocols to do this?
Any advice on how to handle this?
Thanks!
I'd decouple your RESTful service endpoint as much as possible from your original application. This allows you to scale (add multiple servers for your REST endpoint), but also to change your original application without having to change your REST API directly.
Clients <== REST (HTTP) ==> RESTful endpoint <== legacy (sockets) ==> Legacy backend
So your REST server is one the hand a service provider for your clients, but represents at the same time also a client for your original backend.
I would design the RESTful API and then pick one of the existing REST frameworks for Java, like Restlet, and implement the REST service itself. At the same time you can start implementing a gateway between the REST server and your original backend, by using sockets.
Pay attention to scalability and performance (i.e. you may want to use connection pools for the rest <=> backend bridge and not spawn a socket per incoming API request) and also think of possible advantages of HTTP. You might benefit when you're able to use caching, etc. as far as your backend application logic allows so.

Why can't I see WCAT traffic in fiddler?

I'm using WCAT to load test my app, and I want to see the traffic in fiddler.
When I run the WCAT script, it runs OK,but I don't see any of the traffic in fiddler... Do I need to configure fiddler to proxy WCAT traffic?
The web app I am testing is on my local machine, but I'm not addressing it with "localhost", I'm using the name of my machine in my settings config. I don't have any filters set up in fiddler either.
EDIT:
Here's my transaction I'm testing with (the ipv4.fiddler is a recent addition as per a suggestion below):
transaction
{
id = "add a new user";
weight = 1;
request
{
verb = POST;
postdata = "Name=Bob+Smith&Gender=M&DateOfBirth=01%2F01%2F1970&Email=testuserdude" + rand("1","1000") + rand("1","1000") + "#example.com&Password=123456&ConfirmPassword=123456";
url = "http://ipv4.fiddler/TokenBasedLoginTests/Account/Register";
statuscode = 302;
}
close
{
method = ka;
}
}
Thanks
Matt
Per http://blogs.iis.net/thomad/archive/2010/05/11/using-the-wcat-fiddler-extension-for-web-server-performance-tests.aspx,
WCAT requests won't show up in Fiddler
nor can a proxy server be used with
WCAT.
The former part of that statement is implied by the latter part. It suggests that the WCAT team specifically removed the ability to use a proxy server, which seems like an odd choice, but might make sense if they thought the load would take down a proxy.
If you wanted, you could configure Fiddler to run as a reverse proxy, and then point WCAT at that reverse proxy; you'd see the traffic then, and Fiddler would redirect inbound requests to their actual destination. See http://www.fiddler2.com/redir/?id=reverseproxy
You might consider using the Visual Studio Web Test tools instead, as they do properly use the proxy (and hence Fiddler).
You could use an extension like this one http://blogs.iis.net/thomad/archive/2010/05/11/using-the-wcat-fiddler-extension-for-web-server-performance-tests.aspx
What happens when you use the server of http://ipv4.fiddler? Local traffic doesn't go through Fiddler, but it adds the ipv4.fiddler as a proxy on top of wininet (I may be getting that wrong and Eric Lawrence will correct me, I'm sure), and as a result, can capture local traffic?
I use Fiddler quite a bit to test web apps and services and always use ipv4.fiddler to capture my local traffic.
Hope this helps!
You can easily track WCAT traffic (very useful for debugging) using a transport level tool (such as Wireshark or Ethereal) rather than an HTTP proxy. These tools are able to capture traffic at the network card/packet level. All you need to do is...
a) Run a capture with a filter enabled to limit to traffic between client(s) and server and using a particular protocol (i.e. HTTP) - There's always a lot of unrelated traffic flowing through your network card and adding the filtering will make things easier. If you have multiple clients it might be best to run the capture on the server.
b) Tracing a stream (normally just click on one of the packets related to the request / response and rebuild it to a request / response.
Note that this will impact on throughput/performance. Best to turn it off for a real run! Hope this is helpful!

redirect a http request using selenium

This is quite a straight forward question that I can't seem to find a comprehensive answer for. When using Selenium and Selenium proxy, how I can make the proxy catch outgoing xhr requests to specific uri's and modify the destination to a pre-mocked alternative.
I found this example form googling, http://www.sonatype.com/people/2009/10/selenium-part-4/ but it doesn't seem to explain how to write the mockHelper methods...
Thanks
Simon
This would require modification to the proxy server. There are no means otherwise to muck around with the response bodies. Your two options are to modify the proxy in the Selenium RC distribution, or alternatively, provide your own proxy server elsewhere. You can have the Selenium proxy connect to your proxy or you can configure the browsers to connect directly to your proxy. This would allow you to configure squid or whatever your comfortable with to deal with the request.