Web Services

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 am struggling with connecting with our salesforce sandbox.

For example, in Postman, what would a valid request look like using oauth token?

Should there be a callback URL (does there need to be?)
0
I'm trying to connect SalesForce to a published webservice.  The way the appserver is configured, I need to generate a connect request, which returns a uuid, then generate the actual request to get / update information, then generate a logout request.

I've been able to create the Apex class from the WSDL, but I'm mystified on how to even generate the login request to get the UUID - the online examples I have seen don't seem to match this particular WSDL.

I've attached a simple example WSDL - any help or suggestions on how to write an Apex class to login, retrieve data, and logout would be GREATLY appreciated.

Thanks,

-Dan
xxsfptexp.wsdl
0
Dear Experts,

For Windows 2012 R2, what are the essentials for setting up a web server for production and UAT?

Is it just add IIS Web services role only?
0
I have a WCF Service which is hosted in IIS on my Windows 7 PC and  it has the following data contract defined:

 
  [DataContract]
    public class RtnFromServiceParms
    {
        [DataMember]
        public string passedUserId { get; set; }
        [DataMember]
        public string passedBadgeId { get; set; }
        [DataMember]
        public string passedUserName { get; set; }
        [DataMember]
        public string passedEnv { get; set; }
        [DataMember]
        public string passedSecLvl { get; set; }

        ..
 ..

        public RtnFromServiceParms()
        {
            passedUserId = " ";
            passedBadgeId = " ";
            passedUserName = " ";
            passedEnv = " ";
     passedSecLvl = " ";

        ..
 ..

        }
    }

Open in new window


//
// In the server application MyRtnFromServiceParms is a new instance of RtnFromServiceParms()
//
MyRtnFromServiceParms = new RtnFromServicParms();


From the client application the service is called as follows:

//
// Call to Service      
//
MyRtnFromServiceParms = client.NextTransactionSeq(MyPassToServiceParms);

However in my client WebForm1.aspx I am getting an error "Webform1.MyRtnFromServiceParms is inaccessible due to its protection level"  In WebForm1.aspx.cs references to MyRtnFromServiceParms are not showing any error.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TiosClient.WebForm1" 

Open in new window

0
I am new to using web services.  I've created the Web Reference to the following Web Service: https://www.odfl.com/wsRate_v6/RateService?wsdl
And I was giving the following sample code: (see attached Sample Home More Request.xml)
I don't know how to move forward now that I created the Web Reference. My project is in VB.NET
0
Please help me access the following API using Fiddler.

GET api/Orders/GetCustomerDetail?LastName={LastName}&CustomerCode={CustomerCode}&Email={Email}

url: http://192.168.1.0:5215/Help
0
Hi Experts,

I am facing the below issue while hitting the REST service request from soapui.
java-1.8
soapui-5.5.0

Exception:
exception in thread "main" java.lang.assertionerror: failed generating bytecode

used below link for sample:
https://www.soapui.org/rest-testing/getting-started.html


Suggest me how to resolve this issue.
0
pagination iteration...

I have a SOAP web service that has a pagination limit of 10000 and a dateinterval input.  how do I iterate through in c# to collect all rows rather than just 10000?
0
Hi Experts,

I am using soap webservices  to communicate to other application.
To connect soap webservice i have a Endpoint url.
i have to download the certificate from the EPUrl.

can some one suggest how to download the certificate from the browser.
0
How do you add a service reference for a secure web service in Visual studio 2019...

I can view WSDL in browser as the browser asks for the certificate but VS just says can not establish secure ssl/tls.

I have the very in the trusted root store and have given account access unless VS runs under a different account?
0
I have a wcf service. I'd like to fake this service for debugging.
Please assist.
Thanks,
0
testwsdl.wsdlHI, I am trying to create a handler class to modify the namespace of the  response that come from soap web service.
If I create a  handleMessage() method, where should I call this handleMessage and what I should pass in as a SOAPMessageContext if I only have a respose object?

