Web Services in 10 minutes

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

Web Services in 10 minutes

Postby totallyobjects » Mon Oct 26, 2009 8:06 am

I am trying to get to first base on Web services but fail at the first hit - as it were.

I am running the Web Services in 10 minutes wizard as described in the web documentation. I have updated my hosts file as requested.

I get to the point where I hit the Deploy Service button. 'Service deployment completed' shows in the transcript but I get a walkback. I have appended the walkback to this posting.

The description of the error is as follows:
I set a break in the method SstWsdlSaxHandler resolveEntity: aPublicId systemId: aSystemId.
aPublicId is nil. aSystemId is 'http://vasthost:63001/SstWSInsurancePolicyInterface.xml'.

I then step through the code until I reach AbtXmlResourceReader getResourceForPublicID: aURIString baseURI: aBaseURI

In this method there is a call AbtXmlConfiguration current propertyNamed: aURIString where
aURIString = 'http://vasthost:63001/SstWSInsurancePolicyInterface.xml'.

This method does a lookup in a table called properties that is a class variable of AbtXmlConfiguration .
This lookup table contains a single entry keyed as 'DefaultResourceQualifier' which contains a string which is the address of the xml directory. As it doesn't contain the required string, the lookup fails.

I have tried adding an entry to the table which is keyed on the parameter with content as the same. That stops the error and it moves on until it breaks again at the next lookup.

I think that somewhere this table should have been initialized but it is not happening in my installation.

Can anyone help please?

David

Walkback

Debugger Stack Trace Report:
Error String: 'An error occurred during web service deployment.'
Resumable: true

Process
Name: 12527
Process State: suspended
Priority: 3

Executing in: Signal>>#evaluate:

System Configuration Dump


Copyright:

VA Smalltalk V8.0 ; Image: 8.0
VM Timestamp: 4.0,(NC) 3/30/2009 (78)
(C) Copyright Instantiations 1994, 2009. All rights reserved.
(C) Copyright International Business Machines Corp. 1994, 2006. All rights reserved.

Time: 15:58:48
Date: 26/10/2009

Platform:

Virtual machine: ES
Bytecode version: 4.0
Manager version: 4.00
'OS' subsystem: 'WIN32s'
'CLIM' subsystem: 'ES'
'CP' subsystem: 'WIN32s'
'CLDT' subsystem: 'ES'
'CFS' subsystem: 'WIN32s'
'SCI' subsystem: 'WIN'
'CW' subsystem: 'WIN32s'
'CPM' subsystem: 'ES'
'CG' subsystem: 'WIN32s'
'CPIC' subsystem: 'WIN32s'

Current user: Library Supervisor

Connected Library:

Pathname: C:\Program Files\Instantiations\VA Smalltalk\8.0\manager\mgr80.dat

