Web ServicesSponsored by Flatiron School

A Web service is a method of communication between two electronic devices over a network. It is a software function provided at a network address over the Web with the service always on as in the concept of utility computing. A web service has an interface described in Web Services Description Language (WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP (Simple Object Access Protocol) messages. There are two major classes of Web services: REST-compliant web services, and Arbitrary web services.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have a java web service that is supposed to start automatically when it is deployed.  For some unknown reason it does not.  I am seeking guidance on how to figure out why it is not starting automatically.  I am using jdk 1.8, jax ws 2.2.6, tomcat 8 on rhel 7.  Here is what I have in the web.xml file for the service servlet:

Open in new window

Is there something else I am supposed to do other than put the number 1 in the load on startup tag?  Everything that I have googled said that this is all I need to do.  My server admin guy is not much help and if there is something on the server side that needs to be done can anybody please tell me that.  If there is something else that I need to put in my code then please let me know.

I do not have this issue in the development or staging environments but I can say that the one difference in the production environment, which is where I am having this issue, is that the web service is served via a load balancer.  The request goes through one of two regular apache web server to tomcat.

What Kind of Coding Program is Right for You?
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

I'm trying to connect to a service outside our firewall but on our servers and I'm getting the following error:

Here is the code:

Not sure how I get around this? This is all new to me?

I have been asked to stand up a weighted search appliance for a company.  The decision was to use SOLR to create the search tool so they can use the associated REST API for searches and recommendations.

I'm am still beginning in SOLR and have to ask a basic architecture question.  I have a table with 220 elements, 130 Million record strong.  I grow 5 million a year.

Does this become a Hadoop solution?  or can this still be done with a single SOLR engine?  I need to know which direction to start with so I do this right

Thanks much.
I'm using EncryptedXML to decrypt a SOAP message.  I'm loading the certificate manually and trying to decrypt the message.  But I'm getting the following error:

Unable to retrieve the decryption key.

Open in new window

Here is my code:
stream.Position = 0;
var doc = new XmlDocument();
doc.PreserveWhitespace = true;

var clientCertEnc = new X509Certificate2(@"C:\certificates\xxxxxt.pfx", "xxxxxx");
var privateKeyRSAA = (RSACryptoServiceProvider)clientCertEnc.PrivateKey;

var exml = new EncryptedXml(doc);
exml.AddKeyNameMapping("KeyIdentifier", privateKeyRSAA);

Open in new window

Here is my xml:
            <o:Security s:mustUnderstand="1" 
                <o:BinarySecurityToken u:Id="uuid-10490fb0-8ee0-4a4c-a8db-77242c9a3b7f-2" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" 

Open in new window

I'm trying to figure out why I can't seem to decrypt an encrypted key from .NET with a X509 Certificate.  

.NET Code
encryptedKey = "jW3VDsUZWIdzfZ1bPN3iKI2Pf9u22kUax0DFnF3A9H+nvcBQuVC2efw1FYGm5/AvnN27kXqA4PyCqcQLp/tguVqHtzdR7mJtkTCyY8TUoAej2Mqzv2uiEKULB/8rlPDl2DOkSMGJqieenAG/7gZjWhlU0eYrlcMi5dtAnPFTfy+LvtJ6bbGEDgy4FhoT49T6sO0kjBJHp5YI0p/CeEuc+WMT/BMGG1YuDPswltj0VzeaE3KbHSLvJPjGCQ3U0YkUWm8h9zM22S/mRvfMhEu1aRdQpojGUiSLKUJyotNu8fRulKeB1TVuE7AlDGrbAUsRtU+y6PdLMcEHW+BRq5Uouw==";

var encryptedKeyByte = Convert.FromBase64String(encryptedKey);

var clientCert = new X509Certificate2(@"C:\certificates\xxxxx.pfx", "xxxx");
var rsa = (RSACryptoServiceProvider)clientCert.PrivateKey;
byte[] key = rsa.Decrypt(encryptedKeyByte, false);

Open in new window

The error I get when I try to run the last line of the code rsa.Decrypt(encryptedKeyByte, false)
The parameter is incorrect.

In SOAP UI the decryption works where I use the same certificate.  I just had to convert the file pfx to a jks file to get it working in SOAP UI.  But other than that the settings look the same to me.
Here is a screen shot of the SOAP UI settings.  I'm guessing the Signature Keystore in the SOAP UI seetings is not used for the decryption process.  The Decrypt Keystore settings in SOAP UI is the one I'm using in .NET.  Only in .NET its a pfx file.  
SOAP UI Settings
I also imported the certificate to my local box to see some of the details.  Here is what I see:
Certificate seen in MMCcertificate_properties_in_mmc_2.pngCertificate seen in MMC
Please let me know if you need me to provide any other information or need me to test something out.  Thanks in advance for your help.
I'm using C# to call a Java Webservice.  Fiddler gives me a status of 200. So my call to the service is good.  But something in the .NET does not like my MTOM message.  Any ideas?  Here are all the details.  

I'm getting this error:
MTOM messages must have type 'application/xop+xml'.

Open in new window

The stack trace says:
Server stack trace: 
   at System.ServiceModel.Channels.MtomMessageEncoder.MtomBufferedMessageData.TakeXmlReader()
   at System.ServiceModel.Channels.BufferedMessageData.GetMessageReader()
   at System.ServiceModel.Channels.BufferedMessage..ctor(IBufferedMessageData messageData, RecycledMessageState recycledMessageState, Boolean[] understoodHeaders, Boolean understoodHeadersModified)
   at System.ServiceModel.Channels.MtomMessageEncoder.ReadMessage(ArraySegment`1 buffer, BufferManager bufferManager, String contentType)
   at System.ServiceModel.Channels.HttpInput.DecodeBufferedMessage(ArraySegment`1 buffer, Stream inputStream)
   at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
   at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(HttpRequestMessage httpRequestMessage, Exception& requestException)
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)

