should it be possible to tag DataContracts, DataMembers, ServiceContracts and OperationContracts with a Description attribute, (System.ComponentModel.DescriptionAttribute) so that those descriptions appear in the WSDL to aid the developer or so an automatic documentation generation tool like TechWriter can use them in the documentation.
I went and added descriptions to my web services but they don't appear in the WSDL.
Is there any other way to do what I want?
Thanks
Because TechWriter relies on the descriptions being in the WSDL, you'll want to check out a WCF addon called WCFExtras that can make that happen. Instead of using attributes, WCFExtras uses the XML Comments from your source code.
Related
I need to access the Enterprise WSDL using the Salesforce API in my Java app. Can anybody help with this?
Salesforce WSDLs are only available in the Salesforce UI, not through the API. You can get them at:
Setup | Develop | API
If you find that need to get the Enterprise WSDL at runtime because your application needs to work with different sets of objects and fields, you should probably be using the Partner WSDL instead. It will allow you to get all the object and field descriptions at runtime and make dynamic API calls. There a little more work upfront, but results in a more flexible and resilient application. When the objects and fields change in the future, your application will continue to work without re-consuming the WSDL.
The WSDL is not available through the Salesforce API (to my knowledge). However, it is available through a REST call if you have the right information. First, you need a session token, generated through either an OAuth handshake or a username/password+security token handshake. You also need the name of the Apex class from which you generated the WSDL. With those two things, you can perform a GET. See the following pseudo-code for the requisite GET structure.
GET https://<SANDBOX_INSTANCE_URL>/services/wsdl/class/<APEX_WSDL_CLASS_NAME>?isdtp=p1
Headers:
'Cookie' : 'sid=<SESSION_TOKEN>'
EDIT:
I verified that this works with both Enterprise/Partner WSDLs and WSDLs generated from custom Apex classes.
You can use the following generic URLs for these WSDLs, as of v41.0:
Partner: https://<SANDBOX_INSTANCE_URL>/soap/wsdl.jsp
Apex: https://<SANDBOX_INSTANCE_URL>/services/wsdl/apex
Metadata: https://<SANDBOX_INSTANCE_URL>/services/wsdl/metadata
Tooling: https://<SANDBOX_INSTANCE_URL>/services/wsdl/tooling
Tooling (Enums): https://<SANDBOX_INSTANCE_URL>/services/wsdl/tooling?enumStyle=ALL_STRONG
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.
Hallo Again my question is sample, but I can not find way to accomplish this task. As you all know when service is hosted in IIS it has its default page when one navigates to the .svc file. I want to be able to change layout of this page to implement custom design for it.
Is it possible to achieve it at all? or does any of u have any experience relating this implementation?
If I understood you correctly then all you need is explained here
How can I change an html output of wcf service with my own content?
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!
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