cancel
Showing results for 
Search instead for 
Did you mean: 

Running WebServiceSamples outside Eclipse IDE

drbaz
Champ in-the-making
Champ in-the-making
II have "copied" the delivered WebServiceSample java code to my own classes - CMCLExample1, CMCLExample2 etc etc
The code for CMCLExample1 is identical to WebServiceSample1 except for the  passWordCallbackClass
which is defined as
<parameter name='passwordCallbackClass' value='com.comanaco.alfresco.CMCLExample1'/>"
The full definiton of the WS_SECURITY_INFO string is
public static final String WS_SECURITY_INFO = 

         "<deployment xmlns='http://xml.apache.org/axis/wsdd/' xmlns:java='http://xml.apache.org/axis/wsdd/providers/java'>" +

         "   <transport name='http' pivot='java:org.apache.axis.transport.http.HTTPSender'/>" +

         "   <globalConfiguration >" +

         "      <requestFlow >" +

         "       <handler type='java:org.apache.ws.axis.security.WSDoAllSender' >" +

         "               <parameter name='action' value='UsernameToken'/>" +

         "               <parameter name='user' value='ticket'/>" +

         "               <parameter name='passwordCallbackClass' value='com.comanaco.alfresco.CMCLExample1'/>" +

         "               <parameter name='passwordType' value='PasswordText'/>" +

         "           </handler>" +

         "       </requestFlow >" +

         "   </globalConfiguration>" +

         "</deployment>";

When I run CMCLExample2 from within Eclipse IDE …it works ok
When I run WebServiceSample2 from Eclipse and Op sys, it works ok.

When I run CMCLExample2 from the op sys command prompt, I get the following error
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: WSDoAllSender: password callback class provided null or empty password
faultActor:
faultNode:
faultDetail:
        {http://xml.apache.org/axis/}stackTrace:WSDoAllSender: password callback class provided null or empty password
        at org.apache.ws.axis.security.WSDoAllSender.getPassword(WSDoAllSender.java:861)
        at org.apache.ws.axis.security.WSDoAllSender.performUTAction(WSDoAllSender.java:465)
        at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:314)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at org.alfresco.example.webservice.repository.RepositoryServiceSoapBindingStub.query(RepositoryServiceSoapBindingStub.java:712)
        at com.comanaco.alfresco.CMCLExample2.executeSearch(CMCLExample2.java:91)
        at com.comanaco.alfresco.CMCLExample2.main(CMCLExample2.java:62)

        {http://xml.apache.org/axis/}hostname:linuxserver

WSDoAllSender: password callback class provided null or empty password
        at org.apache.ws.axis.security.WSDoAllSender.getPassword(WSDoAllSender.java:861)
        at org.apache.ws.axis.security.WSDoAllSender.performUTAction(WSDoAllSender.java:465)
        at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:314)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:127)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at org.alfresco.example.webservice.repository.RepositoryServiceSoapBindingStub.query(RepositoryServiceSoapBindingStub.java:712)
        at com.comanaco.alfresco.CMCLExample2.executeSearch(CMCLExample2.java:91)
        at com.comanaco.alfresco.CMCLExample2.main(CMCLExample2.java:62)


Any suggestions ? Smiley Very Happy  :shock:
2 REPLIES 2

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

From what I can see it looks like it should work.

I assume your copy of sample 1 works?

There are some references in sample 2 back to sample 1, I resume you've fixed these up in your copy of sample 2 to point to your copy of sample 1?

Hope this helps,
Roy

drbaz
Champ in-the-making
Champ in-the-making
Dunno what i did, but they all work outside of Eclipse now … someone up there likes me !!!
Smiley Tongue