INFO: Trapped error dumping system configuration.
=============<STACK TRACE BEGINS>============
[] in <optimized block>(ExceptionalEvent class)>>#initializeSystemExceptions
signal=Signal on Exception: An error occurred during web service deployment.
Signal>>#evaluate:
self=Signal on Exception: An error occurred during web service deployment.
aBlock=[] in ExceptionalEvent class>>#initializeSystemExceptions
ExceptionalEvent>>#applyDefaultHandler:
self=Exception: An error occurred during web service deployment.
aSignal=Signal on Exception: An error occurred during web service deployment.
exception=Exception: (ExError) An error has occurred.
ExceptionalEvent>>#signalFor:
self=Exception: An error occurred during web service deployment.
aSignalOrExceptionSelector=Signal on Exception: An error occurred during web service deployment.
handler=nil
ExceptionalEvent>>#signalWithArguments:
self=Exception: An error occurred during web service deployment.
arguments=(SstUnknownError((SGML Error #ResourceNotAvailable: 'Resource could not be accessed. PublicId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml'' SystemId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml''')))
ExceptionalEvent>>#signalWith:
self=Exception: An error occurred during web service deployment.
arg1=SstUnknownError((SGML Error #ResourceNotAvailable: 'Resource could not be accessed. PublicId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml'' SystemId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml'''))
[] in <optimized block>(AbtXmlDeserializationConfiguration class)>>#newWsdlConfiguration
aSignal=Signal on Exception: SGML exception
Signal>>#evaluate:
self=Signal on Exception: SGML exception
aBlock=[] in AbtXmlDeserializationConfiguration class>>#newWsdlConfiguration
[] in BlockContextTemplate(Block)>>#when:do:exitWith:retryReturn:
self=[] in AbtXmlMappingParser>>#parseURI:
exception=an ExceptionalEventCollection
handlerBlock=[] in AbtXmlDeserializationConfiguration class>>#newWsdlConfiguration
exitBlock=[] in Block>>#when:do:
knownResult=an Object
retryBlock=[] in Block>>#when:do:exitWith:retryReturn:
handler=[] in Block>>#when:do:exitWith:retryReturn:
oldHandler=nil
signal=Signal on Exception: SGML exception
ExceptionalEvent>>#signalFor:
self=Exception: SGML exception
aSignalOrExceptionSelector=Signal on Exception: SGML exception
handler=[] in Block>>#when:do:exitWith:retryReturn:
ExceptionalEvent>>#signalWithArguments:
self=Exception: SGML exception
arguments=(SGML Error #ResourceNotAvailable: 'Resource could not be accessed. PublicId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml'' SystemId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml''')
ExceptionalEvent>>#signalWith:
self=Exception: SGML exception
arg1=SGML Error #ResourceNotAvailable: 'Resource could not be accessed. PublicId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml'' SystemId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml'''
SgmlSyntaxError>>#signalException
self=SGML Error #ResourceNotAvailable: 'Resource could not be accessed. PublicId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml'' SystemId=''http://vasthost:63001/SstWSInsurancePolicyInterface.xml'''
AbtXmlResourceReader>>#resolveEntity:systemId:baseURI:
self=an AbtXmlResourceReader
aPublicId=nil
aSystemId='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
aUriString=nil
resource=nil
publicId='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
SstWsdlSaxHandler(AbtXmlMappedContentHandler)>>#resolveEntity:systemId:
self=a SstWsdlSaxHandler
aPublicId=nil
aSystemId='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
AbtXmlMappingParser(AbtXmlSaxParser)>>#resolveEntity:systemId:
self=an AbtXmlMappingParser
aPublicId=nil
aSystemId='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
[] in AbtXmlMappingParser>>#parseURI:
self=an AbtXmlMappingParser
aURIString='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
resource=nil
BlockContextTemplate(Block)>>#valueWithErrorHandler:oldHandler:onReturnDo:
self=[] in AbtXmlMappingParser>>#parseURI:
handler=[] in Block>>#when:do:exitWith:retryReturn:
oldHandler=nil
completionBlock=[]
BlockContextTemplate(Block)>>#when:do:exitWith:retryReturn:
self=[] in AbtXmlMappingParser>>#parseURI:
exception=an ExceptionalEventCollection
handlerBlock=[] in AbtXmlDeserializationConfiguration class>>#newWsdlConfiguration
exitBlock=[] in Block>>#when:do:
knownResult=an Object
retryBlock=[] in Block>>#when:do:exitWith:retryReturn:
handler=[] in Block>>#when:do:exitWith:retryReturn:
oldHandler=nil
BlockContextTemplate(Block)>>#when:do:
self=[] in AbtXmlMappingParser>>#parseURI:
exception=an ExceptionalEventCollection
handlerBlock=[] in AbtXmlDeserializationConfiguration class>>#newWsdlConfiguration
knownResult=an Object
result=nil
AbtXmlMappingParser>>#applyErrorHandlerWhile:
self=an AbtXmlMappingParser
aBlock=[] in AbtXmlMappingParser>>#parseURI:
config=an AbtXmlDeserializationConfiguration
AbtXmlMappingParser>>#parseURI:
self=an AbtXmlMappingParser
aURIString='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
resource=nil
SstWSVastServicesDeploymentDescriptorStrategy>>#buildDeploymentObjectFrom:
self=a SstWSVastServicesDeploymentDescriptorStrategy
string='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
SstWSVastServicesDeploymentDescriptorStrategy(SstWSVastDeploymentDescriptorStrategy)>>#deploymentDescriptorFrom:
self=a SstWSVastServicesDeploymentDescriptorStrategy
string='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
mappedRootObject=nil
SstWSVastServicesDeploymentDescriptorStrategy>>#createDeploymentDescriptor:
self=a SstWSVastServicesDeploymentDescriptorStrategy
anObject='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
SstWSVastServicesDeploymentDescriptorStrategy>>#deploy:into:
self=a SstWSVastServicesDeploymentDescriptorStrategy
aUrl='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
aContainer=a SstWSContainer (lenovo1)
aDeploymentDescriptor=nil
aServicesDescriptor=nil
webServiceDefinitions=nil
services=nil
SstWSDeploymentManager>>#deploy:
self=a SstWSDeploymentManager
anObject='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
SstWSContainer>>#deploy:
self=a SstWSContainer (lenovo1)
anObject='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
[] in WsExLocalServiceDeploymentForm>>#deploy:into:
self=a WsExLocalServiceDeploymentForm
aString='http://vasthost:63001/SstWSInsurancePolicyInterface.xml'
aContainer=a SstWSContainer (lenovo1)
[] in Process>>#executeBlock:withArguments:
self=Process:12527{suspended,3}
aBlock=[] in WsExLocalServiceDeploymentForm>>#deploy:into:
args=()
Process>>#executeBlock:withArguments:
self=Process:12527{suspended,3}
aBlock=[] in WsExLocalServiceDeploymentForm>>#deploy:into:
args=()
Process>>#newProcessOn:stackSize:withArguments:named:
self=Process:12527{suspended,3}
aBlock=[] in WsExLocalServiceDeploymentForm>>#deploy:into:
stackSize=1024
args=()
procName='12527'
==============<STACK TRACE ENDS>=============
totallyobjects
[|]
 
Posts: 27
Joined: Wed May 27, 2009 12:57 am

Re: Web Services in 10 minutes

Postby Diane Engles » Tue Oct 27, 2009 4:08 am

Hi,

Do you have an entry for vasthost 127.0.0.1 in your hosts file? I think you need to set that up for the example.
Instantiations Smalltalk Support
diane@instantiations.com
Diane Engles
Moderator
 
Posts: 66
Joined: Mon Oct 16, 2006 2:40 pm

Re: Web Services in 10 minutes

Postby totallyobjects » Tue Oct 27, 2009 4:25 am

This is my hosts file

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
127.0.0.1 vasthost
----------------------------------

I think that that is OK.

David
totallyobjects
[|]
 
Posts: 27
Joined: Wed May 27, 2009 12:57 am

Re: Web Services in 10 minutes

Postby Diane Engles » Tue Oct 27, 2009 5:23 am

Your vasthost entry looks fine.

You wrote:
This method does a lookup in a table called properties that is a class variable of AbtXmlConfiguration .
This lookup table contains a single entry keyed as 'DefaultResourceQualifier' which contains a string which is the address of the xml directory. As it doesn't contain the required string, the lookup fails.

What is the original entry for DefaultResourceQualifier and what is the "required string" you mention?
Instantiations Smalltalk Support
diane@instantiations.com
Diane Engles
Moderator
 
Posts: 66
Joined: Mon Oct 16, 2006 2:40 pm

Re: Web Services in 10 minutes

Postby totallyobjects » Tue Nov 03, 2009 1:00 pm

There is only that one entry in the lookup table and it points to the xml directory under VAST 8.0.
I do not know what the required string is, as there is no entry in the lookup table for the key. That is what is causing the crash.
I have run the debugger extensively on this and quite a lot of other methods use this table and when finding no key, they default an answer but this is not happening at this point.

I think that there is a more fundamental issue here. Having spent three days so far trying to get this to work I have had one sucess and many failures. At one point last week, I ran up the image that I have that has Web services pre-poaded. The 10 minute wizerd ran to conclusion and I was able to enquire on policies etc. I shut the wizard down and ran it again. It failed once more and has never run to conculsion since whether i start it from fresh or restart it.

Today I tried the 'ultimate' test. I re-installed a clean image of VAST 8.0. I loaded up the web services feature and tried the wizard and it still crashed!

So I have two questions:

1. How come this doesn't even run from a clean image. All it tells me that I have to do is to make sure of the hosts file entry, which you have seen that I have done.
2. How come it ran once and has never run again?

This is part of a large project to connect Sharepoint to VAST and I can't get beyond the first step.

David
totallyobjects
[|]
 
Posts: 27
Joined: Wed May 27, 2009 12:57 am

Re: Web Services in 10 minutes

Postby Diane Engles » Tue Nov 03, 2009 1:20 pm

Hi David,

Can you tell me the path down which you have installed VA Smalltalk? The example is unfortunately not very robust and expects certain paths to be there, so if you varied from the default, that could explain it.

Also, are you going to be doing a doc literal service? If so, I can step you through another example that may be more productive.
Instantiations Smalltalk Support
diane@instantiations.com
Diane Engles
Moderator
 
Posts: 66
Joined: Mon Oct 16, 2006 2:40 pm

Re: Web Services in 10 minutes

Postby totallyobjects » Sun Nov 08, 2009 8:51 am

I have made s few installs whilst trying to get this to work. I am now an expert at un-install as well - smile.

I have installed both in the default directory and our normal development path. I have now cleared everything out and re-installed using the install defaults.

I have a clean image, I have installed the Web services Feature only and then run the demo.

To show you where we are, this is what is currently in the Transcript

WebServicesIn10MinutesExample new open
Created file named 'C:\PROGRA~1\INSTAN~1\VASMAL~1\8.0\image800\SstWSInsurancePolicyInterface-interface.wsdl'
Created file named 'C:\PROGRA~1\INSTAN~1\VASMAL~1\8.0\image800\SstWSInsurancePolicyInterface.wsdl'
Created file named 'C:\PROGRA~1\INSTAN~1\VASMAL~1\8.0\image800\SstWSInsurancePolicyInterface.xml'
Default container started
Service deployment completed

In spite of the deployment being shown as completed, I got the 'An error occurred during web service deployment' walkback as described in my first post.

I have also tried using the Default Resource Qualifier directory, which places the files into the xml directory. I got the same result.

I am still puzzled as to how it could actually work on one single occasion, however.

As I am going nowhere with this, if you can point me at an intro that would be more productive, i would be grateful. I am sure that the bulk of what I will be doing is related to document retrieval.
totallyobjects
[|]
 
Posts: 27
Joined: Wed May 27, 2009 12:57 am

Re: Web Services in 10 minutes

Postby Diane Engles » Wed Nov 11, 2009 9:14 am

What operating system are you using? I've been able to get the "10 minute" example to work on
WinXPPro but not Windows 7 Ultimate. I get the same or a similar walkback.

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

Re: Web Services in 10 minutes

Postby totallyobjects » Thu Nov 12, 2009 2:51 am

Oh dear! XPPro on a Lenovo laptop.

David
totallyobjects
[|]
 
Posts: 27
Joined: Wed May 27, 2009 12:57 am

Re: Web Services in 10 minutes

Postby Diane Engles » Thu Nov 12, 2009 5:52 am

Hi David,

Do you see something similar to the following in the servlet engine log window?

SessionConfig: SstSessionManagerConfiguration{
owner: a SstWAS40SessionManager
callbacks: a SstCallbackInterface
autoGenerateSessions: false
managerClass: SstWAS40SessionManager
sessionClass: SstHttpSession
sessionReaperInterval: 30
sessionInactivityTimeout: 180
}
}' )
2009/11/12 08:45:24.875|INFO|Dispatch worker: 12449|GET /SstWSInsurancePolicyInterface.xml HTTP/1.1
Content-Length: 0
Host: vasthost:63001


2009/11/12 08:45:24.906|INFO|Dispatch worker: 12449|GET /SstWSInsurancePolicyInterface.wsdl HTTP/1.1
Content-Length: 0
Host: vasthost:63001


2009/11/12 08:45:24.922|INFO|Dispatch worker: 12449|GET /SstWSInsurancePolicyInterface-interface.wsdl HTTP/1.1
Content-Length: 0
Host: vasthost:63001

Since you are on XPPro, I will try to get an example to you later today or tomorrow that doesn't use the servlet to serve up the deployment files. You could also try to deploy the server side of the SSL example to see if you have the same problem with it. The PDF is here: viewtopic.php?f=12&t=3117&p=11693&hilit=secure+web+service#p11693
Instantiations Smalltalk Support
diane@instantiations.com
Diane Engles
Moderator
 
Posts: 66
Joined: Mon Oct 16, 2006 2:40 pm

Re: Web Services in 10 minutes

Postby TriSebastian » Thu Nov 12, 2009 8:44 am

Hi!

Well I had the same problem with the insurance ws sample.

I can't actually tell why, but it makes some difference how I start the abt.icx.

I am using Windows Vista and I don't get the sample run when I just doubleclick the abt.icx file.

Now my steps how the sample works for me, maybe you give it a try.

Create a VAST Development folder.
Let's say: C:\Smalltalk\Images\vast80\abt.icx

Then you copy the xml and symples folder from C:\"Program Files"\Instantiations\"VA Smalltalk"\8.0\ into your new development folder.

Then and that's important! Create a batch (e.g. start.bat) file including the following line:
start C:\"Program Files"\Instantiations\"VA Smalltalk"\8.0\bin\abt.exe -i C:\Smalltalk\Images\vast80\abt.icx

Now doublecklick the batch-file and use the load/unload features menu entry from your Transcript Tools menu.
Just choose "Server Smalltalk (SST) - Web Services " and say okay.

Now browse the hierachy of "WsSecureExapmle" and start it via green start button in the toolbar.

That's the way how it works for me.
In my case, just doubleclicking the abt.icx sometimes leed to an stack overflow while generating the deployment files :-(

Hope this helps!
Cheers!
Sebastian
TriSebastian
 
Posts: 76
Joined: Sun Jul 20, 2008 9:40 pm
Location: Nanaimo, BC, Canada

Re: Web Services in 10 minutes

Postby TriSebastian » Thu Nov 12, 2009 9:10 am

Well, it might also be useful to copy an abt.icx and abt.ini from C:\Program Files\Instantiations\VA Smalltalk\8.0\image800 to ne specific development folder :-D
TriSebastian
 
Posts: 76
Joined: Sun Jul 20, 2008 9:40 pm
Location: Nanaimo, BC, Canada

Re: Web Services in 10 minutes

Postby totallyobjects » Mon Nov 23, 2009 9:19 am

Well I tried that and got nothing different.

You say "Now browse the hierachy of "WsSecureExapmle" and start it via green start button in the toolbar." but I can't see a runnable item there. CXan you be a bit more explicit.

Also, is there a way that I can check that the http server is running because even when i start it, I can't get a browser to do anything other than fail when I try vasthost - or, yet again, am I being stupid?
totallyobjects
[|]
 
Posts: 27
Joined: Wed May 27, 2009 12:57 am

Re: Web Services in 10 minutes

Postby TriSebastian » Mon Nov 23, 2009 10:08 am

Hi again!

Well, did you already try to access the following link after starting the server?
http://vasthost:63001/SstWSInsurancePol ... rface.wsdl
This should show you the wsdl.

"Green Button", sorry that really wasn't quite precise. I have no idea how the documentation calls it.
Have alook at the attached png.
Just klick on the icon...

Hope this helps!
Cheers!
Sebastian
Attachments
WsSecureExampleScreenShot.png
WsSecureExampleScreenShot.png (69.16 KiB) Viewed 961 times
TriSebastian
 
Posts: 76
Joined: Sun Jul 20, 2008 9:40 pm
Location: Nanaimo, BC, Canada

Re: Web Services in 10 minutes

Postby Diane Engles » Tue Nov 24, 2009 3:03 pm

Hi David,

Sorry this has taken a bit longer than I thought. We were pretty busy getting the new release out. Attached is a zip file with a document literal example that does not use the HttpServlet to serve up files. Please start a clean image, load the webservices feature and open the included workspace. You will need to modify the userPath variable to coordinate with where you extracted the files. Please let me know if this works for you. I have been able to make it work on WinXP Pro and Windows 7.

I am concerned that you have not been successful at getting the example going using the SstHttpServlet. I wonder if it is a firewall issue? I'd like to continue to pursue that problem as well if it isn't resolved.

Regards,

Diane
Attachments
doc_literal.zip
(7.52 KiB) Downloaded 45 times
Instantiations Smalltalk Support
diane@instantiations.com
Diane Engles
Moderator
 
Posts: 66
Joined: Mon Oct 16, 2006 2:40 pm

Next

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

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