g1_gatchaman Posted August 13, 2004 Posted August 13, 2004 I'm trying to compile a project using the command line but there is a Web Reference that it keeps choking on and I'm not sure how to reference this at the command line. Should I use the WSDL.exe to produce a .vb file fromt the web service then compile that into a dll and reference that dll to do my final compile? Quote
mocella Posted August 13, 2004 Posted August 13, 2004 You need to create a proxy for your webservice using the WSDL.exe utility. Once you run this, you'll have a dll that you can reference in your command-line compile scipt. Check this link for help: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconCreatingWebServiceProxy.asp Quote
g1_gatchaman Posted August 16, 2004 Author Posted August 16, 2004 Thanks for the info. In my case, this produces a .vb file. I took that and compiled it into a dll and then referenced it when I try to build my final dll but I get a "Type ... is not defined" and it refers to where I dim the proxy. What do I do? Quote
Administrators PlausiblyDamp Posted August 16, 2004 Administrators Posted August 16, 2004 How are you refering to the proxy? IIRC the wsdl.exe tool doesn't put the class in a paticular namespace by default, you can specify on with the /n command line switch. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
g1_gatchaman Posted August 16, 2004 Author Posted August 16, 2004 --Not sure how to exactly answer your question (i'm not a programmer). So, I'm gonna give you what I'm doing. wsdl /l:vb https://mysite/pdfservice/pdfgetter.asmx /out:C:\_BuildArea\Site\includes\CommonFunctions\PDFgetter.vb --From here I compile this into a dll (I wasn't specifying a namespace before but now I am and I am getting "..ambiguous in the namespace..." messages on top of the "Type ... is not defined") C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\vbc.exe /out:C:\_BuildArea\Site\Bin\PDFgetter.dll /target:library /libpath:C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\ /r:system.dll /r:System.XML.dll /r:System.Web.Services.dll /rootnamespace:mynamespace /optimize+ /debug- /recurse:C:\_BuildArea\Site\includes\commonfunctions\pdfgetter.vb --Then I just use this dll as a reference in my compile command Quote
g1_gatchaman Posted August 20, 2004 Author Posted August 20, 2004 If I use the WSDL to produce a dll and reference that then how does my final dll know what the URL is for the web service? Ugh! Help! I tried using NAnt to compile using the Solution file to get all the reference info but I am having no luck with that either. Anyone know of some good NAnt documentation or examples? Quote
Administrators PlausiblyDamp Posted August 20, 2004 Administrators Posted August 20, 2004 When you use wsdl.exe it puts the url of the web service into the proxy class itself. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
mocella Posted August 25, 2004 Posted August 25, 2004 The easiest thing here (for consistency anyhow) is to just forget using the web-reference in the VS.net project and add references to your .dlls that WSDL.exe created. This way, your NANT script is using the same .dlls as your VS project. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.