PB9 has also come out, fast enough, probably look, compared with PB8, there is not much function, mainly WebService, XML and EJB. I feel the PB9 WebService function, share with you.
We use an example to explain:
New applications, these steps are consistent with PB8. Then create a WebService Proxy Wizard. Next, you will prompt you to enter the WSDL file, click Browse Selection, assume that it is a C: / INETPUB / WWWROOT / service1.wsdl file. Click Next, you will automatically appear service in the WSDL file. Click Next, the system selects ServicesoAP by default, then enter the Proxy Name, enter Test_ws. Several items will be default.
After completing, it is the interface of the compiler object. Will appear:
Web Service Generator Project Status
Deployment PBL: E: /PROGRAM/PB /WEBSERVICE/W_App.pbl
Clear PBL on Build: No
Confirm overwrites: no
WSDL Location: file: // e: /program/pb/webservice/service1.wsdl
Services success:
Service service1:
Service1soap
You can set it in the property or you can do with it. Click on the green icon, ok, a proxy object is generated.
You can see something like: test_wsservice1soap in the TreeView on the left.
Click the icon of the plus sign, you can see our defined show (String YourName) Returns String inside.
A good one has been completed, let's test:
Built a Windows, add a text box and button control.
Write in CB_1.Click event:
SOAPCONNECTION CONN
Test_wsservice1soap test_ws
Long rval
// String Str_endpoint
// str_endpoint = "http://localhost/webserver/service1.asmx? WSDL"
CONN = CREATE SOAPCONNECTION
Rval = conn.createInstance (Test_ws, "Test_WSService1SoAP")
SLE_1.TEXT = Test_ws.show ("Your participation is our greatest support")
Destroy conn
Ok, save, will prompt SOAPConnection underage.
Add PBSOAPCLIENT90.PBD to the library list. PBSoAPClient90.pbd Shared / PowerBuilder in the PB installation directory. SoapConnection appears on the left TreeView, SOAP Server
SOAPEXCEPTION two objects.
Run, click the button, the text box appears http://www.orrfly.com Welcome to our greatest support
Note: Service1.asmx files can be run on the server, otherwise there will be something.
I hope more wonderful things can be shared with you.