Skip to content

Instantly share code, notes, and snippets.

<div style="font-size:150%">
My size is 1.5em
<div style="font-size:150%">My size is parrentSize + 150%</div>
</div>
<div style="font-size:1.5em">
My size is 1.5em
<div style="font-size:1.5em">My size is parrentSize * 1.5</div>
</div>
<!DOCTYPE HTML>
<html>
<head>
<!-- Meta tag to specify the encoding -->
<meta charset="utf-8">
</head>
<body>
$.soap({
url: 'http://my.server.com/soapservices/',
method: 'helloWorld',
data: {
name: 'Remy Blom',
msg: 'Hi!'
},
success: function (soapResponse) {
function xml() {
return {
toJSONObject: function(xml) {
return (xml ? toJSON(xml) : xml);
},
fromJSONObject: function(json) {
return this.fromString(toXML(json));
},
import soap from './soap'
const soap = soap();
const vRequestObj = soap.createRequest('urn:Webservices' + 'SERVICE_NAME', 'SERVICE_TYPE',
{
'pdf_hash' : soap.createField('string', '717fb24cc33821afb4bcd529696cdfce'),
'userid_hash' : soap.createField('string', '65a47daeabcb54e4ecc3923aecdab697')
});
/**
* [main module]
* @return {[object]}
* [with methods: createRequest, createField, getResponseNode, getErrorNode, getFieldValue]
*/
export default function soap() {
return {
/**
* [request with xml attributes]
<soapenv:Body>
<urn:ProductService.getProductByHash
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="getProductByHash ">.
<!-- response example -->
<product_id xsi:type="xsd:string">260891</emag_id>
</return>
</urn:ProductService.getProductByHash>
</soapenv:Body>
<?xml version="1.0" encoding="utf-8" ?>
<soapenv:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:WebservicesName"> <!-- service name -->
<soap:Header>
<m:Trans xmlns:m="http://schemas.xmlsoap.org/soap/encoding/">Header</m:Trans>
</soap:Header>
<soapenv:Body>
angular.module('myApp', [])
.run(function($rootScope) {
$rootScope.globalVar = `I'm the global variable`;
});