+2  A: 

You may find useful the command line utility wsdl.exe of .NET by using the /serverInterface option. According to the documentation:

Generates interfaces for server-side implementation of an ASP.NET Web Service. An interface is generated for each binding in the WSDL document(s). The WSDL alone implements the WSDL contract (classes that implement the interface should not include either of the following on the class methods: Web Service attributes or Serialization attributes that change the WSDL contract). Short form is '/si'.

Panos
this helps. although the inherited wsdl doesn't appear to be compatible with it because it doesn't conform to WS-I Basic Profile v1.1.
paulwhit
If you are getting just warnings and the code is generated, probably you can use it without problem. Wsdl.exe always tries to generate Basic Profile compliant code unless there is something in WSDL that is not compatible.
Panos
Moreover, if you build the ws client proxy from visual studio you probably received similar warnings. You can create a client proxy with wsdl.exe and compare it with the one that you have in your project.
Panos
it's a stop error; no code's generated :( I'll add more info to the question.
paulwhit
A: 

Try mock the wrapper interface using RhinoMocks and StructureMap .

IceHeat
Does this handle the generation of web services? I can't seem to find that information readily available, and it doesn't look applicable on the surface. I meant "mock" in the generic sense, but maybe it's still applicable?
paulwhit
A: 

Not sure if this will help,

what i've done recently is:

  • Generate .cs file using the wsdl tool or visual studio
  • I've changed it to be a partial class
  • I've created another partial class, in which all it does is add a line to say that the class implements IWhatEver
  • I've created an interface that is the same as the generated proxy class (Therefore the the proxy fully implements the interface)

Then i've used a Mocking framework (Moq) in my case, to mock the WebService, I've then used poor mans dependancy injection (pass the mock into a constructor of the class under test) .. which can handle an instance of IWhatever

Test away..

Hope that helps

danswain
I tried wsdl.exe and it's not compatible with the inherited wsdl because it doesn't follow the standard. :( After that, I'm not sure I need a mocking framework; couldn't I just change the proxy class URL setting?
paulwhit
+1  A: 

We are using WSCF - Web Services Contract First tool from Thinktecture to do web service development creating XSD schema first and then generating service interfaces using this tool. It may be useful to generate service interfaces from WSDL but I have not tried this yet myself.

Vlad N
That's pretty slick. Didn't work, but I can use this for other things! :)
paulwhit
(Should clarify that it *does* work for my purpose, but I'm still dealing with a borked up WSDL that I think can only work on the original app that generated it (Axis). Trying that next)
paulwhit
Accepting because I think this would be the best way except in my edge case with a messed up WSDL.
paulwhit
I'm glad that it helped you somewhat. ;-)
Vlad N
A: 

Yes - you can use WSCF (as per above) to generate server side code. The actual URL can then be overwritten to point to the test URL that you want to use.

However, this just generates a stub. You still have to code the actual e.g. GetCustomers() method which is somewhat suspect because you have no idea how the actual implementation works.

Then you can either mock this or create a simple ASP web server to run it.

nzpcmad