Web Services Servizio Telematico Doganale



Similar documents
T320 E-business technologies: foundations and practice

Joke Server example. with Java and Axis. Web services with Axis SOAP, WSDL, UDDI. Joke Metaservice Joke Server Joke Client.

API Guide. SilkCentral Test Manager

Bindings for the Service Provisioning Markup Language (SPML) Version 1.0

Distributed Embedded Systems

Author: Gennaro Frazzingaro Universidad Rey Juan Carlos campus de Mostòles (Madrid) GIA Grupo de Inteligencia Artificial

SDK Code Examples Version 2.4.2

Installation Guide of the Change Management API Reference Implementation

IBM SPSS Collaboration and Deployment Services Version 6 Release 0. Single Sign-On Services Developer's Guide

T320 E-business technologies: foundations and practice

FUSE ESB. Getting Started with FUSE ESB. Version 4.1 April 2009

JBoss SOAP Web Services User Guide. Version: M5

SilkCentral Test Manager 2009 SP1. API Help

WA2087 Programming Java SOAP and REST Web Services - WebSphere 8.0 / RAD 8.0. Student Labs. Web Age Solutions Inc.

SourceAnywhere Service Configurator can be launched from Start -> All Programs -> Dynamsoft SourceAnywhere Server.

NetBeans IDE Field Guide

Orchestrating Document and Media Management using CMIS

Consuming and Producing Web Services with WST and JST. Christopher M. Judd. President/Consultant Judd Solutions, LLC

Intelligent Event Processer (IEP) Tutorial Detection of Insider Stock Trading

Cúram Web Services Guide

T320 E-business technologies: foundations and practice

Building and Using Web Services With JDeveloper 11g

Configuring IBM HTTP Server as a Reverse Proxy Server for SAS 9.3 Web Applications Deployed on IBM WebSphere Application Server

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

Enhanced Connector Applications SupportPac VP01 for IBM WebSphere Business Events 3.0.0

Products that are referred to in this document may be trademarks and/or registered trademarks of the respective owners.

[1]Oracle Communications Billing and Revenue Management Web Services Manager Release 7.5 E

IBM Rational Web Developer for WebSphere Software Version 6.0

WebSphere Business Monitor V7.0: Clustering Single cluster deployment environment pattern

Developing Web Services with Eclipse

Deploying Microsoft Operations Manager with the BIG-IP system and icontrol

Web Services Development for IBM WebSphere Application Server V7.0. Version: Demo. Page <<1/10>>

Part One Business Modeling Business Process Model

Scheduling in SAS 9.4 Second Edition

A Java proxy for MS SQL Server Reporting Services

Mobile Labs Plugin for IBM Urban Code Deploy

Oracle Universal Content Management

Test Automation Integration with Test Management QAComplete

1. Open Source J2EE Enterprise Service Bus Investigation

Web Service Development Using CXF. - Praveen Kumar Jayaram

Onset Computer Corporation

Developing Web Services Applications

Customer Tips. Configuring Color Access on the WorkCentre 7328/7335/7345 using Windows Active Directory. for the user. Overview

Instant Chime for IBM Sametime For IBM Websphere and IBM DB2 Installation Guide

Getting started with OWASP WebGoat 4.0 and SOAPUI.

1. Tutorial Overview

IBM WebSphere ILOG Rules for.net

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL

Using RADIUS Agent for Transparent User Identification

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

2sms SMS API Overview

Using and Contributing Virtual Machines to VM Depot

BMC Impact Integration Developer s Kit Web Services Server Developer Guide

Scheduling in SAS 9.3

IBM Campaign Version-independent Integration with IBM Engage Version 1 Release 3 April 8, Integration Guide IBM

JVA-561. Developing SOAP Web Services in Java

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Configuring and Integrating JMX

Chapter 1: Web Services Testing and soapui

OpenLDAP Oracle Enterprise Gateway Integration Guide

WEB SERVICES. Revised 9/29/2015

Oracle Service Bus Examples and Tutorials

Using EMC Documentum with Adobe LiveCycle ES

Web Services. Distributed Object Systems 11. Web Services, SOAP and NET. Web Applications. Web Services. Web services vs Distributed Objects

ADFS Integration Guidelines

Tutorial 5: Developing Java applications

Enterprise Service Bus

TIBCO Spotfire Statistics Services Installation and Administration Guide

17 March 2013 NIEM Web Services API Version 1.0 URI:

To install Multifront you need to have familiarity with Internet Information Services (IIS), Microsoft.NET Framework and SQL Server 2008.

F-Secure Messaging Security Gateway. Deployment Guide

McAfee Cloud Identity Manager

Secure the Web: OpenSSO

PHP Language Binding Guide For The Connection Cloud Web Services

Assessing the usefulness of the WS-I tools for interoperability testing

Tutorial: setting up a web application

Using LDAP Authentication in a PowerCenter Domain

EMC Documentum Content Services for SAP iviews for Related Content

Authentication and Single Sign On

IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, Integration Guide IBM

Xerox DocuShare Security Features. Security White Paper

KonyOne Server Prerequisites _ MS SQL Server

EMC Documentum Composer

ICE Trade Vault. Public User & Technology Guide June 6, 2014

Web Dashboard User Guide

SOA Software API Gateway Appliance 7.1.x Administration Guide

Redpaper Axel Buecker Kenny Chow Jenny Wong

FTP, IIS, and Firewall Reference and Troubleshooting

Cisco TelePresence Authenticating Cisco VCS Accounts Using LDAP

Web-Programmierung (WPR)

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

KMx Enterprise: Integration Overview for Member Account Synchronization and Single Signon

Microsoft Active Directory Oracle Enterprise Gateway Integration Guide

Transcription:

Web Services Servizio Telematico Doganale USER MANUAL Pagina 1 di 20

Contents 1 Introduction... 3 2 Functional testing of web services... 6 3 Creating the client... 10 3.1 Open Source solutions... 10 3.2 Proprietary Solution... 10 4 Basic Features... 13 4.1 LS... 13 4.2 DIR... 13 4.3 PUT... 14 4.4 GET... 14 4.5 GETLOG... 14 5 Security... 15 6 WSDL Servizio Telematico Doganale... 16 Pagina 2 di 20

1 Introduction A Web Service is by definition a service described by the provider in a standard and independent manner from the programming language it was developed in. To utilize Web Services created by the provider (Servizio Telematico Doganale - STD) it is necessary to create a Web Services client. This is possible through the WSDL (Web Services Description Language) that defines the service interface, which is the list of operations provided, the various parameters that each operation is expected to receive from those who call and the list of parameters the operation provides as an output. A Web Service is recalled parametrically by the user of the service (requester) through application programs based on a remote call protocol, independent from the network and programming language, known as SOAP (Simple Object Access Protocol). A WSDL is an XML document that contains a set of definitions to describe the service (Web Service). The most important elements used by WSDL are the following:? <types> defines data types used in the service;? <message> contains the definitions of the exchange messages of the service using parts defined as types in the types section;? <porttype> describes the service, the operations that can be performed and the messages that are involved in these operations. For each method the input message and output message are defined. The element portype can be compared to a library of functions in a traditional programming language;? <bindings> contains the link between the porttype (the abstract definition of the service) and the physical end-point. This information indicates which protocol to use and how to relate the input and output messages to the used protocol;? <port> defines the access port of the service. A service can have multiple ports, each one with a name and a protocol binding;? <service> contains the definition of the service in terms of its description and physical location (typically its URL) - defined endpoints. Pagina 3 di 20

The WSDL file that describes the services (Web Services) offered by the Servizio Telematico Doganale is available to clients, by connecting from a web browser at the URL: test environment: https://ws-telematicoprova.agenziadogane.it/telematicoftpejbhttprouter/telematicoftpwsbindingimplservice/ META-INF/wsdl/TelematicoFtp.wsdl production environment: https://ws-telematico.agenziadogane.it/telematicoftpejbhttprouter/telematicoftpwsbindingimplservice/ META-INF/wsdl/TelematicoFtp.wsdl and is listed in this document in Chapter 6 - WSDL Servizio Telematico Doganale. In order to access the page that displays the WSDL file you must enter your user name and password. After typing in the URL of the WSDLthe following login page will appear: The user name or nome utente is the tax code of the subject registered to Servizio Telmatico Doganale, followed by the symbol "-" and the progressive location (for example 0000121122-001). The password is "password di accesso all applicazione", relative to the previously indicated codice fiscale, as indicated in the print screen provided by the "Primo accesso".. Pagina 4 di 20

Once logged in with user name and password, the system provides the WSDL of the application; Pagina 5 di 20

2 Functional testing of web services It is recommended to test the described Web Services before creating real clients. For this purpose, the user can use, for example, the tools SoapUI, an open source Java tool, licensed under the GNU LGPL (Lesser General Public License), extremely useful and usable on any platform (Windows / Unix / Linux). SoapUI is intended for developers and testers of web services as it allows to inspect the web services, recall them, implement them and do load tests. The functional and load testing can be done either interactively, using a user interface, or through an automated process using a command line tool. Regarding the functionalities of invocation and analysis of theweb Services, SoapUI allows:? importing the WSDL;? automatic generation of requests;? Support for various types of authentication (Digest, WS-Security, NTLM, etc.).? Support for SOAP 1.1 and 1.2;? editor with coloring syntax and function of undo / redo and automatic formatting. Development and validation of the Web services is allowed by:? code generation both client and server type with support for popular toolkits: JBossWS, JWSDP, Axis 1 and 2, XFire,. NET and gsoap;? Generation of WSDL from Java code;? Generation of XML binding classes for JAXB and XMLBeans;? validation of the definition of Web Services. It is also possible to use powerful functions, both for functional testing and load tests of web services. In this case it is possible to have detailed reports, various statistics, logs and performance analysis. The interface is intuitive and easy to use as shown in the figure below. Pagina 6 di 20

To test a web service it is sufficient to create a new project with the name and the WSDL file descriptor of the service. Calls to the different services will be automatically created and for each call you will see a tab at the bottom where you can specify a set of properties to be added to the request. Pagina 7 di 20

For the web services of the Servizio Telematico Doganale such properties let you specify the username and password to access the service. In the middle window you can see the SOAP request. In the combo on top it is necessary to specify the service endpoint for each request: https://ws-telematicoprova.agenziadogane.it/telematicoftpejbhttprouter/telematicoftpwsbindingimplservice Pagina 8 di 20

selecting the green arrow at the top right we can see the response from the SOAP server. Below are the various call logs. Pagina 9 di 20

3 Creating the client There are several frameworks, and Axis is an example, that starting from a WSDL file create both the client and server Java code. These frameworks can be integrated into development environments, allowing to use many features provided within graphical interfaces that help the developer. There are several products dedicated to web services to integrate into an IDE (Integrated Development Environment), both open source and commercial. 3.1 Open Source solutions The most popular IDE in open source are:? Eclipse? Netbeans They make the top-down approach much easier because it is easy to create the web service client using a graphical interface, starting from the WSDL file. We have to remember that a Web service client may itself be a web application development environment and then in that case would need an application server support. Eclipse is an integrated cross-platform and multi-language development environment. It is developed by a community structured in an open source style. One of the most useful components for the development of Web applicationsis certainly the one belonging to the project Web Tools Platform (WTP). WTP is a platform that extends the base functionality of Eclipse and includes various tools that can substantially facilitate the work of the developer of web services; among the features that stand out are a specific editor, tools for testing and API to support the programmer during the coding. The application server that is usually used with Eclipse is Tomcat. NetBeans is a multi-language development environment written entirely in Java. It was chosen by Sun Microsystems as the official IDE. It has many interesting plug-ins and wizards for developing Web Services easily. Glassfish is the application server normally used, undoubtedly an excellent solution. 3.2 Proprietary Solution In addition to open source solutions described above, there are several proprietary solutions for the creation of a Web service client including, for example:? RAD (Rational Application Developer) IBM.? Microsoft Visual Studio Pagina 10 di 20

