Testing HelloSign API embedded signature - hellosign-api

Hello I am using the HelloSign API, looking to test the embedded signing feature. How am I able to test the embedded document to sign on my test site? I am using the nodejs SDK along with AngularJS. Thank you in advance.

Here's the general walkthrough for embedded signing, which walks you through the server side and client side steps: https://app.hellosign.com/api/embeddedSigningWalkthrough
Here's an FAQ on testing locally: https://faq.hellosign.com/hc/en-us/articles/217048987-What-tools-can-I-use-to-test-the-API-and-callbacks-locally-
For greater detail, please write into apisupport#hellosign.com.

-First thing is create an account with Hellosign
Next thing is creating your API KEY from your registered account.
Create an API App with your registered hellosign account (This is important because during the setup it will ask for the URL where the Iframe will be created.)
Now to use it simply include this script (<script type="text/javascript" src="https://s3.amazonaws.com/cdn.hellosign.com/public/js/hellosign-embedded.LATEST.min.js"></script>).
And then finally do this in your client side component file
HelloSign.init("CLIENT_ID");
HelloSign.open({
url: "SIGN_URL",
allowCancel: true,
messageListener: function(eventData) {
// do something
}
});
And Voila..!! It will work.

Related

How to consume SOAP webservice in SAP UI5?

I have a SOAP webservice and details of the service provided are: webservice name: "xyz", username: "Ashish", class name: "Initializer" and method name: "Fetchvalue". I have to call the method "Fetchvalue" in which an object of class "Initializer" is used as a paramter. I am developing a web app using SAP UI5, i tried a lot to call this method but not able to get a proper solution for this. Will you please tell me how can i call this method with specific requiremenst resulting in desired output from the webservice.
It would be possible to call a SOAP method from a UI5 application, but there are no specific UI5 components to help you with that. This means that you'll just have to make do with the lower level function, either provided by jQuery or by calling XMLHttpRequest directly.
jQuery has a specific soap plugin for this purpose, that makes calling SOAP methods quite easy:
$.soap({
url: 'http://my.server.com/soapservices/',
method: 'helloWorld',
data: {
name: 'Ashish Jain',
msg: 'Hi!'
},
success: function (soapResponse) {
// do stuff with soapResponse
},
error: function (SOAPResponse) {
// show error
}
});
Please note that the eventual call is made using XMLHttpRequest, which requires CORS headers to be setup on the server hosting your SOAP service. Alternatively, you could setup a proxy on the server that is hosting your UI5 app, that links to the server hosting the SOAP service. If you go this path, you may also want to see if you could have this proxy layer to translate SOAP into JSON for you. That would allow you to easily use a JSONModel from your UI5 app, which makes things easier and cleaner at the UI side.
Since you mentioned that you'll have to call the SOAP service using a username and password, I think a word of caution is mandatory in this answer. UI5 apps run in the browser of your end-user. This means that your end-user can have a look at your Javascript code. Hence, having a username and password in your Javascript code is bad practice. You may want to see if you can push authentication to the SOAP end-point to the proxy if possible.

How do I authenticate and consume an external api with backbone?

I'm trying to create a very basic little backbone app that displays stats from my company's Harvest account. They have a REST API which authenticates via Basic Auth or oAuth. I seem to be faced with two problems here:
Authentication
Cross-origin requests
So I've started with setting the url for my collection to the respective url:
var Projects = Backbone.Collection.extend({
url: 'https://mycompany.harvestapp.com/projects',
});
And I've tried using this basic auth plugin but I can't tell if that part is working because I'm still getting Access-Control-Allow-Origin errors.
What's the best way to go about this?
This other StackOverflow question is similar and has more details that you should take a look at.
But the general idea is this, if you don't have access to the remote server (which I presume you do not with Harvest) then you need to perform the cross-site requests from your own server that you do control, most likely the one you are deploying this backbone app on. That means writing some server-side code (PHP, Node, etc.) to perform the requests (perfectly legal from server side) and then having your client (Backbone app) request from these scripts.
Here is a brief/pseudo-example with php:
request.php
<?php
echo file_get_contents('https://mycompany.harvestapp.com/projects');
?>
projects.js
var Projects = Backbone.Collection.extend({
url: 'request.php',
});

How to Add Basic Auth(Pre-emptive) to Web Service Client genrated with Web Platform Tools (WTP0 in Eclipse

I have a web service that I want to consume that requires a username and password. It does not prompt you for the u/p. In SOAPUI 4.5 it is very easy to go to the Auth tab for the web service , choose auth type: premeptive, add the username and password and run the service. I have generated a web service client for this service using Eclipse WTP but I cannot figure out what code to add and where in order to provide this same u/p that works in Soapui. I am fairly new so be specific please (does the code go in the servicebindingstub, serviceporttype, serviceporttypeproxy, and what method ? _init, etc., include imports pls. The wtp client works but returns a error code stating that the username and password are missing. If there is a way to externalize this in the descriptor that would be great also.
Solved this by adding Username and Password lines (last two below) to the Call for each method in the Stub file.
call.setUseSOAPAction(true);
_call.setSOAPActionURI("urn:webservicesapi#getAllVirtualServerConnStats");
_call.setEncodingStyle(null);
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
_call.setSOAPVersion(or`enter code here`g.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.setOperationName(new javax.xml.namespace.QName("", "getAllVirtualServerConnStats"));
_call.setProperty (Call.USERNAME_PROPERTY, "wstest"); //added this
_call.setProperty (Call.PASSWORD_PROPERTY, "WsTest"); // added this
setRequestHeaders(_call);

How to test #DELETE restful service call from JMeter

I am trying to find how to issue a call to the following restful service from JMeter:
#DELETE
#Path("/user")
void removeUser(String userId);
There are plenty examples on POST, GET, but I cannot find one for delete. Specifically, I cannot find a way to pass a parameter for "userId".
Thanks
You could use #RequestParam or #PathVariable to bind the userId . You don't find many tutorial on Delete since it is not supported in earlier versions of HTML . Read this blog for more info . This is usually achieved through a hidden parameter .
Read this post Are the PUT, DELETE, HEAD, etc methods available in most web browsers? for more info .
Have you tried to record that request using jMeter Proxy?
Simply:
Add > Logic Controller > Recording Controller to your Test Plan
Add > Non-test elements > Http Proxy Server to your WorkBench
As Target controller choose your Recording controller
Set your browser proxy settings to point to your jMeter machine (usually your localhost) on standard port 8080
Click Start button at the bottom of your Http Proxy Server component
Fire that delete request in your browser
Immediately after submitting the request, stop the Http Proxy Server (to avoid recording other junk, usually ajax/refresh requests from other opened tabs)
See what jMeter recorded
Use the recorded sampler(s) to build your real test
Details here.
Aha, OK, than maybe you can link (bypass a web app) jMeter with Spring by using jMeter's jUnit Sampler to fire your jUnit test cases directly.
More here: http://jmeter.apache.org/usermanual/junitsampler_tutorial.pdf
Also, take a look here how a guy tried to write a custom jMeter Sampler that was supposed to mimic Spring's HttpInvoker (HttpInvokerProxyFactoryBean).

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.