• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

WSS4J problem in Axis

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to implement basic security on my web service. I basically went through this tutorial http://ws.apache.org/wss4j/axis.html and when I deploy the service, I get a error:

Exception - org.apache.axis.ConfigurationException: java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllReceiver
java.lang.ClassNotFoundException: org.apache.ws.axis.security.WSDoAllReceiver


I have the wss4j.jar in the web-inf/lib in the class path in eclipse. I also have the xmlsec.jar in there also. Is there something I am missing?

Thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the class is in that jar, as you can verify using "jar tf". Could it be that the class is in Eclipse's classpath, but not in your servers classpath?
 
Matt Hoffman
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. That seems to fix the problem, but when I redeploy and go to Axis nothing shows up. I clicked on List in Axis and all I see is "And now... Some Services" with nothing after it. Here is my deploy code: Thanks for any help...

<service name="OrdersLookupService" provider="java:RPC">
<requestFlow>
<handler type="java rg.apache.ws.axis.security.WSDoAllReceiver">
<parameter name="passwordCallbackClass" value="PWCallback"/>
<parameter name="action" value="UsernameToken"/>
</handler>
</requestFlow>
<parameter name="allowedMethods" value="*"/>
<parameter name="className" value="orders.orderWS.service.OrderLookupService"/>
</service>
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There should not be nothing listed on that page - two services are installed by default. Does the "Happy Axis" page report any problems?
 
Matt Hoffman
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The happyaxis page works fine. I did deploy the service and it doesn't show up on that page. I did get my client to return a SOAP message so the service I created works. Now I am getting a error on the PWCallback.java page.

xisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: WSHandler: cannot load password callback class: PWCallback; nested exception is:
java.lang.ClassNotFoundException: PWCallback; nested exception is:
org.apache.ws.security.WSSecurityException: WSHandler: cannot load password callback class: PWCallback; nested exception is:
java.lang.ClassNotFoundException: PWCallback
faultActor:
faultNode:
faultDetail:

WSHandler: cannot load password callback class: PWCallback; nested exception is:
java.lang.ClassNotFoundException: PWCallback; nested exception is:
org.apache.ws.security.WSSecurityException: WSHandler: cannot load password callback class: PWCallback; nested exception is:
java.lang.ClassNotFoundException: PWCallback
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
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 orders.orderWS.service.Client1.main(Client1.java:14)
Exception in thread "main"

Any ideas?
 
Matt Hoffman
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok. I am down to the final steps. I had to complile the PWCallBack class into the WEB-INF/class folder instead of my project folders.

On this site (http://ws.apache.org/wss4j/axis.html), I am at configuring the client step #4. I ran the client_deploy.wsdd using eclipse, but it says
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.NoService
faultSubcode:
faultString: The AXIS engine could not find a target service to invoke! targetService is null
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:JSTC1364

The AXIS engine could not find a target service to invoke! targetService is null

I am not sure what I need to do to get it working from here... Any ideas?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like something where it would be useful to examine the actual SOAP that is sent down the wire - the endpoint might not be specified correctly. Have you used TCPMon or SOAPMonitor before? The Axis docs on TCPMon are decent, while SOAPMonitor is better explained in an article you'll find in the Web Service FAQ.
 
Matt Hoffman
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, I have soap monitor enabled, but when I run my client I don't see anything in the applet.
 
Matt Hoffman
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it working. When I deployed through eclipse it messed up my server-config.wsdd file. It authenticates my web service. Now I have to figure out how to implement SAML.... Do you know any good resources?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to deploy it, and then add it to the request and response flows of all web services that it should monitor, as described in the article. And of course the applet needs to be started, but that button is pretty prominent
 
Thanks tiny ad, for helping me escape the terrible comfort of this chair.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic