Providing a web service to your host applications enables rapid reuse of the business logic that exists on these hosts. Web services become reusable objects for creating portals, web applications, and other business solutions. Web services provide a standard method of transferring data and XML formatted component descriptions. And, because Web Services are technology independent, they can run on any platform.
The Web Service Description Language (WSDL) document describes the interface to the web service, the data types it uses, and the location of the service. Developers use this document to identify inputs, outputs, and methods needed to consume the web service. Web services generation utilities use the WSDL document to create Java proxy objects and sample code for the services.
Web Builder generates the <ProjectName>.wsdl document in the <VHI install folder>\projects\<ProjectName>\wsdl
folder. You can open this file in any editor.
To view a WSDL document in a browser, enter the service’s URL and append ?wsdl
.
For example, to access the WSDL document generated by Web Builder:
http://localhost:8081/axis/services/<ProjectName>?wsdl
http://localhost/<ProjectName>/<ProjectName>.asmx?wsdl
As provider of a web service, you publish the WSDL document to give developers access to your web service. With the WSDL-generation URL, developers can use utilities to generate specific files to locate and consume the web service.
Web Builder uses Apache Axis to create proxy objects, stub code, and data types. Axis is both a servlet that publishes web services and a set of .jar files that consume web services.
These files are relevant to the functionality of a Verastream web service client and contain information that you can use to create your own web service client.
In the <VHI install folder>\projects\<ProjectName>\client
folder, look for these files:
To deploy a Verastream Java web service into a production environment:
<production web server>\axis\WEB-INF\lib
folder. java -CLASSPATH <root>\VHI\tomcat\webapps\axis\WEB-INF\lib
java org.apache.axis.client.AdminClient deploy.wsdd
You can use these optional switches, inserted before the deploy.wsdd string:
-h<hostname> | Specifies the host name. Example: -hlocalhost |
-p<portnumber> | Specifies the port number. Example: -p8081 |
In Visual Studio .NET, add the Verastream web service to your .NET project as a web reference:
http://localhost/<ProjectName>/<ProjectName>.asmx?wsdl
These files are relevant to the functionality of a Verastream web service client and contain information that you can use to create your own web service client.
In the <VHI install folder>\projects\<ProjectName>
folder, look for these files:
In \Inetpub\wwwroot\<ProjectName>
look for these files:
To deploy a Verastream .NET web service into a production environment:
Inetpub\wwwroot
folder to the same location on the production server.
Using the standard Java and .NET connectors, a Java error is returned as an ApptrieveException and a .NET error is returned as a HostIntegratorException. However, a web service error is sent as a Soap Fault. The error message list must be extracted from the details element of the Soap Fault. Verastream Host Integrator puts both the message list and a stack trace in the Soap Fault details.
This is an example of the contents of the Soap Fault details:
<messageList>
<message>User-defined error detected: No account exists with the specified
account number.</message>
<message>Procedure GetAccount on table Accounts failed.</message>
<message>Caught VHI Exception in PerformTableProcedure(Accounts, GetAccount,
)</message>
</messageList>
<stackTrace> at WRQ.Verastream.HostIntegrator.Utils.HandleCOMException(AppConnRejuvenationSessions,
COMException ce)
at WRQ.Verastream.HostIntegrator.HostIntegratorSession.PerformTableProcedure(String
tableName, String procedureName, IDictionary inputValues, IDictionary filterValues,
Boolean filterIsCaseSensitive, IList outputColumnNames, Int32 maxRows)
at WRQ.Verastream.HostIntegrator.HostIntegratorSession.PerformTableProcedure(String
tableName, String procedureName, IDictionary filterValues, Boolean filterIsCaseSensitive,
IList outputColumnNames, Int32 maxRows)
at CICSAccts2.CICSAccts2Service.GetAccount(Int32 AcctNum)
</stackTrace>
In order to extract this information on the client side, using .NET, catch
a System.Web.Services.Protocols.SoapException and access the Details field.
If Apache Axis is used to consume the Java web service, catch an org.apache.axis.AxisFault
and call getFaultDetails() on it. The generated client for java contains an
example of how to use the AxisFault class.
© 1999-2007 Attachmate Corporation. All rights reserved. Terms of Use.