Is it possible to send an API call in the format of "application/json" to a SOAP endpoint?
When working with JSON, I know we typically work with REST services. But due to limitations on the customer's side, they cannot send a typical SOAP envelope (XML, name/value pairs), instead, they can only send JSON data to a WSDL service.
I do not know of the customer's development environment yet (I have an email out to them) which this API call is being made from.
Related
I want to send mail using ms graph API from azure.
I know that first we need to authenticate azure app and generate a access token. And call send mail API to send mail.
I was able to generate access token.
But I am not able send mail with some message.
As graph API accept json we need to make our message in json.
How can I create a message with json and use it to send in post request using scala.
All the incoming request to api management will have a token in a header, before backend service is hit token has to be verified. To verify token a GET tokenVallidationApi is to be hit and the response will tell us whether the token is valid or not. If the response exists for token validation , we have to take out few entries from response and enrich the body/header to hit the backend api. I am very new to api management tool and just figuring out how can we achieve this with azure api management?
This is possible. You would have to implement your policies like something below
1. Validate Token
For this, you would first call the validation endpoint using send-request. You could also implement caching using value caching policies for multiple requests.
The doc also highlights how you can extract value from the response body.
2. Transform Body & Headers
For headers, you would use the set-header policy and for the body, you would use the set-body policy.
I have a URL to rest web service (made in WCF with JSON endpoint) that I call by passing JSON with all parameters.
But I don't know some parameters names.
Is there some tool where I can enter service URL and method name to get JSON example that I must pass to this method?
I know that tools like this exist for SOAP services but I need for REST.
I just tried to use wcf test client but I can't load the JSON endpoint it's only for SOAP.
...svc/json
There are various addons for rest and soap services. you can try as per your requirement.
How can I discover what JSON endpoints a WCF service has?
I know I can append wsdl to the URL and get the SOAP call details ...
http://myserver/Explore/TestService.svc?wsdl
but how can I get what JSON calls the service has?
You can't - there is no built-in mechanism for rest endpoint metadata - you just need to know which http options are applicable to which resources. You'll also need to have some types ready to deserialise to - if you can't get this information off the service provider then you'll need to infer them from the response json.
There is a service discovery standard called WADL which is supposed to do for http what wsdl does for SOAP. However unless the service provider has published one you're out of luck.
We have developed an application for iPad which consumes data from WCF service.
iPad application sends request in JSON data format to WCF service and receives response in JSON data format from WCF service.
We found during penetration test that users can manipulate request JSON data like changing role of logged in user to get higher privileged user data in the application.
JSON request data is not encrypted. It is plain text data. Same is the case with response.
How to secure request and response JSON data?
We can encrypt request at iPad and decrypt at WCF side and do similarly for response JSON data. This will add overhead.
Another option is to compute hash for request JSON data at iPad and send it as input to WCF. At WCF side, compute hash again for actual request JSON data and compare. This will help to identify whether request is manipulated or not.
Any suggestions???
Can we use ProtectionLevel Property on Operation Contract???
As per MSDN (http://msdn.microsoft.com/en-us/library/aa347692(v=vs.90).aspx) article we can encrypt and sign operation contract. In this case, what changes should be made at iPad application side???