accessing mainframe web services

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

accessing mainframe web services

Postby mvalentine » Wed Jun 25, 2008 4:14 am

I have written 5 CICS Web Services and need to provide examples on how to use them in the different code environments we have here. I've provided examples in ASP.net/C# and need to provide examples in VAST.
I tried to access the WSDL on the mainframe via a URI. But I get : "SGML Error #ResourceNotAvailable: 'Resource could not be accessed. PublicId=''http://. . .". I think this means I need to provide authentication details to access the WSDL on the mainframe - I do this in ASP.net when I consume the WSDL and when I access the services - so I would need to this in VAST. How do I provide USERID and PASSWORD? here is my workspace code:
[ | aContainer containerName aServiceCollection wsdl|
wsdl := 'http://mvsbsys1/cics31/. . ./wsdl/bwsi.wsdl'.
containerName := SciSocketManager default getHostName.
aContainer := SstWSContainer containerNamed: containerName ifNone: [SstWSContainer createContainerNamed: containerName using: SstWSContainerConfiguration defaultConfiguration].
aServiceCollection := aContainer deploy: wsdl.
(aServiceCollection first BWSRPINFOperationRequest) inspect ] fork.
mvalentine
 
Posts: 5
Joined: Fri May 09, 2008 8:29 am

Re: accessing mainframe web services

Postby tc » Wed Jun 25, 2008 11:16 am

Hello,

From your client, say a pc, if you open a browser and enter the wsdl address from your code:

wsdl := 'http://mvsbsys1/cics31/. . ./wsdl/bwsi.wsdl'

. . . does the wsdl come up or do you have to enter an id and pw?

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Re: accessing mainframe web services

Postby mvalentine » Wed Jun 25, 2008 12:33 pm

When I bring it up in IE, I'm prompted for a Userid and Password.
mvalentine
 
Posts: 5
Joined: Fri May 09, 2008 8:29 am

Re: accessing mainframe web services

Postby Diane Engles » Thu Jun 26, 2008 4:16 am

Hi,

Look at the web services security example in the installation subdirectory samples\sstws\ws_security. On a typical Windows installation the path is c:\Program Files\Instantiations\VA Smalltalk\7.5\samples\sstws\ws_security. This example shows how to create a Soap request that includes a userid and password in the header.
You will need to load the Web Services Examples Feature.

Let us know if you have more questions.

Diane
Instantiations Smalltalk Support
diane@instantiations.com
Diane Engles
Moderator
 
Posts: 66
Joined: Mon Oct 16, 2006 2:40 pm

Re: accessing mainframe web services

Postby mvalentine » Thu Jun 26, 2008 4:23 am

Yes, that'll be helpful once I create the SOAP messages from the WSDL. But first I need to access the WSDL within USS in TSO. I need to somehow give a Userid and password to authenticate myself to TSO so the WSDL can be consumed to create the SOAP messages.
mvalentine
 
Posts: 5
Joined: Fri May 09, 2008 8:29 am

Re: accessing mainframe web services

Postby Diane Engles » Thu Jun 26, 2008 2:14 pm

Hi,

How do you authenticate when accessing TSO USS from C# -- is this a straight TCP flow or HTTP or ????

Diane
Instantiations Smalltalk Support
diane@instantiations.com
Diane Engles
Moderator
 
Posts: 66
Joined: Mon Oct 16, 2006 2:40 pm

Re: accessing mainframe web services

Postby mvalentine » Fri Jun 27, 2008 7:36 am

To import the WSDL, in the IDE, from the mainframe and create the "Service" object, I add a Web Reference with the URI (http://mvsbsys1/cics31/.../wsdl/bwsi.wsdl) in Visual Web Dev. I'm prompted for the RACF Userid and password on the mainframe. After I enter those values, the WSDL is imported to the IDE. Likewise, if I go to IE and enter the WSDL URI, I'm prompted for the RACF Userid and Password. In either case, I can view the WSDL that is located on the mainframe.

When I code to actually use the Service object, I do the following to authenticate:
bwpkService.Credentials = new NetworkCredential(tbRACFUserid.Text, tbRACFPassword.Text);

where tbRACFUserid and tbRACFPassword are the text boxes that contain the Userid and Password. The IDE has created the SOAP messages that I can then use.
mvalentine
 
Posts: 5
Joined: Fri May 09, 2008 8:29 am

Re: accessing mainframe web services

Postby Diane Engles » Wed Jul 02, 2008 12:50 pm

During deployment of wsdl into a container in VA Smalltalk, a url or file path is specified. The class SstHttpUrl is responsible for retrieving the wsdl from a url (see the fetchMessage method). I believe that you could extend SstHttpUrl to send the userid and password in the Http get: message, or to send more than one message if that is necessary; you would need to know the exact message(s) that are being sent.

Can you monitor the network traffic between the mainframe and .NET and see the exact Http message(s) that are sent? Once you know this, you should be able to extend SstHttpUrl and configure the web service processing to use the extended version which would additionally send a userid and password.
Instantiations Smalltalk Support
diane@instantiations.com
Diane Engles
Moderator
 
Posts: 66
Joined: Mon Oct 16, 2006 2:40 pm


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest