I have valid *.xml files generated based on WCF service. I want to test the WCF service using the *.xml file. Currently, I have to programmatically load the *.xml file, initialise service object with *.xml file, and send the request.
Is there tool that avoids programming, and can test the WCF service.
The WCF Test Client is a great tool to test your services (and you already have it)
http://msdn.microsoft.com/en-us/library/bb552364.aspx
If you need something a little more flexible and powerful, check out Storm:
http://storm.codeplex.com/
With Storm you can manipulate the requests and trace out the interaction.
Of course you could always just use Fiddler to make your own web requests.
Related
I wrote a small test WCF REST service using C#, within the WCF service, if it receive POST info from client, the WCF will collect the HTTP Request message from client and write it to a text file. I am using Stream to collect HTTP request and using StreamWriter to write it to a text file. I can specify any folder/path for the text file.
At this point, everything is working when I host the WCF REST service using a local console app.
However, I want to host the WCF service by using Windows service, the Windows service self is fine, it can be started/stoped no issue, my issue is, when client send HTTP POST request, the WCF suppose to create the text file but I can't see the text file. I tried to search the file on the PC, I could not find it, the text file actually never generated (in my view, Windows Service is not responsible to write the file, it is still WCF responsibility)
btw, the HTTP GET works from client (means the WCF Windows service works at least for GET).
any hints are much appreciated
is it possible with SAP to generate client stubs and transfer objects from a WSDL served by a .NET WCF web service? Or do I have to build my SOAP XML requests manually?
To be more on the point. I still have a WCF web service and the wsdl. I have no knowlege in SAP. So the question is. Is it possible and how can I create client service stubs and the transfer objects in SAP from my WSDL?
It's easy to create an ABAP client for an existing web service if you have access to the URL for obtaining the wsdl file or the wsdl file itself. See this link for an step by step tutorial wich is basically:
1- Generate proxy from wsdl using assitant
2- Use proxy generated in your ABAP program
Regards
You can use the WSDL from the wcf for this. You can get the WSDL as service.svc?wsdl. However at times, some SOAP client generator expect all the definitions of the SOAP/WSDL in a single call. For that you might have to look at the following pages:
http://weblogs.asp.net/pglavich/archive/2010/03/16/making-wcf-output-a-single-wsdl-file-for-interop-purposes.aspx
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f03b6e78-ef28-4692-8f19-62d2f2d3bc9c
WCF: how to generate a single WSDL document, without WSDL:import?
I am developing a wcf service (basicHttpBinding) that should also be consumed by non .net clients (e.g. Java clients). But now I wonder how the client can define his client config file. Or is this file only needed for .net-clients? (I am thinking of configurations like maxReceivedMessageSize or maxItemsInObjectGraph for example).
Each development platform (call it as you want: SOAP stack, Framework, API) has its own way to configure communication. You don't need to bother with it. You just need to expose correct WSDL and client's developer will be responsible for configuring the client application based on his needs.
If you want to extend documentation of your service in WSDL you can use wsdl:documentation. WCF doesn't offer it by default but you can use this technology sample to extend WCF. You can use such documentation for example to describe that service operation can return large amount of data. Another approach to add wsdl:documentation is using WCF Extras.
From the sound of it, the client shouldn't have access to those configuration options. For instance, why should a client to the WCF service be able to specify the maxReceivedMessageSize?
What you probably want to do is define these configuration options on the server-side. If a client makes a call and there is a conflict with one of your options (i.e. the client exceeds maxReceivedMessageSize), you'll want to throw a SoapException back to the client.
If you want to let the client have access to the configuration settings before he or she sends a request, you can always implement a simple web service method that sends back the values.
I am working on Apache Tomcat 6 and Axis2 for web services.
I want to monitor SOAP messages which are exchanged with client and server and save the data into a file.
How can I do it?
Storm is a test client for SOAP services.
To capture the traffic between your client and the server, you could use a proxy like Fiddler.
There is an example in modules samples (in samples/userguide) describing this case.
Personally I found simpler just to add a logging code in my generated <...MessageReceiverInOut> class. Just dumping out input/output envelopes for my particular service.
I want to expose a service operation of a WCF Data service over FTP
I was wondering how to best approach this
I was thinking of writing a batch file, which will invoke the WCF dataservice, write the data returned by the service to a FTP location and grant access to the Client to that particular FTP location
Do you think this is a better idea?
You cannot do this. A WCF Data Service is always a REST-based HTTP service - and it's very interactive - you cannot achieve this on an FTP server.
If you want to expose and make available data on an FTP server, I would use your server-side code to produce that data set (by e.g. querying the data source), then wrap this up in an Excel sheet or whatever format is appropriate, and transfer that file onto the FTP server on the server-side.
Seems like it might be possible to expose a WCF method as an FTP endpoint:
The address defines where the service is located; this could be a
URL, an FTP address, or a network or local path. A binding defines the
way that you communicate with the service. WCF bindings provide a
versatile model for specifying a protocol such as HTTP or FTP, a
security mechanism such as Windows Authentication or user names and
passwords, and much more. A contract includes the operations that are
exposed by the WCF service class.
http://msdn.microsoft.com/en-us/library/bb907578.aspx
Some more info here http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/5220693e-2366-44f7-b56d-35de73d18472#0c8160bc-d687-4e48-9ba9-000755284e43