banner



How To Use Proxy Object To Access Web Services

Generating Spider web service proxy objects

Creating a Web service proxy object

To create a new Web service proxy, select the Web Service Proxy Wizard icon from the Projects folio in the New dialog box. The Web Service Proxy Magician helps you create the proxy and so you tin can use the Web service in PowerScript. If you select the EasySoap Web service engine, one proxy is created for each port.

In the wizard you lot specify:

  • Which Spider web service engine you want to use

  • Which WSDL file you desire to admission

  • Which service inside the WSDL file you want to select

  • Which port or ports you want to utilise (EasySoap engine only)

  • What prefix you want to append to a port name (EasySoap) and include in the proxy name (EasySoap and .Net engines)

  • Which PowerBuilder library you want to deploy the proxy to

You can also select the Web Service Proxy icon from the Projects folio in the New dialog box. The Spider web Service Proxy icon opens the Project painter for Spider web services so that you can create a projection, specify options, and build the proxy library. The new projection lists the Web service (and, for the EasySoap engine, the ports for which proxies volition be generated) and specifies the name of the output library that will contain the generated proxy objects.

Whether you create the Web service project through the sorcerer or in the painter, the final step is to build the proxy objects by clicking the Build icon on the painter bar or selecting Design>Deploy projection from the menu bar.

Note Circular references Generation of a Web service proxy from a WSDL file that contains a circular reference is not supported in PowerBuilder. An example of such a "circular reference" is a structure that includes itself as a kid course member.

Using the UDDI browser in the wizard

PowerBuilder provides live access to Universal Clarification, Discovery, and Integration (UDDI) registries for both PowerScript and JSP targets. The UDDI service is an industry-wide effort to bring a common standard for business-to-business concern integration. Information technology defines a fix of standard interfaces for accessing a database of Web services.

The UDDI browser is incorporated in the Spider web Service Proxy wizard as well as in the JSP Spider web Service Proxy wizard. Yous open UDDI search pages by clicking the Search From UDDI button on the Select WSDL File page of these wizards or on the Spider web Service page of the properties dialog box for a Spider web Service Proxy Generator project. The UDDI Search page has search fields and options listed in Table 31-2.

Tabular array 31-two: UDDI search fields and options

Search field or option

Clarification

UDDI profile

Editable driblet-downward listing for the proper noun of a UDDI operator. You tin can associate a UDDI profile with a query URL. The drop-down list allows y'all to select predefined profiles for the Microsoft and IBM public UDDI registries.

Query URL

Text box that displays the URL for the Web service registry in which you want to find a Web service. If you selected a predefined profile in the UDDI Profile drop-down list, the URL associated with that profile displays in the text box. You tin can as well enter a query URL and associate the URL with a profile name by clicking the Save Contour button.

Search For

Text box for entering the key word you lot want to use in a UDDI search.

In

Driblet-down listing for "Service Names" (default) or "Business Names."

Exact Match

Check box selection. If selected, limits search to the current value in the Search For drib-down listing.

Case Sensitive

Cheque box option. If selected, limits the search to the capitalization used by the current value in the Search For drop-downwardly list.

Sort

Radio push option. Sorts search results in ascending or descending guild.

Maximum Rows

Spin button option. Limits the number of search results returned to the number that you enter in this spin push control.

The side by side sorcerer page in the UDDI search depends on whether you lot are searching a key give-and-take in concern names or service names:

  • For a business name search The Select Business wizard page returns a list of business names and descriptions that meet your search criteria. After you select a business name and click Next, a list of service names is returned on the Select Service wizard page, along with a service description and WSDL file proper name for each service listed.

  • For a service name search The Select Service wizard page returns a list of service names along with a business name, service description, and WSDL file name for each service listed.

Later you select a service on the Select Service page of a wizard, the UDDI search is complete and y'all proceed your selections on the remaining pages of the magician.

The Web Service page of the backdrop dialog box for a Web Service proxy object displays the WSDL file selection that you made in the Web Service Proxy wizard. It also allows you to modify that search through a UDDI search wizard that contains the same search options and search effect lists as the UDDI search pages in the Web Service Proxy wizard.

Generated proxies

The generated proxies display in the Organisation Tree. You tin expand the proxy nodes to display the signatures of the methods.

The example shows the System Tree with nodes expanded and displaying the objects imported from the extension file.

Aliases for XML methods

PowerBuilder is not case sensitive, whereas XML, Soap, C#, and .NET are. To ensure that PowerScript code can telephone call XML methods correctly, each method in the proxy uses an alias. The string that follows allonym for contains the name and the signature of the corresponding XML or Soap method in case-sensitive mode.

For example:

part real getquote(string ticker) allonym for getQuote(xsd:string symbol)# return xsd:float StockPrice@urn:xmethods-delayed-quotes@SoapAction      

