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:
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
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 32767
posted
0
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?
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...
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
Joined: Jun 03, 2004
Posts: 83
posted
0
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.
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
Joined: Jun 03, 2004
Posts: 83
posted
0
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
Marshal
Joined: Mar 22, 2005
Posts: 32767
posted
0
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
Joined: Jun 03, 2004
Posts: 83
posted
0
Yeah, I have soap monitor enabled, but when I run my client I don't see anything in the applet.
Matt Hoffman
Ranch Hand
Joined: Jun 03, 2004
Posts: 83
posted
0
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
Marshal
Joined: Mar 22, 2005
Posts: 32767
posted
0
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