I'm trying to create a service skeleton out from a wsdl document where I
in the binding element have added a refference to a policy that should
enforce the use of a UsernameToken. I have two problems doing this:
1)
When i attach it to:
<wsdl:binding type="ns:CalcServ2PortType" name="CalcServ2SOAP11Binding">
<wsp:PolicyReference
URI="http://itu.dk/people/jakob/policies/policy.xml#TokenPolicy"
required="true" />
and run:
WSDL2Java.bat -uri CalcServ2.wsdl -ss -sd -p faj
Then somehow there is no mention of a policy and/or refference, neither
in the ressources folder (CalcServ2.wsdl, Services.xml), nor in the
resulting java code.
2)
If I try to attach it to:
<wsdl:binding type="ns:CalcServ2PortType" name="CalcServ2SOAP12Binding">
<wsp:PolicyReference
URI="http://itu.dk/people/jakob/policies/policy#TokenPolicy"
required="true" />
It throws an axisfault, mainly nested around "Caused by:
java.lang.Exception: Policy not found for uri :
http://itu.dk/people/jakob/policies/policy.xml#TokenPolicy"
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.Run
timeException: WSDL writing failed!
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:185)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: WSDL writing failed!
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:640)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:168)
... 2 more
Caused by: java.lang.RuntimeException: WSDL writing failed!
at
org.apache.axis2.wsdl.codegen.writer.WSDLWriter.writeWSDL(WSDLWriter.java:45)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeWSDLFiles(AxisServiceBasedMultiLanguageEmitter.java:737)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeletonService(AxisServiceBasedMultiLanguageEmitter.java:70
3)
at
org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(AxisServiceBasedMultiLanguageEmitter.java:638)
... 3 more
Caused by: org.apache.axis2.AxisFault: Policy not found for uri :
http://itu.dk/people/jakob/policies/policy.xml#TokenPolicy; nested
exception is:
java.lang.Exception: Policy not found for uri :
http://itu.dk/people/jakob/policies/policy.xml#TokenPolicy
at
org.apache.axis2.description.AxisService.getWSDL(AxisService.java:558)
at
org.apache.axis2.description.AxisService.printWSDL(AxisService.java:545)
at
org.apache.axis2.wsdl.codegen.writer.WSDLWriter.writeWSDL(WSDLWriter.java:40)
... 6 more
Caused by: java.lang.Exception: Policy not found for uri :
http://itu.dk/people/jakob/policies/policy.xml#TokenPolicy
at
org.apache.axis2.description.AxisService2OM.addPolicy(AxisService2OM.java:805)
at
org.apache.axis2.description.AxisService2OM.generateSOAP11Binding(AxisService2OM.java:442)
at
org.apache.axis2.description.AxisService2OM.generateOM(AxisService2OM.java:161)
at
org.apache.axis2.description.AxisService.getWSDL(AxisService.java:553)
... 8 more
Anyone got any suggestions to what I'm doing wrong or what is causing this?
Best regards
Jakob Roed Kierkegaard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]