You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Cileli, Aris" <ar...@citigroup.com> on 2006/03/21 15:02:50 UTC
Using Axis to do SAML, Need help.
I am a new user to Axis. I modified an existing Web service that was written in Axis. Modified the web service class to implement javax.security.auth.callback.CallbackHandler. Added the handler method as such below.
I could compile with no problem, but when I try to make the wsdl using the JAVA2WSDL command I get the following error below; I got the source code for the Callback class and put it in my project so that it could use the java source code to generate the wsdl, but I still get this error. I would really appreciate any help or guidance in this manner.
Thanks
Aris
make-wsdl:
[java2wsdl] Java2WSDL com.citigroup.aet.soa.csiservice.manager.SoaCsiManager
[java2wsdl] - The class javax.security.auth.callback.Callback is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be
used to define this class in the wsdl file.
gen-files:
[java] - The class javax.security.auth.callback.Callback is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be
used to define this class in the wsdl file.
[java] Parsing XML file: C:\CSISOAWebServices\wsdl\SOACSIWebServices.wsdl
[java] java.io.IOException: Type {http://callback.auth.security.javax}Callback is referenced but not defined.
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
[java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
[java] at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
[java] at java.lang.Thread.run(Thread.java:595)
[java] Java Result: 1
[copy] Copying 1 file to C:\CSISOAWebServices\src\com\citigroup\aet\soa\csiservice
BUILD FAILED
C:\CSISOAWebServices\build\build.xml:186: Warning: Could not find file C:\CSISOAWebServices\confgen\deploy.wsdd to copy.
Total time: 6 seconds
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
System.out.println(" In the handle method ");
System.out.println(" In the handle method ");
System.out.println(" In the handle method ");
for (int i=0; i < callbacks.length; i++) {
if (callbacks[i] instanceof DynamicPolicyCallback) {
DynamicPolicyCallback dp = (DynamicPolicyCallback)callbacks[i];
SecurityPolicy policy = dp.getSecurityPolicy();
// This simplistic callback will simply set a Dummy Assertion
// An actual implementation can locate the saml assertion and set it
if (policy instanceof AuthenticationTokenPolicy.SAMLAssertionBinding) {
AuthenticationTokenPolicy.SAMLAssertionBinding samlBinding =
(AuthenticationTokenPolicy.SAMLAssertionBinding)
((AuthenticationTokenPolicy.SAMLAssertionBinding)policy).clone();
if ((samlBinding.getAssertion() == null) && (samlBinding.getAuthorityBinding() == null)) {
System.out.println(" populateAssertion(samlBinding, dp) ");
} else if (samlBinding.getAssertion() != null) {
System.out.println(" validateSAMLAssertion(samlBinding)");
} else if ((samlBinding.getAuthorityBinding() != null) && (samlBinding.getAssertionId() != null)) {
System.out.println("locateSAMLAssertion(samlBinding)");
} else {
System.out.println("Missing information from SAML Policy");
throw new UnsupportedCallbackException(null, "Missing information from SAML Policy");
}
}
}
}