axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Runo.Barrd...@tieto.com>
Subject RE: Axis2-1.6.2: create web service client able to handle SpnegoContextToken appearing in WSDL?
Date Mon, 06 May 2013 08:42:07 GMT
Dear Martin:

I am surprised to note that a person - of other nationality than Swedish - will know to cite
from  "Markings" ("Vägmärken" in Swedish) by Dag Hammarskjöld!



1.       The Schema which defines SpnegoContextToken (http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/ws-securitypolicy.xsd)
is available at the following URL:
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/



2.       As I attempt to create client code by using the following batch command content:
"
@SET JAVA_HOME=C:\JDK1.6.0_26
@SET AXIS2_HOME=C:\axis2-1.6.2
@SET PATH=%JAVA_HOME%\bin;%PATH%

@REM ADB - Axis2-1.6.2
@C:\axis2-1.6.2\bin\wsdl2java.bat -uri ./wsdl/TicketService.wsdl -o ./ -p com.tieto.ws.axis2.ticketdispenser.client
-or -d adb -u -S ./src -R ./resourcesTicketDispenser
"


3.       It results the following error:
"
C:\eclipse-workspaces\JEE-Indigo-32-Axis2-162\Eclipse_Marginalen_Axis2-162\Marginalen.Axis2.BGC.ELIN.TicketDispenserCaller>bat\genTicketDispenserClient_from_WSDL.bat
2013-05-02, RunoB WSDL2java f÷r Marginalen ELIN TicketDispenserService
Using AXIS2_HOME:   C:\axis2-1.6.2
Using AXIS2_CLASS_PATH:   C:\axis2-1.6.2;C:\axis2-1.6.2\lib\activation-1.1.jar;C:\axis2-1.6.2\lib\antlr-2.7.7.jar;C:\axis2-1.6.2\lib\apache-mime4j-core-0.7.2.jar;C:\axis2-1.6.2\lib\axiom-api-1.2
Using JAVA_HOME:    C:\JDK1.6.0_26
Retrieving document at './wsdl/TicketService.wsdl'.
log4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: can't serialize the policy ..
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:293)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException:
can't serialize the policy ..
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:537)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:282)
        ... 2 more
Caused by: java.lang.RuntimeException: can't serialize the policy ..
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getInputElement(AxisServiceBasedMultiLanguageEmitter.java:2828)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2358)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2242)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForCallbackHandler(AxisServiceBasedMultiLanguageEmitter.java:1232)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeCallBackHandlers(AxisServiceBasedMultiLanguageEmitter.java:1198)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:460)
        ... 3 more
Caused by: java.lang.RuntimeException: ProtectionToken is not set
        at org.apache.ws.secpolicy.model.ProtectionToken.serialize(ProtectionToken.java:78)
        at org.apache.ws.secpolicy.model.SymmetricBinding.serialize(SymmetricBinding.java:168)
        at org.apache.neethi.Policy.serialize(Policy.java:204)
        at org.apache.ws.secpolicy.model.SecureConversationToken.serialize(SecureConversationToken.java:124)
        at org.apache.ws.secpolicy.model.ProtectionToken.serialize(ProtectionToken.java:81)
        at org.apache.ws.secpolicy.model.SymmetricBinding.serialize(SymmetricBinding.java:168)
        at org.apache.neethi.All.serialize(All.java:71)
        at org.apache.neethi.ExactlyOne.serialize(ExactlyOne.java:54)
        at org.apache.neethi.Policy.serialize(Policy.java:204)
        at org.apache.axis2.util.PolicyUtil.policyComponentToString(PolicyUtil.java:189)
        at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getInputElement(AxisServiceBasedMultiLanguageEmitter.java:2824)
        ... 8 more
C:\eclipse-workspaces\JEE-Indigo-32-Axis2-162\Eclipse_Marginalen_Axis2-162\Marginalen.Axis2.BGC.ELIN.TicketDispenserCaller>
"


4.        The Policy clause of the WSDL in question containing SpnegoContextToken is included
below.
"
  <wsp:Policy wsu:Id="WSHttpBinding_ITicketService_policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <wsp:Policy>
            <sp:ProtectionToken>
              <wsp:Policy>
                <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                  <wsp:Policy>
                    <sp:RequireDerivedKeys/>
                    <sp:BootstrapPolicy>
                      <wsp:Policy>
                        <sp:SignedParts>
                          <sp:Body/>
                          <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
                          <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
                          <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                          <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                          <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
                          <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
                          <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
                        </sp:SignedParts>
                        <sp:EncryptedParts>
                          <sp:Body/>
                        </sp:EncryptedParts>
                        <sp:SymmetricBinding>
                          <wsp:Policy>
                            <sp:ProtectionToken>
                              <wsp:Policy>
                                <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                                  <wsp:Policy>
                                    <sp:RequireDerivedKeys/>
                                  </wsp:Policy>
                                </sp:SpnegoContextToken>
                              </wsp:Policy>
                            </sp:ProtectionToken>
                            <sp:AlgorithmSuite>
                              <wsp:Policy>
                                <sp:Basic256/>
                              </wsp:Policy>
                            </sp:AlgorithmSuite>
                            <sp:Layout>
                              <wsp:Policy>
                                <sp:Strict/>
                              </wsp:Policy>
                            </sp:Layout>
                            <sp:IncludeTimestamp/>
                            <sp:EncryptSignature/>
                            <sp:OnlySignEntireHeadersAndBody/>
                          </wsp:Policy>
                        </sp:SymmetricBinding>
                        <sp:Wss11>
                          <wsp:Policy/>
                        </sp:Wss11>
                        <sp:Trust10>
                          <wsp:Policy>
                            <sp:MustSupportIssuedTokens/>
                            <sp:RequireClientEntropy/>
                            <sp:RequireServerEntropy/>
                          </wsp:Policy>
                        </sp:Trust10>
                      </wsp:Policy>
                    </sp:BootstrapPolicy>
                  </wsp:Policy>
                </sp:SecureConversationToken>
              </wsp:Policy>
            </sp:ProtectionToken>
            <sp:AlgorithmSuite>
              <wsp:Policy>
                <sp:Basic256/>
              </wsp:Policy>
            </sp:AlgorithmSuite>
            <sp:Layout>
              <wsp:Policy>
                <sp:Strict/>
              </wsp:Policy>
            </sp:Layout>
            <sp:IncludeTimestamp/>
            <sp:EncryptSignature/>
            <sp:OnlySignEntireHeadersAndBody/>
          </wsp:Policy>
        </sp:SymmetricBinding>
        <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <wsp:Policy/>
        </sp:Wss11>
        <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
          <wsp:Policy>
            <sp:MustSupportIssuedTokens/>
            <sp:RequireClientEntropy/>
            <sp:RequireServerEntropy/>
          </wsp:Policy>
        </sp:Trust10>
        <wsaw:UsingAddressing/>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
"


5.       More information
If I comment out the section containing SpnegoContextToken, or if I replace SpnegoContextToken
with X509Token, creation of client source is done with the above batch script without problems.
My conclusion is therefore that SpnegoContextToken is not implemented by Axis2-1.6.2


Med vänlig hälsning, / Best Regards,

Runo Barrdahl, civ ing, tekn lic

Tieto Sweden AB, Financial Services

From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: den 3 maj 2013 23:49
To: java-dev@axis.apache.org
Subject: RE: Axis2-1.6.2: create web service client able to handle SpnegoContextToken appearing
in WSDL?

can you supply a XSD ?

(a spec will do if it specifies sufficient required element entities to construct a XSD)

Martin
______________________________________________
Never look down to test the ground before taking your next step; only he who keeps his eye
fixed on the far horizon will find the right road....Dag Hammarskjold





________________________________
From: Runo.Barrdahl@tieto.com<mailto:Runo.Barrdahl@tieto.com>
To: java-dev@axis.apache.org<mailto:java-dev@axis.apache.org>
Date: Fri, 3 May 2013 11:21:23 +0300
Subject: Axis2-1.6.2: create web service client able to handle SpnegoContextToken appearing
in WSDL?
Dear Axis2 Architects and Developers:

There is currently, if I have understoodd correctly, a deficiency in Axis2-(1.6.2) in that
it does not implement use of SpnegeContextToken.
SpnegeContextToken occurs today typically in web services created by Microsoft tools.

Questions:
1.       Is there a plan to implement SpnegeContextToken in Axis2?
a.       If so, what is the rough time table for this?
2.       If not, do you have any knowledge on what is required to be done in Axis2-1.62 and/or
in Rampart-1.6.2, in order to enable SpnegeContextToken?
3.       Or, do you know if there are any Java web service frameworks today which implement
SpnegeContextToken?
4.       What can you recommend to me to solve my problem (i. e. to make use of a WSDL containing
SpnegeContextToken)?

Thanks in advance


Med vänlig hälsning, / Best Regards,

Runo Barrdahl, civ ing, tekn lic

Tieto Sweden AB, Financial Services
mail: runo.barrdahl@tieto.com<mailto:runo.barrdahl@tieto.com>
tel (direct): 0709-790 407 / +46-709 790 407
tel (central): 010 481 00 00 / +46-10 481 00 00
fax: 08-86 30 56 / +46-8 86 30 56
web: www.tieto.com<http://www.tieto.com>


Mime
View raw message