[Fwd: Re: One more Thing. Re: [greenstone-users] how to build Application]

From ak19@cs.waikato.ac.nz
DateThu May 15 19:12:42 2008
Subject [Fwd: Re: One more Thing. Re: [greenstone-users] how to build Application]
---------------------------- Original Message ----------------------------
Subject: Re: One more Thing. Re: [greenstone-users] how to build Application
From: ak19@cs.waikato.ac.nz
Date: Fri, May 9, 2008 11:24 am
To: "feng wang" <wangfeng77@gmx.de>
--------------------------------------------------------------------------

Hi,

1. >For
> the Greenstone i got still an error and couldn't get the connection
> between the democlient and GSDL.
> I gave the website of wsdl file of my GSDL after i selected the Greenstone
> in democlient. it was:
> http://localhost:8180/greenstone3/services/localsite?wsdl
>
> I did not change anything in my GSDL? Should i do it?

Yes, it is very important that it is up-to-date. In
gs3-webservices-democlient/docs/HowToFiles/0InstallDemoClientInBrief.html
it says you have to update your greenstone 3 installation from SVN. That's
because some new source code has been added:
- an entirely new web service class called QBRSOAPServer and
- changes to the build file, and
- some more files that have been added or changed.
The GS3 demo-client does not use the process() operation of the original
SOAPServer web service, you see, because it uses a totally different web
service class.

If you don't want to get everything from SVN again and compile and install
it, then try following the instructions at
docs/HowToFiles/1GettingGS3WebServicesRunning.html which will tell you
about which files you need to get the latest version of from the SVN
repository.

The new QBRSOAPServer is a different web service from the original one
containing "process()".
IMPORTANT: You need to give the demo-client the wsdl file location of
*these* new web services as it says in the HowTo docs. It won't work with
the original web service at all.

But you'll only have the new web services available once you've deployed
them - as explained in the HowTo files - and that's why you need the
latest GS3.

There should not be any problems when you have the necessary files, but if
there's any difficulty, you can try by compiling it again.

Please read through at least the first 3 html files in
docs/HowToFiles/index.html
(the first one I felt ought to be enough, since if your greenstone 3 is up
to date, the instructions would work. But the other two html files explain
it all in more detail and tell you exactly what to do.)


2. > I have downloaded the zipped file"gs3-webservices-democlient" in truk
> website of greenstone. And tried to connect the greenstone and fedora in
> my Linux. For the fedora there was a menu like the fedora Admin tool. But
> i couldn't connet my Fedora after i gave the right passwort of mine.

Figuring out why the demo-client did not work with Fedora is going to be
hard since I am not where you are and can't look at what went wrong.
Here's some information about my Fedora situation though:
- I tried with Fedora 2.2.1.
- I had installed it using Quick Installation, so my host was localhost
(alternatively my computername also worked) and my port is 8080. It should
work on other server host names and ports. I tried using a windows machine
to connect to the fedora server on my linux and it worked.
- I have not tested it with https only http
- This may be obvious but it does not hurt mentioning that the Fedora
server must already be running for the demo-client to be able to connect.

Does the connection dialogue tell you what went wrong when it failed to
connect, or is there no clear message? Are you maybe having proxy
problems?

Also note that as docs/HowToFiles/0InstallDemoClientInBrief.html says the
demo-client will only work with a Fedora repository containing Greenstone
exported documents. And you have to register the PID "greenstone" in
Fedora's config file. See
docs/HowToFiles/3InstallingFedora.html, section D.


3. > For the democode of GreenstoneConnection i have a question. Yes i knew
> what is the NullPiontExceptioon,but i wanna still get a answer for the
> first java file of SOAP Connection. Because i think it's important for the
> soap implementation of Greenstone. but why i couldn't successfully create
> a axis call and invoke for soap server of GSDL?? Something wrong in the
> QName Field?

I quickly wrote that GreenstoneConnection class as an example on how to
invoke web services (for a Greenstone 3 context) without testing it. I
can't remember now if I had ever used the process() web service operation.

The process() web service is a direct mapping of the MessageRouter.java
class' process() method.

