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 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
Fundamentals of JavaScript
LVL 13
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

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
Ensure you’re charging the right price for your IT
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

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
Angular Fundamentals
LVL 13
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

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
I am stuck with the following problem:

What I am trying to achieve:
1. Create a application that generates webservices on the fly
2. Deploy these as individual services in JBoss Fuse.
    Package these as OSGi bundle to deploy in JBoss Fuse server, using Apache CXF framework (This uses Apache Felix)
3. Call these Web Services
    a. Individually
    b. Aggregate / Combine output from multiple web services, create a new web service and deploy this in JBoss Fuse


The issue I'm, facing:
I get the following errors and warnings during deployment of 3 b, i.e. the new web service:
    Errors
     org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2012)[54:org.apache.felix.scr:1.8.2]
     org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:943)[org.apache.felix.framework-4.4.1.jar:]

     Warnings
     org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4445)[org.apache.felix.framework-4.4.1.jar:].
     org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)[org.apache.felix.framework-4.4.1.jar:]


I have posted this on stackoverflow, jboss developer forums and raised issues in redhat but no responses on this query.

Please find summary of files attached

1. Blueprint :- The blueprint container is a dependency injection framework that simplifies interaction with the OSGi container. In particular, the blueprint container …
0
i want to send a video to my friends and know how many minutes did every one of them watch of the video without the need to ask them !!!!!!
even if they don't have accounts for the used video streaming service like mark them using their public ip(s)
note: i'd make my video available for the ones that have the link only !!
0
I get the WCF error "{"The remote server returned an error: (403) Forbidden."} The HTTP request was forbidden with client authentication scheme 'Anonymous'." when using basicHttpBinding with Transport security and certificate credential. My service is in amazon ec2 instance and my client app remotely connect to it over the internet. I am able to connect to the wcf service if I my Transport credential is set to "None" in both the web.config of the service and app.config of the client. My service certificate is like "www.example.com" is installed on amazon ec2 "local machine store" and "Personal Folder". My client app certificate is just a self-signed certificate which I installed to its "local machine and Personal Folder" and also to the "Trusted People store" in the amazon ec2 instance where my wcf service is. I have also setup "https" to my IIS site bindings and I can reach the site through like "https://www.example.com"

Below is the web.config, app.config, and the code I have on the client app.

Service Web.config:

    <?xml version="1.0"?>
    <configuration>
   
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
        <customErrors mode="Off"/>
      </system.web>
      <system.serviceModel>
       
       <bindings>
          <basicHttpBinding>
            <binding name="basicHttpBinding_Config" >
              <security mode="Transport">
                <transport clientCredentialType="Certificate"/>
              …
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.