Debugging Web Services in Visual Studio - vb.net

I am trying to use sample FedEx Web Service code written in VB.NET to retrieve shipping rates.
The call returned rate information, but it returned rates that are way too high and do not match those shown on their web site for the same shipping parameters.
Their support team is willing to investigate the discrepancy if I can provide them the XML data, SOAP transaction I presume, but I do not know how to get at this.
Can someone help?

I have used Fiddler in the past for monitoring http requests/responses. You may give this a try but i suggest you revisit the sample just to check it's logic. It could be as simple as a datatype issue or just missing some zeros at the end or you might be sending some wrong parameter.

I think Web service Studio 2.0 can help you in this.. It can display XML & SOAP request responses and WSDL bindings of the given webservice.
And there is an codeplex alternative to test even WCF services .. Just give a try..

One way to do this would be to just sniff the connection using WireShark (free download, wireshark.org).
From this, you could view the entire transaction between client and server, and see what it was sending.

SoapUI is your friend, here.

You could use fiddler or the WCF tracing tool:
http://msdn.microsoft.com/en-us/library/aa702726.aspx

Related

Getting useful error messages from CRM 2011 in Silverlight

Disclaimer: This is NOT a duplicate of this thread. First, in my case, there's no middle-tier service. Secondly, I'm working with SL 5 and CRM 2011.
I'm developing Silverlight applications to work with MS CRM 2011. These applications are part of a CRM Solution and are meant to be used in CRM Online.
This is important: I CANNOT write extra web services or modify web.config files which are part of CRM, as I cannot do these things with CRM Online.
Usually my applications just need the OData service, and there are no issues in these cases. But one application needs to use the SOAP organization service, and here the trouble starts.
Apart from some problems getting it to work (as I need to create OrganizationRequests from scratch), there's a big problem getting meaningful exception messages from that service. SL will happily always return 404, which isn't helpful at all to the user.
I've tried using
WebRequest.RegisterPrefix("http://", System.Net.Browser.WebRequestCreator.ClientHttp);
WebRequest.RegisterPrefix("https://", System.Net.Browser.WebRequestCreator.ClientHttp);
as described in this article but that turned out to cause problems in one situation with IFD and ADFS (even though this solution was otherwise perfect).
In case of an error I really need to be able to give the user some meaningful information ("Not found" is hardly ideal).
What should I do to get some useful error messages out of CRM?
EDIT:
Please note I'm talking about the Organization service, NOT the OData service! I've no problems getting some useful information to display for the user from the latter.
I want to point this out, because of this thread which, at first glance, seems to be perfect, but then it turns out (given the accepted answer) that it was for OData all along.
Try see this article from Microsoft, i never used and i don't know if it can be applied in CRM. It's a very interesting article, so take a look.
I ran into a similar problem / error when uploading a Silverlight 5 XAP to CRM 2011 Online.
In order to get useful message, open CRM in IE navigate to your Silverlight resource, hit F12 for the IE Debugger, and go to the Network tab ( see screenshot ).
Hope this helps!

Can a WCF Service display a help page or other content?

If you enter a service endpoint in a browser you get a Microsoft generated page with a link to the wsdl and some sample C# and VB code for creating an instance of the service client. If you enter the wsdl link in a browser you get the wsdl. This all assumes no strange security restrictions of course.
Is there a way to have a service return a page of your own design? If I wanted to have a nice help screen describing the available service methods, or describing possible error messages for example. Either replacing the MS generated default page, or something that can be viewed like a wsdl but with a ?help query parameter for example.
I'm looking for really simple here with minimal changes to the existing services. If possible something that can be done by content creators or technical writers and not the service developers.
I'm not sure if you can override the default help page, but you can definitely serve up a help page. This article on WCF Custom Help Page explains how.

WCF rest security question

I have a WCF REST service. Now the question is how can I secure my REST service so no one can use/call it? and what would be the best way to call it (e.g. using jquery, or from code behind)? the client application is on MVC 3.
please help and advise
Many Thanks
Not sure if you're still looking for a solution. But I used WCFRESTContrib as a basis for my project for the security features, among other things. It's very easy to setup Basic Authentication on the entire service, or on an individual basis for each service method. They have a full description on it here. If you don't decide to use the project, it should at least give you a good understanding on how it works with WCF REST api's.

Generating iTunes podcast feed with WCF

How do you make an iTunes podcast feed with WCF? Or do you know of a complete example that actually works?
I've reached the point where I corrected all errors and warnings[1] marked by feedvalidator.org and also included all the iTunes custom tags I could and iTunes still claims it's a broken feed (obviously giving no useful information about it).
[1] I haven't solved two warnings: one is that the address of the podcast is not consistent, because I'm running it on localhost, and the other that I am using namespaces for the atom embedded tags when producing an RSS, for which there's no work around using WCF.
Looks like this user was able to get it working: How do you add another namespace to WCF SyndicationFeed?
Hope that helps.
I believe WCF is a communications framework that uses SOAP, and is meant for something more like Web Services, rather than hosting an XML file. Even if it is possible, WCF is probably not the right way to do what you're trying to do.
Edit: Uninformed opinions do not make good answers. Forget I said anything!

JIRA SOAP API : link an issue to another

I'm working on a tool in C# that interfaces the JIRA SOAP API. I have read the documentation but I can't find what I'm looking for. Does anyone know if it is possible to link an issue to another one via this api?
PS : Actually, my real need is to convert an issue as a subtask of an issue...
Last time I looked, JIRA's web service wasn't really actively supported or encouraged by Atlassian. It's very much a second-class citizen compared to the web front end, with very basic operations.
Also, it's not a WSI-compliant web service (it's an old Axis-based RPC_encoded service), and so modern web service stacks won't even bind to it. You might want check that your client can perform basic query operations before diving into the depths of the API.
You can actually go pretty far with Jelly scripts, but converting an issue to a subtask then linking it as a subtask... I'm not positive that you can go that far.