Webservice delivering pdfs - web-services

For a proof-of-concept I am looking for a webservice that delivers dummy PDF files. Do you know by chance one ?
I googled but did not find anything.

Related

Returning Json objetcs in Chrome using ASp.Net Web Apis

I am fairly new to web API and i'm currently following this tutorial
I have only got as far as task 3 and i'm quite learning a lot.
As you can see the tutorial is using Internet Explorer and I am using Chrome .. for some reason Chrome is returning xml and IE is returning a json object. Should I worry about this or not? i'd love it if Chrome returned a Json object though..
Thank you
WebApi is pretty cool in that it will serialise it's output as JSON or XML based on the accept header sent by the browser.
I expect that Chrome's default is XML, and IE's is JSON.
I can't find a simple configuration change example for Chrome, with most information pointing to having to use a plugin to change the accept header. In Firefox the default is XML but you can adjust it with a config change.

Does the existence of a .wsdl file mean files must be generated?

When I'm tasked with dealing with connecting to web services, I've always found the appropriate .wsdl file, ran WSDL2Java.bat, and incorporated those Java files into my Java project. Then I've successfully completed my project that needs to access data via web services.
My question is, are there other ways to use the .wsdl file to access web services? ( I'm not talking about creating classes for different languages ). For example, I have documentation describing one company's web services. The examples it shows in it's documentation are essentially dumps of HTTP Post requests. Is this "web services"? It looks to me that the .wsdl file is merely used as a reference to make the correct Post requests. I could just make text templates and plug in the right values, and send them out, right? I really feel like I'm missing something here.
Am I a web-services illiterati?
To call a SOAP web service over HTTP you just need to send it a properly formatted XML with a POST request. That's it! How you build the request is irrelevant as long as it conforms to the SOAP protocol and the payload corresponds to a proper web service operation that exists on the particular web service you are calling.
But how do you know how to build the proper payload?
The web service needs to have some sort of documentation otherwise you don't know what to put inside the XML. The documentation can be whatever you like as long as people can use it to build valid requests. WSDL fits this criteria but has an extra advantage: you can feed it to a tool that generates code. That code knows how to handle all the SOAP details and exposes objects and methods to your application.
What would you prefer? Generating code from the WSDL in a few minutes and be able to call whatever operation on the web service or, build the requests and parse the responses by hand and spend hours or days doing so. What would your boss or company prefer? :)
It looks to me that the .wsdl file is merely used as a reference to make the correct Post requests. I could just make text templates and plug in the right values, and send them out, right?
Right! But you also have to consider your productivity as an employee in one case as opposed to the other.

Generate WSDL for existing SOAP Service using captured traffic

I need to use the SOAP service of a printer. There is a windows tool to access this service and I used it to generate SOAP requests and responses of the important functions that I need.
Now I should write a client for Linux using Python and I found the easiest way would be to use the suds library with an WSDL file. But I don't have this WSDL!
As I investigated the windows tool (looked at the hexdump of the executables), I came to the conclusion that there probably is no WSDL file at all.
Now my question is, has anybody experience with "reverse engineering" SOAP services and knows tools which could be useful for creating WSDL files for existing services? (Googleing hasn't brought up anything useful yet).
You mentioned this is the SOAP service of a printer. Is the printer's API documented on the manufacturer's site? Does the documentation include the WSDL? Can you get the WSDL from the manufacturer?
If you can get the WSDL from the manufacturer then you're done!
If not, then you have to build the WSDL by yourself because I doubt you can find a tool that generates WSDLs given SOAP samples (when working with SOAP web services you mainly get two kinds of tools: those that generate code from WSDL + those that generate WSDL from code).
It's not hard to create the WSDL if you are familiar with SOAP, WSDL and XSD. You just need a text editor or maybe even a WSDL editor to speed things up.
If you don't have full confidence in your WSDL knowledge, there are still some tools that can get you most of the way to the complete WSDL. Here is a way you could do it:
1 - First you need to create the XML schema for the SOAP payloads. For this you can find tools, even some online. After you have the schema, tweak it to your needs by adding, changing or removing elements.
2 - Now you can use the XSD to generate a WSDL. There is an online tool that does that. It just needs the request/response element types to end with Request/Response. Make sure you read the instructions.
You take your XSD file, change the names of the operations to add the Request/Response suffix and feed it to the WSDL Generator - Web Tool. You will get your WSDL.
Now tweak this WSDL as you like (remove the Request/Response suffixes if you don't need them) then ...
3 - ... make sure you end up with a valid WSDL.
4 - Now you can take your WSDL and use a tool like SoapUI to generate sample requests and responses from it just to verify that you get the proper results back.
Do the SoapUI messages match the messages you started with? If yes, you are done and can feed the WSDL to suds to create the Linux client. If not, tweak the WSDL until you get the result you are after.

Consuming VB.NET Web Service with Legacy ColdFusion 4.5

My legacy ColdFusion 4.5 app needs to consume a VB.NET web service and I am wondering if anyone has had success deserializing XML using the ColdFusion CFWDDX ACTION="WDDX2CFML"
I have not had success yet and would appreciate any code examples as I cannot use CFINVOKE.
What are you using to Serialize your VB.Net data? If you haven't found a decent means of doing that, then this library: http://boncode.blogspot.com/2011/10/net-wddxnet-library-revision.html looks to be a good one for doing so. You should be able to deserialize well formed WDDX back into CF code with the <cfwddx action="WDDX2CFML">, as you mentioned. If you have some WDDX values that are not being correctly brought over with that tag, then please post that WDDX so we can see what might be causing the problem.

Logging incoming XML in a .Net Web Service

I have read a few post about this (on stackoverflow as well) and cant seem to get a relevant solution.
I have a standard .NET web service that has one method as below:
[WebMethod]
public SupplyResponseMessage GetSupply(SupplyRequestMessage SupplyRequest)
{
...
}
To debug it, im using log4net writing to a log file and I want it to log the serialized SupplyRequestMessage (hoping in XML) as well, but cant seem to get access to the current HttpContext to do so. What is the recommended way to log the incoming XML that the web service deserializes to create the SupplyRequestMessage object?
SOLUTION
I found exactly what I was looking for in the SoapExtensionAttribute. Here is an article that will help anyone looking for something similar:
Efficient Tracing Using SOAP Extensions in .NET