In RAD the creation of Java classes, useful to the generation of the client, is easy and intuitive. Just enter the WSDL file in the project, then right click select "Web Services" and then "Generate Client", the following window will appear: Here the developer can select various configuration options including, for example, the runtime of the service (JAX-WS in our example). Visual Studio is an integrated development environment by Microsoft, which currently supports different types of language. Visual Studio allows to create client web services through the integration of. NET framework. Given the WSDL of the Web service, we can create a class as a proxy for a page in ASP.NET, which is a component that allows us to transparently access the Web Service, without worrying about the manner in which this is called and used. The proxy class will then provide the service exactly as if it were a component made by us and used in the project. The command-line utility wsdl.exe SDK. NET allows us to generate a proxy class: wsdl / language: CS http://localhost/webservice/wsftp.asmx?wsdl The language parameter allows us to specify one of the languages supported by. NET framework (in this example is required to wsdl.exe to generate a C # class). The result of this transaction is the generation of a wsftp.cs file containing the proxy class code for the service. At this point we just have to fill in the above file, again using the SDK: csc / t: library / out: wsftp.dll wsftp.cs / r: system.dll / r: System.Xml.dll / r: system.web.services.dll We have compiled the class as a class library (/ t: library) indicating the result of compiling and using wsftp.dll metadata specified in the parameters / r. Pagina 11 di 20

At this point the file wsftp.dll must be entered in the / BIN directory of the application that uses it. Pagina 12 di 20

4 Basic Features 4.1 LS This feature allows you to extract and deliver the list of response and outcome files for the authorized user of the service by searching on the basis of a specific pattern and within a given time interval. Input: represents the pattern according to which the request is filtered Output: the string that contains the outcome of the operation and the query result Here is an example of the output, appropriately revised in the client for the input pattern: 00001209.* 00001209.B99 00001209.UYY.p7m 00001209.UXX.p7m 00001209.UCC.p7m 00001209.UBB.p7m 00001209.UAA.p7m 00001209.UB2.p7m 00001209.UB1.p7m 00001209.P99 4.2 DIR The function provides a list of response and outcome files along with the date of the deployment of the Servizio Telematico Doganale. The function searches in a specified time interval. Input: Pattern to filter the request Output: A string containing the result of Here is an example of an output, appropriately revised by a possible client application with the input pattern: 00001209.* 14076171,00001209.B99,RISPOSTA,Dec 28 19:18,112 14076157,00001209.UYY.p7m,RISPOSTA,Dec 09 17:05,1890 14076156,00001209.UXX.p7m,RISPOSTA,Dec 09 16:42,1890 14076155,00001209.UCC.p7m,RISPOSTA,Dec 09 16:13,1890 14076154,00001209.UBB.p7m,RISPOSTA,Dec 09 16:12,1890 14076153,00001209.UAA.p7m,RISPOSTA,Dec 09 13:32,1890 14076152,00001209.UB2.p7m,RISPOSTA,Dec 09 13:19,1890 14076171,00001209.P99,ESITO,Dec 09 19:22,330 The figures reported are in the order: code files, file name received, receipt type, date, size received. Pagina 13 di 20

4.3 PUT The function realizes the transmission of a file to the Servizio Telematico Doganale..? Input: a string containing the file name and an array of bytes for the file itself? Output: A string containing the result of the operation. If successful, the output returns the file name, date of transmission and the code of the file. In case of a negative output, a report with the error code is produced. It should be noted that since the function takes as an input the representation shown in bytes of the file you want to transmit to the Servizio Telematico Doganale., the initial reading of the file and the following transformation into arrays of bytes are to be entrusted to the client application.? Here's an example of a successful outcome: Upload del file: Output : C:\Programmi\FirmaVerifica2.1\firmati\00001122.I08.p7m Caricato con successo. Here's an example of the output to fail, because the user logged on user code has enabled 0000 and sent a file whose name has the first 4 characters other than this code: Upload file: C:\Programmi\FirmaVerifica2.1\firmati\057R1209.I0B.p7m Output : Nome file fuori formato: deve iniziare con le prime 4 lettere del codice utente. 4.4 GET This function allows the download of a response or outcome file as requested by the user.? Input: A string containing the name of the file to download.? Output: The required file in byte array format. 4.5 GETLOG This feature allows to download the error log file operations in a given time interval. Example of the contents of the log file: [06/12/2010 12:26:20] 000010.13.CD2.p7m : Nome file fuori formato: la lunghezza è errata [06/12/2010 09:48:13] 00000126.HAA : Il file non appartiene ad una tipologia abilitata [06/12/2010 13:49:27] 057R1209.I0B.p7m : Nome file fuori formato: deve iniziare con le prime 4 lettere del codice utente [07/12/2010 15:33:26] 00001122.I05 : Verificare che il file sia stato firmato [07/12/2010 15:35:52] 0103.Ra11 : Nome file fuori formato: la lunghezza è errata Pagina 14 di 20

5 Security Access to Web Services is regulated by BASIC type authentication for the passage of credentials to be verified by the currently existing LDAP system. During the construction of the client application it will therefore be necessary to define, according to the jaxws standards, the access policiesfor the Web service. The user must specify that username and password when calling the different services. Below is an example of a call made from the transaction DIR java: TelematicoFtpWsBindingImplProxy service = new TelematicoFtpWsBindingImplProxy(); BindingProvider bp = (BindingProvider) service._getdescriptor().getproxy(); bp.getrequestcontext().put(bindingprovider.username_property, "USERNAME"); bp.getrequestcontext().put(bindingprovider.password_property, "PASSWORD"); String result = service.dir(pattern); Pagina 15 di 20

6 WSDL Servizio Telematico Doganale <?xmlversion="1.0" encoding="utf-8"?> -<wsdl:definitions targetnamespace="http://webservices.ftp.telematico.dogana.dogane.ag_dogane.finanze.it" xmlns:impl="http://webservices.ftp.telematico.dogana.dogane.ag_dogane.finanze.it" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:intf="http://webservices.ftp.telematico.dogana.dogane.ag_dogane.finanze.it" xmlns:xsd="http://www.w3.org/2001/xm LSchema" xmlns:wsi="http://wsi.org/profiles/basic/1.1/xsd" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"> -<wsdl:types> -<schema targetnamespace="http://webservices.ftp.telematico.dogana.dogane.ag_dogane.finanze.it" xmlns="http://www.w3.org/2001/xm LSchema"> -<element name="lsresponse"> <element name="lsreturn" nilable="true" type="xsd:string" /> -<element name="dir"> <element name="pattern" nilable="true" type="xsd:string" /> -<element name="dirresponse"> <element name="dirreturn" nilable="true" type="xsd:string" /> -<element name="getlog"> <sequence /> -<element name="getlogresponse"> <element name="getlogreturn" type="xsd:base64binary" /> Pagina 16 di 20

-<element name="get"> <element name="filename" nilable="true" type="xsd:string" /> -<element name="getresponse"> <element name="getreturn" type="xsd:base64binary" /> -<element name="put"> <element name="filem sg_content" type="xsd:base64binary" /> <element name="filem sg_n ome" nilable="true" type="xsd:string" /> -<element name="putresponse"> <element name="putreturn" nilable="true" type="xsd:string" /> -<element name="mget"> <element name="mgetinput_n ome" nilable="true" type="xsd:string" /> <element name="mgetinput_prog" nilable="true" type="xsd:string" /> -<element name="mgetresponse"> <element name="mgetreturn" type="xsd:base64binary" /> -<element name="ls"> Pagina 17 di 20

