Giter VIP home page Giter VIP logo

proxysoap's Introduction

proxysoap.php

proxysoap.php is a server-side proxy script to allow scripts to consume SOAP based web services in other domain.

Installation

Download proxysoap.php and put it in the web server that has the same domain with the script your want to allow cross domain SOAP web services call.

Usage

POST to proxysoap.php with the following parameters:

url: http://www.mydomain.com/proxysoap.php?proxy_url=http://www.myotherdomain:81/xyzwebservice/service1.asmx
// if http://www.mydomain.com/proxysoap.php is where you put the proxysoap.php
// if http://www.myotherdomain:81/xyzwebservice/service1.asmx is your web service endpoint

data: { soapMessage: "", soapAction: "" }

Example

<!DOCTYPE html>
<html>
<head>
<title>Soap Client</title>
<style>
</style>
</head>
<body>
<div>
  <button id="btnRequest">Request cross domain SOAP</button>	
</div>
<script id="widgetScript">
	// Todo 1: Modify the webServiceURL below to the full http url to the SOAP web service
    var webServiceURL = 'http://www.myotherdomain:81/xyzwebservice/service1.asmx';	
	// Todo 2: Modify the soapMessage below by cut and paste here the soap message from SOAP-UI
	var soapMessage='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"> <soapenv:Header/> <soapenv:Body> <tem:getXYZ> <tem:kontinjenId>9793</tem:kontinjenId> </tem:getXYZ> </soapenv:Body> </soapenv:Envelope>';
	var soapAction='http://tempuri.org/getXYZ';
	webekms.html5.widgetDiv.find("#btnRequest").click(function(e) {
		$.post("http://www.mydomain.com/proxysoap.php?proxy_url="+webServiceURL, {"dataString":soapMessage, "soapAction":soapAction}, function(xml){
			console.log(xml);
		});
    });
</script>
</body>
</html>

License

proxysoap.php is covered by the MIT License. See LICENSE for more information.

proxysoap's People

Contributors

anthonyzee avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.