Unable to sucessfuly post from client to WCF WSDL service - wcf

I have created a WSDL service with WCF with 3 service contracts-methods, I´m able to test it with soap application and all 3 service methods work as expected.
I´m trying to post data to the Getcallback service contract, from soap application the method works, but while trying to test with postman it did error with HTTP 415
From what I have found on possible causes this can be because the server is not expecting to receive the data, but from all, I have read I feel is correct.
I need to retrieve a string value from the client, this is why I´m using JS to post to the server method expecting a string value.
[Service contracts 1
Sample JS call to soap service
Sample post-call from client to server
I have also tried to make the call with pure js, but the same issue.
I appreciate anyone helps on this matter
Error from client call
Postman error

This was fix by adding SOAPAction and Content-Type to request.

Related

How to creating WCF service for communicating Xamarin.forms with Sqlserver

Currently i working on Creating WCF service in order to communicate xamarin forms (Android) with sqlserver. For that i have tried some examples from the following link https://developer.xamarin.com/guides/xamarin-forms/web-services/consuming/wcf/ but it was not working also it throws error(SystemError).
My goal : i have to retrieve data from sqlserver using WCF service . Kindly provide ideas to solve this issues.
Thanks.
krupa
i think you want to create web-service, you can learn how to make wcf from here
webservices is same like an other client-server architecture where you send request to server and get response.
now make one hello world webservices base on above example
Request - in request you have to send data you can use xml or json
in method of webservice you have to process your data [calculate/store in DB/etc]
in response you send response data back
*to test a webservice use postman extension in chrome browser

Jitterbit web service request failure

I'm using Jitterbit to call a web service and output the response to a txt file. My web service call is failing with an authentication error. I understand the error but don't understand why I'm getting it. The credentials are correctly configured in the web service method. So, my question is, is there a way to output the web service request to the operation log so that I can see what values are truly being passed?
Thanks, Jason
I would suggest using global variables for your credentials and using the built in function...
WriteToOperationLog($variableName)

WCF basic auth to service that does not send 401 but 500 instead

I have to consume 3 web services (Sharepoint/Alfresco/Documentum CMIS) via WCF with HTTP Basic auth.
With Sharepoint or Alfresco, first request goes without Authorization header, receives HTTP 401, gets auto-retried by WCF with header, everything's fine.
But with Documentum, I receive HTTP 500 and a SOAP Fault instead, so WCF never gets an opportunity to send the header and returns the exception as-is.
I can of course add the headers manually via HttpRequestMessageProperty, but this looks like an ugly hack to me. Is there anything that could be configured on the WCF side to send headers with the first request, or on Documentum side to return 401?
You could try fronting the Documentum service with another web server that behaves properly, and passing the requests through?
I implemented something similar using IIS to front Apache Tomcat in order to use Windows Auth, and used the isapi_redirect.dll filter to pass requests through. More information about that can be found here: http://tomcat.apache.org/connectors-doc/reference/iis.html
Don't know if something like that is an option for you, but it may provide an easier solution in code.

content type issue with SOAP::Lite

When I'm trying connect to server I got below error msg:
Cannot process the message because the
content type 'text/xml' was not the
expected type 'application/soap+xml;
charset=utf-8'
I read it connect to server (implemented in WCF), but can I fix it also with my side (the client) implemented in Perl using the SOAP::Lite module?
The exception means that client expects the response from Webservice using message version Soap 1.1 and thus, expecting content-type of the message to be 'text/xml'. However, it's sending the messages to the service endpoint using Soap 1.2 message version.
If perl/Soap Lite supports Soap 1.2, it can communicate with WCF on this endpoint.
HTH,
Amit
I am still struggling to get my perl application to consume a WCF based web service but I was able to get past the error you are referrign to in your post.
To change the content type use this command.
$SOAP::Constants::DEFAULT_HTTP_CONTENT_TYPE = 'application/soap+xml';

IIS6 cannot handle WCF json response

I wonder if you could help me with this. I have a .NET 3.5 WCF RESTful service that returns json. Service works fine on my local machine but when I deploy it on IIS6 I get this error: The server encountered an error processing the request. See server logs for more details.
The WebInvoke method is GET and when I try to access the service method in browser on the IIS6 machine I get a prompt that asks me to download a file (with the response of the GET request).
I'm really baffled by this as when I choose to download and open the file I see the json that is suppossed to be returned....Strange behavior by IIS.
Any clues on this?
The answer was rather trivial...
Because my wcf operation was returning a List of objects for some reason IIS insists in that case the BodyStyle to be WebMessageBodyStyle.Wrapped , unlike local development service where the response was returned correctly both with Bare and Wrapped formats.
Thanks for all suggestions guys.