<element name="pattern" nilable="true" type="xsd:string" /> </schema> </wsdl:types> -<wsdl:message name="putrequest"> <wsdl:part name="parameters" element="impl:put" /> -<wsdl:message name="putresponse"> <wsdl:part name="parameters" element="impl:putresponse" /> -<wsdl:message name="getlogrequest"> <wsdl:part name="parameters" element="impl:getlog" /> -<wsdl:message name="dirrequest"> <wsdl:part name="parameters" element="impl:dir" /> -<wsdl:message name="mgetrequest"> <wsdl:part name="parameters" element="impl:mget" /> -<wsdl:message name="getresponse"> <wsdl:part name="parameters" element="impl:getresponse" /> -<wsdl:message name="lsrequest"> <wsdl:part name="parameters" element="impl:ls" /> -<wsdl:message name="lsresponse"> <wsdl:part name="parameters" element="impl:lsresponse" /> -<wsdl:message name="getrequest"> <wsdl:part name="parameters" element="impl:get" /> -<wsdl:message name="mgetresponse"> <wsdl:part name="parameters" element="impl:mgetresponse" /> -<wsdl:message name="dirresponse"> <wsdl:part name="parameters" element="impl:dirresponse" /> -<wsdl:message name="getlogresponse"> <wsdl:part name="parameters" element="impl:getlogresponse" /> -<wsdl:porttype name="telematicoftpw sbindingimpl"> -<wsdl:operation name="ls"> <wsdl:input name="lsrequest" message="impl:lsrequest" /> <wsdl:output name="lsresponse" message="impl:lsresponse" /> -<wsdl:operation name="dir"> Pagina 18 di 20

<wsdl:input name="dirrequest" message="impl:dirrequest" /> <wsdl:output name="dirresponse" message="impl:dirresponse" /> -<wsdl:operation name="getlog"> <wsdl:input name="getlogrequest" message="impl:getlogrequest" /> <wsdl:output name="getlogresponse" message="impl:getlogresponse" /> -<wsdl:operation name="get"> <wsdl:input name="getrequest" message="impl:getrequest" /> <wsdl:output name="getresponse" message="impl:getresponse" /> -<wsdl:operation name="put"> <wsdl:input name="putrequest" message="impl:putrequest" /> <wsdl:output name="putresponse" message="impl:putresponse" /> -<wsdl:operation name="mget"> <wsdl:input name="mgetrequest" message="impl:mgetrequest" /> <wsdl:output name="mgetresponse" message="impl:mgetresponse" /> </wsdl:porttype> -<wsdl:binding name="telematicoftpw sbindingimplsoapbinding" type="impl:telematicoftpw sbindingimpl"> <wsaw:usingaddressing wsdl:required="false" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" /> <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> -<wsdl:operation name="ls"> <wsdlsoap:operation soapaction="ls" /> -<wsdl:input name="lsrequest"> </wsdl:input> -<wsdl:output name="lsresponse"> </wsdl:output> -<wsdl:operation name="dir"> <wsdlsoap:operation soapaction="dir" /> -<wsdl:input name="dirrequest"> </wsdl:input> -<wsdl:output name="dirresponse"> </wsdl:output> -<wsdl:operation name="getlog"> <wsdlsoap:operation soapaction="getlog" /> -<wsdl:input name="getlogrequest"> </wsdl:input> Pagina 19 di 20

-<wsdl:output name="getlogresponse"> </wsdl:output> -<wsdl:operation name="get"> <wsdlsoap:operation soapaction="get" /> -<wsdl:input name="getrequest"> </wsdl:input> -<wsdl:output name="getresponse"> </wsdl:output> -<wsdl:operation name="put"> <wsdlsoap:operation soapaction="put" /> -<wsdl:input name="putrequest"> </wsdl:input> -<wsdl:output name="putresponse"> </wsdl:output> -<wsdl:operation name="mget"> <wsdlsoap:operation soapaction="mget" /> -<wsdl:input name="mgetrequest"> </wsdl:input> -<wsdl:output name="mgetresponse"> </wsdl:output> </wsdl:binding> -<wsdl:service name="telematicoftpw sbindingimplservice"> <wsdl:port name="telematicoftpw sbindingimpl" binding="impl:telematicoftpw sbindingimplsoapbinding" /> </wsdl:service> </wsdl:definitions> Pagina 20 di 20