tags:

views:

206

answers:

2

I'm signed up, I've downloaded sample code, I've got a WSDL...and yet I have no idea how to get this stuff into my existing .Net application. The WSDL was in a zip file, not a URL so I can't just "Add Web Reference." I've run the wsdl tool from the .Net command prompt, and it made a nice class for me...yet dropping that into my web_reference folder doesn't give me any kind of instantiatable class.

I know I'm missing something stupid. Can someone point me in the right direction please?

+1  A: 

Actually, you can just "Add Web Reference". Give the path to the URL.

OTOH, you should be doing all new web service development (even client development) using WCF. Microsoft now considers ASMX web services to be "legacy technology".

BTW, I just tried using their address validation service, and it won't work with .NET. Both ASMX and WCF clients will attempt to use the XML serializer to consume this service, and there is a bug there that prevents that service from being used.

John Saunders
I have a couple of questions, but #1 is, it won't work with .Net? How on earth can that be? I mean, FedEx and .Net communication just can't be an obscure thing...it's got to be used in tons of different apps out there. Right?Second, if the WSDL they gave me is in a zip file, then I don't have a real URL to pass to the "Add Web Reference" dialog, do I? Or are you saying the path to the .zip should be sufficient?I actually am trying to use the Address Verification Service right now -- that's the one we care about at this time. This is not good...
Matt Dawdy
@Matt: it won't work with .NET because the service is not WS-I BP-1 compliant, and because in this case, that provokes a bug in the XmlSerializer that is unlikely to ever be fixed. The path to the WSDL file is enough. Extract it from the ZIP.
John Saunders
So, you are telling me that I can't use the WSDL or anythign like that, and I have to basically figure out how to do it with pure xml http requests and things?
Matt Dawdy
@Matt: Yes. Looks like that. But first, you should report this at http://connect.microsoft.com/visualstudio/. Be sure to report "just the facts", and to mention that this is the Fedex Address Validation Service. It probably won't help, but we can at least try.
John Saunders
@Matt: BTW, if you can use Visual Studio 2008, it won't be _that_ bad. I would use LINQ to XML for constructing the messages. For debugging purposes, you can even validate against the Fedex XSD. And `HttpWebRequest` isn't that difficult to use.
John Saunders
John, I am using VS2008 -- I'm really not afraid of going the route of creating XML by hand, but I know that usually if you don't go down the route the developer's intended, you can be in for some major pain...and little support. Thanks for all your help.
Matt Dawdy
@Matt: judging from what they produced, it would appear that the intention of Fedex was to produce a web service that is not WS-I BP-1 compliant. I do not believe I've ever seen this bug with a compliant service.
John Saunders
John -- I kept digging on the FedEx site, and on the very last page of documentation (of course) it tells you about a "known service issue" with WSDL's. Basically, searching the generated file and replacing [][] with [] in 2 places...and now, while I'm still having problems, it compiles and seems to actually talk to FedEx and get a response back. So far it's always Authentication Failed, but it's in their XML format. Anyway, thanks for sticking with this and helping me. From here on out, I think it's all on me.
Matt Dawdy
@Matt: good luck. Be sure to document the fact that your change will be undone by "Update web reference".
John Saunders
A: 

Matt, the WSDL zip file has the WSDL and its associated transactions for that service. Unzip the file and then "Add the reference" to the WSDL in your code.

support
@support: I tried that yesterday. It didn't work.
John Saunders