axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tabin Cédric -[ thecaptain ]-" <tabin.ced...@netplus.ch>
Subject [Newbie][WSS4J] Server Error
Date Wed, 15 Feb 2006 09:35:00 GMT
Hi all !

I try to implement a Signature Encrypt on Axis with WSS4J. I set up the
WS-Security using a UsernameToken and it works properly. Now with the
Signature Encrypt a "Server Error" comes up (see the end of the mail :)).
On the WSS4J mailing list, They told me that doesn't looks like a WSS4J
error so I come to you ! Here are my deployment files :

CLIENT
------
<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="Signature Encrypt"/>
     <parameter name="user" value="privatekey"/>
     <parameter name="passwordCallbackClass"
value="eteaching.webservice.security.WSMainPasswordCallback"/>
     <parameter name="signaturePropFile" value="crypto.properties" />
     <parameter name="encryptionUser" value="privatekey" />
     <parameter name="encryptionPropFile" value="crypto.properties" />
     <parameter name="encryptionKeyIdentifier" value="DirectReference" />
    </handler>
   </requestFlow>
  </globalConfiguration>
</deployment>

the wsdd is used like that (class MoodleConnection) :
public static RMoodleETeaching connect(String url)
{
   EngineConfiguration config = new FileProvider("mainclientconfig.wsdd");
   MoodleETeachingService service = new
MoodleETeachingServiceLocator(config, url);
   MoodleETeachingService service = new MoodleETeachingServiceLocator(url);
   return service.getMoodleETeaching();
}

crypto.properties :
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=security
org.apache.ws.security.crypto.merlin.keystore.alias=privatekey
org.apache.ws.security.crypto.merlin.alias.password=security
org.apache.ws.security.crypto.merlin.file=privateKeyStore

keystore :
Type keystore : jks
Fournisseur keystore : SUN

publickey, 14 fév. 2006, trustedCertEntry, Emprunte du certificat (MD5) :
.....
privateky, 14 fév. 2004, keyEntry, Emprunte du certificat (MD5) : .....

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

  <service name="MoodleETeaching" provider="java:RPC">

    <requestFlow>
     <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
      <parameter name="passwordCallbackClass"
value="eteaching.webservice.security.WSMoodlePasswordCallback"/>
      <parameter name="action" value="Signature Encrypt"/>
      <parameter name="signaturePropFile" value="crypto.properties" />
      <parameter name="decryptionPropFile" value="crypto.properties" />
     </handler>
    </requestFlow>

    <parameter name="scope" value="Session" />
    <parameter name="className"
value="eteaching.webservice.MoodleETeaching"/>
    <parameter name="allowedMethods" value="*"/>

  </service>
</deployment>

the keystore and the crypto.properties on the server is the same as the
client

CODE
----

RMoodleETeaching rmc =
MoodleConnection.connect("http://xxx/axis/services/MoodleETeaching");
MoodleCours[] crs = rmc.getCourses(); //it crash here !
System.out.println(crs.length);

ERROR
-----
Exception in thread "main" AxisFault
 faultCode: {http://xml.apache.org/axis/}Server
 faultSubcode:
 faultString: Server Error
 faultActor:
 faultNode:
 faultDetail:
	{http://xml.apache.org/axis/}stackTrace:Server Error
	at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:473)
	at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
	at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
	at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Unknown Source)

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

Server Error
	at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
	at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
	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:375)
	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:435)
	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:2784)
	at org.apache.axis.client.Call.invoke(Call.java:2767)
	at org.apache.axis.client.Call.invoke(Call.java:2443)
	at org.apache.axis.client.Call.invoke(Call.java:2366)
	at org.apache.axis.client.Call.invoke(Call.java:1812)
	at
eteaching.webservice.remote.MoodleETeachingSoapBindingStub.getCourses(MoodleETeachingSoapBindingStub.java:263)
	at eteaching.Main.main(Main.java:45)

Best regards

Tabin Cédric



Mime
View raw message