Reg:Secure soap using karate dsl - soap

I need to test secure soap using karate framework. Does any one know if its possible using karate. how to send an encrypted soap file and then decrypt the message later

Related

Should I be using REST or SOAP UI for testing?

I am testing a new webservice that is receiving messages from an application and responding with messages with specific information. The webservice then uses this information to create new messages for downstream systems. I need to know the best way I can test this using the Ready API tool, we just got a pro license. Is it SOAP or REST I need to use. Ideally I want to simply copy my application messages in to the tool, call the webservice and get the response, which I can then check is the correct response for the test
To find your web-service is SOAP or REST.
Please check whether your web service has WSDL to verify it has SOAP web-service, you can get your web-service's WSDL by post-fixing WSDL with your web service url.
Eg: http://{yourservice-url/path1}?WSDL
If your service don't provide WSDL from the above URL, then your web-service is REST.

Sending attachment file via json

I am new in REST so just wondering is it possible to send PDF document(attachment) via json through rest API. I know SOAP protocol supports attachment but does REST also support attachment.If yes then how we can send it through Json?

Adding response Header in WSDL on runtime

We are using Siebel CRM for an inbound integration and using session management based soap requests and response. The problem is that when we generate WSDL from Siebel it does not include session management related header neither in request nor in response. We are using .net application to call Siebel inbound web service.
Now, our .net application is based on the classes generated after de-serialization of the Siebel generated WSDL and it is not including session response header. Session response header is being inserted by Siebel on run-time. Due to this our .net application could not get the session header.
What solution can be for the above problem from .net or Siebel side ?
I don't think Siebel generates this part in it's WSDL, the examples on Oracle and other blogs mention that the extra Headers need to be sent in the incoming SOAP to Siebel, but they are not present in the generated WSDL.
You will have to modify the WSDL after it is generated from Siebel, and then add the header section in it. Then your .NET side can parse out this section. Or you will have to handle the session side in the .NET app.config file

Expose Rest API as SOAP in WSO2 ESB

I have a Rest Api (Python/flask) that send response in json.
I need to POST a request with 3 parameters (body) using Soap, but I don't know about Soap and I don't understand the samples.
Can I just use a mediator to "translate" my Rest Api into a Soap Api ?
How can I test the Post request with SoapUi ? Do I need to use a wsdl file ?
I just need entry point documentation.
thanks.
You will need a WSDL to define your operation/web-service i.e SOAP Request incl 3 parameters. I use eclipse with the Web Tools plug in to create WSDLS. Then you'll need to get SOAP --> New Soap Project, and include the wsdl. LEt me know when you get there , and we can continue!
You will need to define your operations of the SOAP web service in a WSDL. Then you can create a new project in SOAPUI with this WSDL. Follow http://www.soapui.org/soap-and-wsdl/operations-and-requests.html on how to create a request for a particular operation.
In ESB you can create an API for your REST service (https://docs.wso2.com/display/ESB481/Creating+APIs). Now you need to use a payloadfactor mediator in your API in sequence to transform your SOAP(XML) request to JSON (https://docs.wso2.com/display/ESB481/PayloadFactory+Mediator). Then, this JSON request will be sent to the REST backend. If you again need to transfer the JSON response from the backend to SOAP, include another payload factory mediator to transform.

How to build soap to rest gateway

How would you build a soap to rest gateway with the least amount of work? I provide a REST API on my Rails 3.2 server. My customer requires me to provide a SOAP API. I don't want to use Rails for providing the SOAP API since that would probably take much more work than building a SOAP to REST gateway using a framework that fully supports SOAP.
I just noticed that Rails 3.2 parses SOAP requests automatically into the params hash (ActionDispatch::ParamsParser Rack middleware). So, I decided to implement the gateway in Rails. Since I don't really care to implement a full featured SOAP Server--all I want is to make it work for my customer's current SOAP client--I will just read the data that I need from the params hash and build the xml response using Builder and publish a static wsdl file if they need it. It will be less than 20 lines of code.
config/routes.rb
Gateway::Application.routes.draw do
match "/clientx/echo" => "clientx#echo"
end
app/controllers/clientx_controller.rb
class ClientxController < ApplicationController
def echo
# authenticate client
# parse params
# send and receive rest request
# render response
end
end
What about Mule ESB? Supports a various form of input and output possibilities. Implemented a SOAP-receiving application based on Mule myself.