The web services I've written, called "QBRSOAPServer" do make use of the
same Message Router class. But they are a somewhat different type of web
services in that provider type Java:RPC in the Axis server config file.
The original SOAPServer web service (with the process operation) uses
style="message" in the server config file to pass the XML SOAP message
contents about. I think the difference in invocation may lie there.

I will try to find a time to speak to the developers here who have invoked
the process web service and ask them how they did it. I will have to get
back to you on that.

4. > After i read the java code of GreenstoneConnection,i found a problem.
> What is the process method actually? Does it mean,that i can use the
> information of the manual.pdf from the page 35. The process method
> included all message like "describe", "system","format","status" and
> "process"(query,browse,retrieve,process,applet,enrich)
>
> Because i thought the "process" method is the process message.
> I knew it likes the describeRepository Method in the API-A of Fedora.

The process web service operation is not the merely the process message.
The process web service operation is the process method of the
MessageRouter jav a class turned into a web service. The method lets one
send Greenstone 3 XML request messages to the MessageRouter and it then
returns the GS3 XML response messages that Greenstone3 generates back to
you. That means that you can use the one process() method to send all the
request message types (describe, system,... the various process messages)
to the MessageRouter and get response messages back.

5. > But in the
> java file there was only an invocation about the describe like
> <request lang='en' type='describe' to=''/>
The java file was showing describe as one of the example messages we can
send to the MessageRouter using the process web service operation. But as
my example code didn't work, it didn't help you. However, if you get the
latest Greenstone 3 code, then look in
$GSDL3HOME/resources/java/QBRSOAPServer.java.in for examples that I hope
will be clearer on how to use the MessageRouter's process method.


6. > At first i should study the code in the democlient. It's very very
helpful
> for me!
I hope very much that it will help you and others. Do also read the HowTo
files, since I've tried to explain what to do in there as much as I could.
Those files are not quite so rushed as that example java code I had
previously sent you (I was busy getting the demo-client to stand by itself
back then and had no time to test).

- I'm still tidying up things. For instance, you've just made me realise
that the popup dialog requesting the WSDL of Greenstone 3 web services
does not specify that it wants the QBRSOAPServer's web services. That's
because the name QBRSOAPServer web services was invented very recently and
I didn't make the change in the demo-client.
- There's some small things I need to do relating to FLI before I can
write the README for it that you can try to use to get Greenstone
documents into Fedora.
- I had nearly finished my FedoraGenericSearch installer and will put it
up eventually. It does nothing special other than automate a task that I
found prone to typing errors when I did it manually. If you haven't
installed Fedora Generic Search yet but would like to some day soon,
hopefully this code will be ready by then to reduce the installation time
to seconds rather than the hours of confusion it was for me.

Regards,
Anupama


> For
> the Greenstone i got still an error and couldn't get the connection
> between the democlient and GSDL.
> I gave the website of wsdl file of my GSDL after i selected the Greenstone
> in democlient. it was:
> http://localhost:8180/greenstone3/services/localsite?wsdl
>
> I did not change anything in my GSDL? Should i do it?
>
> 2)For the democode of GreenstoneConnection i have a question. Yes i knew
> what is the NullPiontExceptioon,but i wanna still get a answer for the
> first java file of SOAP Connection. Because i think it's important for the
> soap implementation of Greenstone. but why i couldn't successfully create
> a axis call and invoke for soap server of GSDL?? Something wrong in the
> QName Field?
>
> 3)After i read the java code of GreenstoneConnection,i found a problem.
> What is the process method actually? Does it mean,that i can use the
> information of the manual.pdf from the page 35. The process method
> included all message like "describe", "system","format","status" and
> "process"(query,browse,retrieve,process,applet,enrich)
>
> Because i thought the "process" method is the process message. But in the
> java file there was only an invocation about the describe like
> <request lang='en' type='describe' to=''/>
> I knew it likes the describeRepository Method in the API-A of Fedora.
>
> At first i should study the code in the democlient. It's very very helpful
> for me!
>
> Regards
> Feng Wang