axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tania Marinova <taniamm2...@yahoo.com>
Subject Re: org.apache.axis2.AxisFault: java.lang.NoSuchMethodError: Exception org.apache.ws.security.WSPasswordCallback.getIdentifer()Ljava/lang/String;
Date Wed, 10 Apr 2013 11:07:50 GMT
I don't want what's going on I click on reply to all. I will be mroe areful next time  


My nightmare continues

Today on my work computer I did exact I had done yesterday on my home computer, 


And I got  other exception

org.apache.axis2.AxisFault: 1
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
    at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)
    at nlo.ztestcl.main(ztestcl.java:53)


SO  I think I will post a new question because i really don't now what's going on!



 




________________________________
 From: robert lazarski <robertlazarski@gmail.com>
To: java-user@axis.apache.org; Tania Marinova <taniamm2002@yahoo.com> 
Sent: Wednesday, April 10, 2013 1:27 PMd to s
Subject: Re: org.apache.axis2.AxisFault: java.lang.NoSuchMethodError: Exception org.apache.ws.security.WSPasswordCallback.getIdentifer()Ljava/lang/String;
 
Dear Tania,

Please send your axis2 emails to list, so everyone can benefit and
more people can see your problems and perhaps help you.

This is especially important in this case as my axis2 knowledge pretty
much stops once you get into Rampart issues. Unfortunately I'm not
able to help much in this case, perhaps someone else can.

May I suggest google?

https://www.google.com.br/#hl=en&sclient=psy-ab&q=axis2+%22WSDoAllReceiver:+Incoming+message+does+not+%3E+contain+required+Security+header%22&oq=axis2+%22WSDoAllReceiver:+Incoming+message+does+not+%3E+contain+required+Security+header%22&gs_l=hp.3...10777.11994.2.12354.6.6.0.0.0.0.163.923.0j6.6.0...0.0...1c.1.8.psy-ab.R9VldifcZAE&pbx=1&bav=on.2,or.r_qf.&bvm=bv.44990110,d.dmQ&fp=28366c0400714fcb&biw=1280&bih=606

Best regards,
Robert