public boolean handleMessage(SOAPMessageContext smc) {

    Boolean outboundProperty = (Boolean) smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);

    if (outboundProperty.booleanValue()) {
   
        try {
            SOAPMessage msg = smc.getMessage();
            SOAPPart sp = msg.getSOAPPart();

            sp.getEnvelope().removeNamespaceDeclaration("soap");

            sp.getEnvelope().setPrefix("SOAP-ENV");
            sp.getEnvelope().getBody().setPrefix("SOAP-ENV");
            sp.getEnvelope().getHeader().setPrefix("SOAP-ENV");

            smc.setMessage(msg);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return true;
}
0
Hello everyone. I am trying to build a soap/rest webservice using Yii2. I cannot figure out how to route to the specific controller depending on the url.
It should work as follow:

For REST:
url: http://mydomain/rest/service/v1/action/param1/param2/...
responseType: JSON

For SOAP:
wsdl: http://mydomain/soap/service/v1/?wsdl
url: http://mydomain/soap/service/v1/
responseType: XML

I have many services published using my own implementation but I would like to use yii2.

Do you have any idea?

Thanks in advance

I have seen that adding this to yii configuration will do the trick (at least for REST):

 'rules' => [
                [
                    'class' => 'yii\rest\UrlRule',
                    'controller' => ['rest'],
                    'pluralize' => false,
                    'extraPatterns' => [ ],
                ]
],

Open in new window

0
HI, I am new to wsdl2java tool. Does anyone know how to use wsdl2java.bat ?

Thanks
0
HI, I am new to soap web service. I had a wdsl, how can I generate the java classes in Ecplise?
Currently I right click the wsdl ->Web Services -> Generate Java bean skeleton,  but during the process,  when it try to start the weblogic server, I got a lot errors: like More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.

Can somebody help?

Thanks
0

STORY:


I need to create a SOAP Envelop with C#.NET to consume a Java-based web service

I can use SoapUI for testing and it works properly.

now I need to create a C#.NET console app to consume this web service.

I was able to compute the <ds:DigestValue> but I couldn't' compute the SignatureValue.

note the "ds" prefix which is required for the Java-based web service and I don't have control over it.

I have tried tens of solutions from the internet and none works.

QUESTION:


How to compute <ds:SignatureValue> base on the node <ds:SignedInfo>, it could be in C#, or any another library like OpenSSL


<ds:SignedInfo>
    <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
        <ec:InclusiveNamespaces PrefixList="#default"
            xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" />
        </ds:CanonicalizationMethod>
        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
        <ds:Reference URI="#id-2">
            <ds:Transforms>
                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                    <ec:InclusiveNamespaces PrefixList=""
                        xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" />
                    </ds:Transform>
                </ds:Transforms>
                <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
                

Open in new window

0
I am using an API www.api.wunderground.com for weather history in my website for the last few years. But unfortunately api.wunderground.com is not working for the last few months.
Is there anybody knows any alternative API service for getting weather details for past days.
0
I need a way of pulling car trade-in values from kbb.com or some other source into this Google spreadsheet https://docs.google.com/spreadsheets/d/19x5gqcy-9CCaoguq5aFOlY-W1P7H6HaqYxjp3PQLoAM/edit#gid=288072689.
0
Hi Experts,

I want to generate client stub using soap wsdl.
i am using Ant build.
can some help me how to generate clientstub for real time environments using Ant project.

Thanks,
0
I would like to deploy an old asmx web service to azure from visual studio 2017.  Need to deploy the database as well. I can create the database using sql and populate it using sql if that is easier.  Please advise best recommendation.  Thanks in advance.
0
Simply put, we are trying to allow Exchange Web Services to connect to Outlook mailbox calendars to our Intranet.  The account we are using is a domain admin, but we are still getting the following error in the log;

Exchange Web Service connection failure: The remote server returned an error: (401)Unauthorized

I don't have a lot of experience with this process, so any help would be appreciated.
0
Good morning,

I'm looking for best practices on hardening Exchange 2013 Security HTTP Response Headers.For Example:  Security HTTP Response Headers

X-Frame-Options
Strict-Transport-Security
X-Content-Type-Options
X-XSS-Protection


There is a lot information for IIS, but I would like to know  specifically for securing Exchange web services. From I read if is not implemented correctly it can cause mail connectivity issues.

Thank you!
0
I am facing Problem when converting xml file to soap message for making a call to web service attaching my code and request  

following is the error

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:wsdl="http://xmlns.qtel.com.qa/B2B/WSDL" 
xmlns:par="http://www.tibco.com/namespaces/bc/2002/04/partyinfo.xsd">
   
   <soapenv:Header>
      <wsdl:TxInfo>
         <wsdl:Created>2018-06-10T11:07:20.953+03:00</wsdl:Created>
         <wsdl:Source>POS101</wsdl:Source>
         <wsdl:Lang>EN</wsdl:Lang>
      </wsdl:TxInfo>
      <par:PartyInfo>
         <from>
            <name>RQ</name>
         </from>
         <to>
            <name>Qtel</name>
         </to>
         <operationID>Qtel.Gateway/1.0/CheckLineStatus</operationID>
         <operationType>syncRequestResponse</operationType>
         <transactionID>RQJAV270220190000000010</transactionID>
      </par:PartyInfo>
   </soapenv:Header>


   <soapenv:Body>
      <wsdl:CheckLineStatusRequest>
         <wsdl:Request>RQ</wsdl:Request>
      </wsdl:CheckLineStatusRequest>
   </soapenv:Body>
</soapenv:Envelope>
ContentDescription >> null
Soap Header        >> [soapenv:Header: null]
Soap Part          >> com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl@37f8bb67
SOAP Body          >> [soapenv:Body: null]

Open in new window

SoapEnv.java
sample_rq.xml
0
I install the service using the service.bat /catalina and it shows up in services.msc just fine, but whenever I go attempt to start it, even with domain admin or local admin rights, it errors out, and eventlogs are useless because there is next to zero information on the actual root cause of why it won't start...


service won't start
0
Need all steps to configure TOMCAT to run on HTTPS. I tried to use SELF signed cert and got errors.

I am trying to access a rest service from TOMCAT, the rest service is:

https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&outputsize=full&apikey=DEMO

I am accesing this service from my self signed tomcat https running on port 8443 and did not have any luck

Here is the error message:


Type Exception Report

Message I/O error on GET request for "https://www.alphavantage.co/query": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://www.alphavantage.co/query": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX…
0

Web Services

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.