Spider web services across time zones

When an awarding consumes a Spider web service that uses the engagement, time, or datetime datatypes, it is possible that the service implementation processes and returns different data for application users who admission the service from different time zones. This is typically the result of blueprint considerations of the Web service and not the result of precision differences or translation errors between the Web service and the application that calls it.

Datatype mappings for EasySoap Web service engine

The Web service proxy generator maps datatypes between XML and PowerBuilder if you use the EasySoap Web engine, and betwixt XML, C#, .Cyberspace, and PowerBuilder if you use the .NET Spider web service engine. All XML information types are based on schemas from the Www Consortium Web site and.

Tabular array 31-3 shows the datatype mappings betwixt XML and PowerScript. If you utilise the .NET Web service engine, datatypes are converted to C#, and so to .NET datatypes. (Table 31-4 and Table 31-5 show datatype mappings used with the .NET Web service engine.)

Tabular array 31-3: Datatype mappings betwixt XML and PowerBuilder

XML Blazon

PowerScript Blazon

boolean

boolean

byte (-128 to 127) or short

int

unsignedByte (0 to 255) or unsignedShort

uint

int

long

unsignedInt

ulong

long (-9223372036854775808 to 9223372036854775807), unsignedLong (0 to 9223372036854775807), integer (-9223372036854775808 to 9223372036854775807), nonNegativeInteger (0 to 9223372036854775807), negativeInteger (-1 to -9223372036854775808), nonPositiveInteger (0 to -9223372036854775808), or positiveInteger (1 to 9223372036854775807)

longlong

decimal (-999999999999999999 to 999999999999999999)

decimal

float

real

double

double

gYear, gYearMonth, gMonthDay, gDay, anyURI, QName, Note, string, normalizedSting, token, or datatypes derived from token

Note About normalizedString, token, and derived datatypes A normalized string does not contain wagon return, line feed, or tab characters. A token is similar to similar to a normalizedString, but does non contain leading or trailing spaces or an internal sequence of two or more spaces. Datatypes that derive from token include language, Name, NCName, NMTOKEN, NMTOKENS, ID, IDREF, IDREFS, ENTITY, ENTITIES.

string

date

date

time

fourth dimension

dateTime

datetime

base64, base64Binary, or hexBinary

blob

Datatype mappings for .NET Web service engine

When you use the .Net Web Service engine, PowerBuilder converts the XML from WSDL files to C# lawmaking and compiles information technology in a .Internet assembly. Tabular array 31-4 displays datatype mappings for these conversions.

Table 31-4: Datatype mappings for the .NET Web service engine

XML type

C# type

.Net type

int

int

Organization.Int32

unsignedInt

uint

System.UInt32

boolean

bool

Organisation.Boolean

unsignedByte

Byte

Arrangement.Byte

short

short

System.Int16

unsignedShort

ushort

Organization.UInt16

long

long

System.Int64

unsignedLong

ulong

Organisation.UInt64

Decimal

Decimal

Organisation.Decimal

Float

Float

System.Float

Double

Double

System.Double

Datetime, Date, and Time

Arrangement.DateTime

System.DateTime

hexBinary and hex64Binary

Byte [ ]

System.Byte [ ]

nonNegativeInteger, negativeInteger, nonPositiveInteger, positiveInteger, gYear, gMonth, gMonthDay, gDay, duration, anyURI, QName, Note, normalizedString, token, linguistic communication, NMTOKEN, NMTOKENS, Name, NCName,ID, IDREF, IDREFS, ENTITY, ENTITIES, and String

Cord

System.String

AnyType

Object

System.Object

Tabular array 31-5 displays the datatype mapping between C# datatypes and PowerBuilder.

Table 31-5: Datatype mappings between C# and PowerBuilder

C# type

PowerScript type

byte

byte

sbyte

int

short

int

int

long

long

longlong

ushort

uint

uint

ulong

ulong

longlong

float

existent

double

double

object

whatsoever

char

uint

string

string

decimal

decimal

bool

boolean

System.DateTime

datetime

Arrays of arrays

Different XML, PowerBuilder can support but unbounded one-dimensional arrays. If an array in a WSDL file is divisional and one-dimensional, PowerBuilder automatically converts it to an unbounded assortment. If an array in a WSDL file is multidimensional, the return blazon is invalid and cannot be used.

In office prototypes, PowerBuilder displays an assortment type as a PowerBuilder any type. You must declare an array of the appropriate type to hold the return value.

How To Use Proxy Object To Access Web Services,

Source: https://infocenter-archive.sybase.com/help/topic/com.sybase.dc37774_1100/html/apptech/BABFADAI.htm

Posted by: stewartarow1957.blogspot.com

0 Response to "How To Use Proxy Object To Access Web Services"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel