|
From: William L. <ww...@do...> - 2006-06-02 10:03:55
|
Sorry, my fault.
It's the directory containing those files must be in the CLASSPATH
(i.e. /home/ligang/OMIICLIENT/conf/). If that doesn't work, you might
need to specify a java system property (using -D in the command-line
or programmatically) "axis.ClientConfigFile" to point to the client-
config.wsdd file location (e.g. -Daxis.ClientConfigFile=/home/ligang/
OMIICLIENT/conf/client-config.wsdd). This is a quirk in the way Axis
loads its client-side configuration.
By the way, I'm cc'ing this e-mail to Vesso Novov, who will take over
the GridSAM development from me. I've also forwarded this e-mail to
the GridSAM mailing-list as a record for others in a similar situation.
Regards,
William
On 2 Jun 2006, at 10:45, Kevin X. Yang wrote:
> Dear William,
> I have added both crypto.properties file and the client-
> config.wsdd to my CLASSPATH. When "echo $CLASSPATH", I can see it
> displays as below: "/home/ligang/OMIICLIENT/conf/crypto.properties:/
> home/ligang/OMIICLIENT/conf/client-config.wsdd"
>
> After compile and run, I still got the same exception "failed to
> submit job: SecurityContextInitHandler: Request does not contain
> required Security header",same as I described in my previous email.
>
> Is there anything wrong? Have you read the attached source code? In
> the code, should I do some security authentication?
>
> Please help me!
>
> Many thanks,and I look forward to hearing from you.
> Best regards Kevin
>
>
>
> On Jun 1 2006, William Lee wrote:
>
>>
>> You will have to have a crypto.properties file and the client-
>> config.wsdd file in your CLASSPATH in order to enable the WS-
>> Security support in the client. You can find sample files in the
>> client distribution.
>>
>> You are correct that you don't need to have the client
>> distribution in order to use the GridSAM client API. Please note
>> the crypto.properties file also refers to the location of the
>> keystore file to use to sign/verify message signature.
>>
>> If you are using maven for building code, I would recommend you
>> to use the 2.0.0-SNAPSHOT which decouples the client/service
>> APIs completely.
>>
>> William
>>
>> On 1 Jun 2006, at 17:00, Kevin X. Yang wrote:
>>
>>> Dear William,
>>>
>>> We have decided to adopt GridSam in MaterialsGrid project, which
>>> is a "sister" project of eMinerals project. We have
>>> successfully installed Gridsam 1.1.0, and we can successfully
>>> submit a job to GridSam Web service using gridsam-submit command
>>> line.
>>>
>>> Because we need to develop a grid portal,as a starting point, I
>>> am now trying to write some java code using APIs to call GridSam
>>> web service to submit/monitor/cancel job(s). I have tried using
>>> both (i) ClientSideJobManager.submit(), and (ii)
>>> GridSAMClientSupport.submitJob () to submit jobs, but eventually
>>> I failed and got the same exceptions:
>>>
>>> "failed to submit job: SecurityContextInitHandler: Request does
>>> not contain required Security header".
>>>
>>> Having used various means to trace/debug the source code, I
>>> found the problem eventually comes from following statement in
>>> GridSAMClientSupport.submit():
>>>
>>> Object xRet = xCall.invoke(new Object[] { xRequest });
>>> I have System.out.print(xRequest) for your reference(See below).
>>> I've aso attached source code for your reference. See attached.
>>>
>>> Here are my questions:
>>>
>>> 1) Is this because I missed adding security header to the
>>> xRequest? If so, in the java code,how should I do this and do
>>> the related security configurations?
>>>
>>> 2) What is the common practice of using GridSam APIs to submit/
>>> monitor/cancel job(s) to GridSam Web Service? I would be greatly
>>> appreciated if you could also provide some sample codes.
>>>
>>> 3) In terms of using GridSam APIs to write code to submit job to
>>> GridSam Web Service, we don't have to install any GridSam client
>>> on the local machine. Is that right?
>>> Thank you very much, and I look forward to hearing from you.
>>> With my best regards Kevin
>>> System.out.print(xRequest) as follows:
>>>
>>> <gridsam:submitJob xmlns:gridsam="http://www.icenigrid.org/
>>> service/ gridsam" startSuspended="false">
>>> <gridsam:JobDescription> <ns1:JobDefinition xmlns="http://
>>> schemas.ggf.org/jsdl/2005/06/jsdl" xmlns:ns1="http://
>>> schemas.ggf.org/jsdl/2005/06/jsdl">
>>> <ns1:JobDescription>
>>> <ns1:Application> <ns2:POSIXApplicationxmlns="http://
>>> schemas.ggf.org/jsdl/2005/06/jsdl-posix" xmlns:ns2="http://
>>> schemas.ggf.org/jsdl/2005/06/jsdl-posix">
>>> <ns2:Executable>/bin/echo</ns2:Executable>
>>> <ns2:Argument>Hello World!!</ns2:Argument>
>>> </ns2:POSIXApplication>
>>> </ns1:Application>
>>> </ns1:JobDescription>
>>> </ns1:JobDefinition></gridsam:JobDescription></gridsam:submitJob>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> <AccessGridSamService.java>
>>
>> --- William Lee - Software Coordinator ---
>> --- London e-Science Centre, Imperial College London ---
>> A: Room 211a, London e-Science Centre, William Penney Laboratory,
>> Imperial College London, South Kensington, London, SW7 2AZ, UK
>> E: wwhl at doc.ic.ac.uk | william at imageunion.com
>> W: www.lesc.ic.ac.uk | www.imageunion.com
>> P: +44 (0) 207 594 8185
>>
>>
>>
--- William Lee - Software Coordinator ---
--- London e-Science Centre, Imperial College London ---
A: Room 211a, London e-Science Centre, William Penney Laboratory,
Imperial College London, South Kensington, London, SW7 2AZ, UK
E: wwhl at doc.ic.ac.uk | william at imageunion.com
W: www.lesc.ic.ac.uk | www.imageunion.com
P: +44 (0) 207 594 8185
|