do i have to regenerate wsdl after changing the webservice method - web-services

I am trying to learn webservices,
I have created a webservice and client after watching tutorials and my client is getting the input from webmethod successfully.
What i did is, i just created a test webservice method to retun a hardcoded string to client.
But when i change the hardcoded value to something new and run the client, it is not getting the updated value, it is still displaying the old value.
Do i have to regenerate client or any other step needed to get the updated weservice call ...???
please guide me ...

Related

setting cookie values in load test

I am trying to build a load test (visual studio 2017) that works on a web app that sets a value in the cookie via javascript (client side). For future requests to work, this value needs to be present in the cookie, however because it was set via javascript, this value did not get recorded when building the load test script.
It changes and I know how to the get the needed value into a context parameter.
The problem I have, is;
How do you set a value in the cookie, in a load test in visual studio 2017?
After looking into this, it looks like the way to do this is to write a custom request plugin to insert the desired value into the cookie before the request is sent.
From what I have working, it looks like this also needs to be done on each of the requests before it is sent. Its not like it actually sets the cookie to have the desired value. (unless someone knows how?).

How to change SoapUI testRequest method to get instead of Post

I need to change the request method to GET instead of the default one POST in SoapUI 5.3.0.
ٍSteps
Open SoapUI.
Create new project.
Add WSDL.
Add New Test suite.
Add New Test case.
Add new Soap Request step.
When I run the test step and check the HTTP log I find that the default method is POST.
How I can change the method to GET.

Is authorize.net old test server still active?

The old authorize.net test server was https://test.authorize.net/gateway/transact.dll but at some point changed to apitest.authorize.net/xml/v1/request.api. The new one expects XML. Our cart is passing an encoded url string. The production server we are using is secure2.authorize.net/gateway/transact.dll and it still works but the test server does not. I just created a new account on the sandbox but the old test site doesn't seem to accept my new credentials. What am i missing? Am I going to have to convert my custom cart to pass XML to use the test server?
Ashley
I was finally able to confirm that both old and new test servers still work. I found an issue with the config in our shopping cart that resolved this issue.

Consuming web services with claims-based authentication - SoapServerException

We have an application that periodically pulls data from a SharePoint list and integrates with another application. We've been using it for more than a year without a problem. Recently, however, we switched our farm to use claims-based authentication... and there went the app.
My code, at a high level, does the following:
SPWebRefs.Lists spl = new SPWebRefs.Lists();
spl.Credentials = System.Net.CredentialCache.DefaultCredentials;
//Build request here
XmlNode listItems = spl.GetListItems("My list", view, query, viewFields, null, queryOptions, null);
I get an "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown" exception right there.
I'm looking through Fiddler, and I get the 401 challenge, quickly followed by a 200 response, which I assume means I'm in. But then I get a 500 error as soon as the GetListItems method is invoked.
I've tried this against a 2010 instance as well as a 2013 farm that we're getting ready to deploy. Same situation.
I'm using the 4.0 Framework at this point, but I've considered testing it out against the 4.5 Framework, which includes some new APIs for claims authentication. Would that make any difference?
Any thoughts would be greatly appreciated. Thanks so much in advance!
You must call SharePoint's Authentication WebService first. You will get a cookie from it, which you can pass to the Lists WebService.
See a sample here: http://www.tonytestasworld.com/post/2009/06/04/How-To-Authenticate-and-Use-SharePoint-Web-Services-in-an-FBA-SharePoint-site.aspx

Deploying a SharePoint WebPart with its Web Service Reference

I'm trying to built a SharePoint Web Part that has as part of it a service reference to Another SharePoint server that I need to call from within vb code. However when I try to call the remote web service for the first time, I get the following in the log:
Could not find default endpoint element that references contract 'ListReference.ListsSoap' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)
at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
at System.ServiceModel.ChannelFactory1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
at System.ServiceModel.EndpointTrait1.CreateSimplexFactory()
at System.ServiceModel.ClientBase1.CreateChannelFactoryRef(EndpointTrait1 endpointTrait)
at System.ServiceModel.ClientBase1.InitializeChannelFactoryRef()
at System.ServiceModel.ClientBase1..ctor()
at VSeWSS.ChangeRequestWorkflow.ChangeRequest.SubmitForm(Object sender, EventArgs e)
What is the proper way to deploy a Web Part with a Service Reference, could I be doing something wrong? Thanks!
You need to add the endpoint configuration into the web.config of the SharePoint site that is consuming the webservice.
I found this question that solved my problem.
Basically, I just needed to create a BasicHttpBinding object and populate its properties with the ones the SVC generator made in my app.config.
WCF Configuration without a config file
Actually I solved my problem. My application has many projects, and the config file was in the project calling the WebService, but it seems it has to be in the starting project...
Hm, if I'm understanding what you're asking correctly, I'm doing that. I just added the webservice from one of the correct endpoints to the project in VS, then before I call it in my actual code, I get the URL I want to connect to with this call from the hierarchical object store from Codeplex, then set the Url property. So:
MyService srv = new MyService();
srv.Url = SPContext.Current.Web.Properties["serviceurl"];
Its working like that fine.
hth.