Open in new window

I am requesting a web service through an xml, I verify the answer with the Fiddler tool and it returns an Http 200, but the answer as such does not return the information that the web service should send me but it returns the wsdl of the same. I do not know if you are making any mistakes in the programming, please help me.

private void SendXmlToWebService()
        {            XmlDocument xmlDoc = new XmlDocument();
            StringBuilder rawXml = new StringBuilder();
            PostXml("", rawXml.ToString());

        static string GetXmlString(XmlDocument xmlDoc)
            StringWriter sw = new StringWriter();
            XmlTextWriter xw = new XmlTextWriter(sw);
            return sw.ToString();

        public void PostXml(string url, string xml)
            byte[] bytes = Encoding.UTF8.GetBytes(xml);
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
            request.Method = "POST";
            request.ContentLength = bytes.Length;
            request.ContentType = "text/xml; charset=utf-8";
            request.Host = "";
            request.Accept = "gzip,deflate";

            using (Stream requestStream =
Is it possible, in Embarcadero delphi, to be connected to a WEB-Services SOAP (imported with WSDL-Import and with THTTPRIO component ) with a https connection and where the WebServices need a Certificate? How set the certificate?
I need an example.
I have already setup my extended oauth2 connection and I can do an impersonation of anyone in my org.

I can successfully, say, do a

 GET https://www.googleapis.com/calendar/v3/users/me/calendarList/someuser@ourdomain.net

and get a good response.

What I can't figure out is what calls to use in order to set “Share this calendar with everyone in the organization” and Set to “See only free/busy (hide details)”

Thank you in advance for any assistance!
I consume a web services client.
I have a certificate with password. I can retreive the certificate from my store and i can use it in InternetSetOption.
But I don't know how to send the password with the certicate.

Thanks for your hep.

Here is an example:

      LPWSTR pswzFirstCert = L"xxxxx";// Subject of the first certificate.
      LPWSTR pPassword = L"yyyyyy";// Spassword
      HCERTSTORE hSystemStore; // The system store handle
      PCCERT_CONTEXT pDesiredCert = NULL;

      if(hSystemStore == NULL)
            ShowMessage("Not Opened the MY system store.");

// Get a certificate that has the string "Full Test Cert" in its subject.

      pDesiredCert=CertFindCertificateInStore(hSystemStore, MY_ENCODING_TYPE, 0, CERT_FIND_SUBJECT_STR, pswzFirstCert, NULL);
      if(pDesiredCert == NULL)
            ShowMessage("The certificate was not found.");

            CertCloseStore(hSystemStore, CERT_CLOSE_STORE_CHECK_FLAG);

      if( InternetSetOption (Data, INTERNET_OPTION_CLIENT_CERT_CONTEXT, (LPVOID)pDesiredCert, sizeof (CERT_CONTEXT) ) == FALSE )
            ShowMessage("InternetSetOption failed with error.");

      if( InternetSetOption (Data, INTERNET_OPTION_PASSWORD, (LPVOID)pPassword, sizeof (pPassword) ) == FALSE )
            ShowMessage("InternetSetOption failed with error.");

NEW Internet Security Report Now Available!
NEW Internet Security Report Now Available!

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out this quarters report on the threats that shook the industry in Q4 2017.

Can I use the Telegram Bot API for listetning to message on a private invite-only channel?

Background information:
I was hired to do a gig for doing a Telegram bot that could parse messages and saved them into plain text. Now, I was told that the bot is required to listen to message in invite-only  channels. While doing some research, looks like this is a bit of an issue. I heard some suggest to use the Telegram Client API (instead of Bot), can someone confirm this is possible on the Bot API, or if I actually ave to switch towards Client?
Are there any user's out there familiar with CT FreitRater v 3.0 and interacting with the web service via JSON?
Hi All,

I created a proxy class from a  wsdl DealSplits.asmx  .  I  am getting  below error when I invoke any method.   The endpoint is https.

Error Message
There was no endpoint listening at https://****/DealSplits.asmx that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The InnerException is  The remote server returned an error: (403) Forbidden.

 Looks like security tag error in the binding. I tried to change security Mode="None" and it did not work.

        <binding name="ImportDealsplitsSoap" closeTimeout="00:01:00"
          openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
          maxBufferPoolSize="5120000" maxBufferSize="5120000" maxReceivedMessageSize="5120000">
          <security mode="Tranport">
            <transport clientCredentialType="None" proxyCredentialType="None"
              realm="" />
          <dataContractSerializer maxItemsInObjectGraph="5124000"/>
          <serviceMetadata httpGetEnabled="True" httpsGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="True"/>
 <endpoint address="https://**/DealSplits.asmx"

Open in new window

The scenario is that I have a PHP function which makes call through third party library to a third party url and it is noticed that it gets timeout due to heavy traffic.

I have put a Circuit is open check condition in my try block and in catch block I have added code to raise exception in circuit breaker library i.e. whenever I get Connection timeouts Exception from third party library I raise a PHP exception in circuit breaker command by passing a boolean flag.

The issue I am getting is that short circuits happens at requests early than the threshold.

With below configurations only for this command

'circuitBreaker' => array(
   'errorThresholdPercentage' => 50,
   'requestVolumeThreshold' => 10,
   'sleepWindowInMilliseconds' => 10000,
   'rollingStatisticalWindowInMilliseconds' => 20000,
Using InfoPath 2013 with SharePoint Office 360, I want to create an item in a SharePoint list just ahead of creating an item in the SharePoint list for the form being displayed.  I am trying to create a Web services submit connection in InfoPath to do this.  I am uncertain of the url to use in the connection. Here are a few details:

1.  Main data connection is for List 1 in site A.
2.  The form displayed is for data in List A.
3.  When the submit button is pressed, I want to create a new item in List B, then create the item in List A.
4,  When I attempt to set up a submit data connection, I am using https://<tenant>.sharepoint.com/<site>/_vti_bin/<service>.asmx?WSDL.  That works when <service> is lists or webs, but then I don't see add item or anything similar.  And even if it did, how would it know which list to add the item to?

I can't readily locate services for Web services, and am still puzzled by not using a list name.  Is this kind of item creation even possible in InfoPath 2013?  (converting to PowerApps but need something right away).

In declaration, set the following variables:
Dim service As ILoadComplements_n0 
Dim data As DataComplemntSingle64_n3
Dim response As Statusreturn_n3

Open in new window

Dim content As String

Within initialize I declare the following:
Set service= New ILoadComplements_n0()
Set data = New  DataComplemntSingle64_n3()

Open in new window

content = "asdu7282368jd5hd6zxPasdg"
Call data.Setvaluefromstring(content)
Set response = service.LoadsingleComplemet64(data)
Print response.status.Getvalueasstring()
Print response.reason.Getvalueasstring()

Open in new window

My problem is the service returns me:

Estatus -> False
Motivo ---> the payment plug-in XML that is being loaded is empty

That False is back to me is fine, the problem is that he tells me that the content chain that I sent him is empty and it is not like that. A solution or explanation of why my web service receives an empty string?

I feel that my problem is in this line but I do not know why:
Set response = service.LoadsingleComplemet64(data)

Open in new window


Currently, I am working on a .net web application(Customer Portal)  that has a html5, angular 2.0 and web api controller etc.
Since the database is very slow, downloading a year data to a PDF takes longer time(more than 2 min).
So planning to send it as a CSV files to the customer email address. No need to maintain a queue or database, since a maximum of  30 requests comes per day.

What is the best approach to do this?
I was thinking to write a separate window service.
But maintenance will be there.  We will be maintaining a seperate application.

Is there a way to add a service to the Customer portal web application and maintain as a single application?
I am currently developing a credit check app which uses web services and the response I get is in Json string format. I tried converting this to a Json object... however I was unsuccessful. I need to store this json result into an excel document. The json result is in the following format after desterilizing:

"Key": "CreditResult",
"Value": [
"Key": "ConsumerInfo",
"Value": {
"RecordSeq": "01",
"Part": "001",
"PartSeq": "01",
"ConsumerNo": "943599475",
"Surname": "TEST SURNAME",
"Forename1": "TEST NAME",
"Forename2": "",
"Forename3": "",
"Title": "MS",
"Gender": "F",
"NameInfoDate": "20170129",
"DateOfBirth": "20170101",
"IdentityNo1": "1234567891234",
"IdentityNo2": "",
"MaritalStatusCode": "",
"MaritalStatusDesc": "",
"Dependants": "00",
"SpouseName1": "",
"SpouseName2": "",
"TelephoneNumbers": "H(000)0000000 B(0000)0000",
"DeceasedDate": "00000000"
"Key": "LastAddress",
"Value": {
"ConsumerNo": "943599475",
"InformationDate": "20170911",
"Line1": "ABC",
"Line2": "",
"Suburb": "ABC",
"City": "ABC",
"PostalCode": "0000",
"ProvinceCode": "A",
"Province": "ABC",
"AddressPeriod": "00",
"OwnerTenant": "",
"AddressChanged": "Y"
"Key": "CreditScore",
"Value": {
"ConsumerNo": "943599475",
"PolicyFilters": [
"Indicators": [
"Type": "00",
"Score": "000"
"Type": "00",
"Score": "0"

I hope that someone is able to help. The web development team have changed the current website that we are using. We have an order download application that integrated into mageno.

The issue is that I try to change the endpoint address to the following and I receive an error:


Error message is attached(error1)

I have also tried to generate a proxy class using the same error message.

My issue is that I can browse to this URL ok.

I would appreciate any help. I have contacted the hosting company and they don't have any iea.

Best Regards,

Managing Security & Risk at the Speed of Business
Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

I have a piece of code that works fine in a windows executable but when I move the same code to a web services it fails with:
"The request was aborted: Could not create SSL/TLS secure channel."
see the below code where I wrote "FAILS"

               ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
                HttpWebRequest req1 = (HttpWebRequest)WebRequest.Create("https://thewebsite?wsdl");

                req1.ContentType = "text/xml; charset=\"utf-8\"";
                req1.Accept = "text/xml";
                req1.Method = "POST";

                System.Security.Cryptography.X509Certificates.X509Certificate2 x = new System.Security.Cryptography.X509Certificates.X509Certificate2("D:\\tlr\\TLR.crt", "");

                using (Stream stm = req1.GetRequestStream())
                    using (StreamWriter stmw = new StreamWriter(stm))

                IAsyncResult asyncResult = req1.BeginGetResponse(null, null);


                string soapResult = "";
                using (WebResponse webResponse = req1.EndGetResponse(asyncResult)) // FAILS!
                    using (StreamReader rd = new StreamReader(webResponse.GetResponseStream()))
Trying to create an SSRS report that uses ArcGIS web service to convert coordinates to feet. No matter what I do I only get the method envelope and not the return data which is an array of geometry (x,y).
Attached is the wsdl file.
The report and the dataset have the parameters mentioned in the dataset.
This is my datasource:
This is my dataset:
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
<Method Name="Project" Namespace="http://www.esri.com/schemas/ArcGIS/10.3/">
                <Parameter Name="inSR" Type="String"></Parameter>
      <Parameter Name="outSR" Type="String"></Parameter>
      <Parameter Name="geometries" Type="Array"></Parameter>
      <Parameter Name="transformation" Type="String"></Parameter>
      <Parameter Name="transformforward" Type="String"></Parameter>
<ElementPath IgnoreNamespaces="True">ProjectResponse{}/Result{}/diffgram{}/Table{}/geometries{x,y}</ElementPath>

I get the titlecell, breadcrumbs and apiref instead of getting the geometries x and y values.
Which platform do you recommend to integrate with internal, external APIs, web services but also support robust message queuing mechanism ? Is it better to split the two i.e. separate API integration platform and message queue platform?

Our current setup is:
-One single server (HP DL350G9) as dedicated hyperV host only for VDI (RD Virtualization Host) only
-Roles installed on physical box are: HyperV and Remote Desktop Connection Broker and RD Virtualization Host
-this hyperV host has 30 vm's with Windows10
-there is only one VDI collection
-inside virtual desktop collection setup \ Virtual Desktop Configuration \ Local storage is set for: Local and local virtual desktop creation location is set: D:\VDI

Q1: Is there a way to migrate current virtual desktop collection from physical host to vm ? without loosing existing 30 vm with windows 10?

Our goal is to move whole VDI setup as it is in to new cluster or other hyperv hosts.

Maciej Pepek
I want to create a web services (soap only) that allow php, aspx, and most common programming languages to consume my web services.
My native language is .net/c# with WCF. However, I am definitely okay to learn new stuffs if it is necessary.

All I need now is simple web services like "hello world" so I can get start it.
UseCase 1 :-  Http Method : Get , expected json is {"id":1, "effecitveDate" :"2017-08-13 08:10"} - working fine

UseCase 2 :- Http Method : Get, expecting a list of objects i.e. ["id":1, "effecitveDate" :"2017-08-13 08:10"} ,"id":2, "effecitveDate" :"2017-08-16 08:10"}

but I am getting  date like ["id":1, "effectiveDate": [
"id":2, "effectiveDate": [

How to solve this date issue.
Note : I am using java8 LocalDateTime.

Web ServicesSponsored by Flatiron School

A Web service is a method of communication between two electronic devices over a network. It is a software function provided at a network address over the Web with the service always on as in the concept of utility computing. A web service has an interface described in Web Services Description Language (WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP (Simple Object Access Protocol) messages. There are two major classes of Web services: REST-compliant web services, and Arbitrary web services.