On Wed, Apr 10, 2013 at 1:34 AM, Tania Marinova <taniamm2002@yahoo.com> wrote:
> First I wat to thank you for the help very much
>
>
> Yesterday when I came home and tested everything on my home computer I got
> the following error
>
>
>  .apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not contain
> required Security header!
>
> And I'm stuck with this question for mote than a week and I don't know what
> to do so I decided to write you everything i do so I will be glad If you
> find my mistake to receive this message.
>
>
> (if you're interested here is teh tutorial I follow -
> http://wso2.org/library/240      )
>
> 1.  I create a Dynamic web project  with name   'testUpdate' (and of course
> I don't forget to  change the dynamic web module version to 2.5 and in
> configuration  I choose Axis 2 web service
>
>
> 2. I add to my Dynamic web project these two classes :
>
>
> SimpleService .java
>
>
> and
>
> PWCBHandler.java
>
>
> 3. I right click on SimpleService.java -> New ->Other -> Web Service
>
> to create my web service !
>
>
>
> 4. I don't forget to copy all the jar files from rampart distribution to
> testUpdate/ WebContent/WEB_INF/lib
>
>
>      and all  .mar modules into testUpdate/ WebContent/WEB_INF/modules
>
>
> 5. I change services.xml file so it looks like
>
> <service name="SimpleService" >
>  <module ref="rampart" />
> <Description>
> Please Type your service description here
> </Description>
> <messageReceivers>
> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
> class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
> <messageReceiver  mep="http://www.w3.org/2004/08/wsdl/in-out"
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
> </messageReceivers>
> <parameter name="ServiceClass" locked="false">com.gismo.testUP</parameter>
> <parameter name="InflowSecurity">
>  <action>
>   <items>UsernameToken</items>
>   <passwordCallbackClass>com.gismo.PWCBHandler</passwordCallbackClass>
>   </action>
>   </parameter>
>
>
> </service>
>
> 6. I right click on testUpdate -> RUN AS _> Run on Server (and my web
> service is deployed successfully)
>
>
> 7.  File -> New ->  Other -> Web Service Client
>
> and in Service Definition I paste the url of the wsdl file of SimpleService
>
> ( http://localhost:9091/testUpdate/services/SimpleService?wsdl)
>
>
> 8. I add  testcl.java class to my web-service client. Here is the code
>
> import javax.security.auth.callback.CallbackHandler;
>
> import org.apache.axiom.om.OMAbstractFactory;
> import org.apache.axiom.om.OMElement;
> import org.apache.axiom.om.OMFactory;
> import org.apache.axiom.om.OMNamespace;
> import org.apache.axis2.addressing.EndpointReference;
> import org.apache.axis2.client.Options;
> import org.apache.axis2.client.ServiceClient;
> import org.apache.axis2.context.ConfigurationContext;
> import org.apache.axis2.context.ConfigurationContextFactory;
>
> public class testcl {
>
>     public static void main(String[] args)  {
>
>         if(args.length != 2) {
>
>         System.out.println(args.length);
>
>
>             System.out.println("Usage: $java Client endpoint_address
> client_repo_path");
>         }
>
>     try
>     {
>
>         ConfigurationContext ctx =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1],
> args[1] + "/conf/axis2.xml");
>
>         ServiceClient client = new ServiceClient(ctx, null);
>         Options options = new Options();
>         options.setAction("urn:echo");
>         options.setTo(new EndpointReference(args[0]));
>         client.setOptions(options);
>
>
>
>
>         OMElement response = client.sendReceive(getPayload("Hello world"));
>
>         System.out.println(response);
>
>
>
>     }
>     catch (Exception ex)
>     {
>     ex.printStackTrace();
>     }
>
>
>     }
>
>
>     private static OMElement getPayload(String value) {
>
>         OMFactory factory = OMAbstractFactory.getOMFactory();
>         OMNamespace ns =
> factory.createOMNamespace("http://gismo.com/","ns1");
>         OMElement elem = factory.createOMElement("echo", ns);
>         OMElement childElem = factory.createOMElement("param0", null);
>         childElem.setText(value);
>         elem.addChild(childElem);
>         return elem;
>
>
>
>
>     }
> }
>
>
>
>
>
> 9. I don't forget to change
> webSercice_client/WebContent/axis2-web/conf/axis2.xml  and  add
>
>  <module ref="rampart"/>
>     <parameter name="OutflowSecurity">
>     <action>
>     <items>UsernameToken</items>
>     <user>bob</user>
>     <passwordCallbackClass>com.gismo.PWCBHandler</passwordCallbackClass>
>     </action>
>     </parameter>
>
>
>
>
> 10.  But when I run testCl  as Java Application it gives me an exception
>
> rg.apache.axis2.AxisFault: WSDoAllReceiver: Incoming message does not
> contain required Security header
> at
> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
> at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
> at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
> at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
> at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555)
> at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531)
> at com.gismo.testcl.main(testcl.java:42)
>
>
> ________________________________
> From: robert lazarski <robertlazarski@gmail.com>
> To: Tania Marinova <taniamm2002@yahoo.com>
> Sent: Tuesday, April 9, 2013 6:22 PM
>
> Subject: Re: org.apache.axis2.AxisFault: java.lang.NoSuchMethodError:
> Exception
> org.apache.ws.security.WSPasswordCallback.getIdentifer()Ljava/lang/String;
>
> On Tue, Apr 9, 2013 at 10:13 AM, Tania Marinova <taniamm2002@yahoo.com>
> wrote:
>> Thank you for your response  You were right. that there was anoter wss4j
>> in
>> Mywebservice_client ->WebContent -> Web - INF
>>
>> (maybe it was copied with the other libs from the rampart distributtion)
>>
>> SO
>> 1. when I've got wss4j - 1.6.4.jar  My excepton is this:
>>
>>
>> org.apache.axis2.AxisFault: java.lang.NoSuchMethodError:
>> org.apache.ws.security.WSPasswordCallback.getIdentifer()Ljava/lang/String;
>>    at
>
> The wss4j - 1.6.4.jar  has the "getIdentifer()Ljava/lang/String"
> method, you can verify that by using "java xf" on the jar and using
> javap as Martin showed. I'd verify your copy.
>
> However, as I mentioned previously, WEB-INF/lib is not the only
> possible location for the jar. You haven't mentioned your web server -
> info which would help us help you - but that jar is likely to be part
> of a server distro and you can find out for sure by:
>
>   System.out.println("CallbackHandler instance was loaded from: " +
> CallbackHandler.class.getProtectionDomain().getCodeSource().getLocation());
>
> If the path to the jar is not in WEB-INF/lib , read your web server
> docs to fix that.
>
>> And I'm really desperate and I think no one can help me.
>
> Think positive and read the advice you are getting, the problem likely
> isn't that hard to fix.
>
> - R
>
>
Mime
View raw message