Hi,
After modifying the client config file, i am getting the java.lang.StringIndexOutOfBoundsException:  error:
 
<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"/>
    <!-- Use the Client's cert/key to sign the request -->
    <parameter name="user" value="alice"/>
    <parameter name="passwordCallbackClass" value="Hello.PWCallback1"/>
    <parameter name="signatureKeyIdentifier" value="DirectReference" />
    <parameter name="signaturePropFile" value="wsstest.properties" />
   </handler>
   </requestFlow >
   <responseFlow>
   <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
    <parameter name="mustUnderstandWSSHeader" value="true"/>
    <parameter name="mustUnderstandMessageID" value="true"/>
    <parameter name="action" value="Signature"/>
    <parameter name="user" value="alice"/>
     <parameter name="passwordCallbackClass" value="Hello.PWCallback"/>
 <parameter name="signatureKeyIdentifier" value="DirectReference" />
 <parameter name="signaturePropFile" value="wsstest.properties"/>
   </handler>
   </responseFlow>
  </globalConfiguration >
</deployment>
 
 
C:\wsdltest>java -Daxis.ClientConfigFile=client_deploy.wsdd -classpath %CLASSPAT
H% Hello.Tester
- Using Crypto Engine [org.apache.ws.security.components.crypto.Merlin]
Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.StringIndexOutOfBoundsException: String index out of ran
ge: 0
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:java.lang.StringIndexOutOfBounds
Exception: String index out of range: 0
        at java.lang.String.charAt(Unknown Source)
        at org.apache.ws.security.util.XmlSchemaDateFormat.parse(XmlSchemaDateFo
rmat.java:79)
        at java.text.DateFormat.parse(Unknown Source)
        at org.apache.ws.security.message.token.Timestamp.&lt;init&gt;(Timestamp
.java:93)
        at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecur
ityEngine.java:383)
        at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecur
ityEngine.java:245)
        at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.ja
va:156)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:190)
        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 Hello.HelloWorldServiceSoapBindingStub.getWish(HelloWorldServiceSoapB
indingStub.java:103)
        at Hello.Tester.main(Tester.java:17)
        {http://xml.apache.org/axis/}hostname:hqltprchenupatt
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216)
        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 Hello.HelloWorldServiceSoapBindingStub.getWish(HelloWorldServiceSoapB
indingStub.java:103)
        at Hello.Tester.main(Tester.java:17)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:
 0
        at java.lang.String.charAt(Unknown Source)
        at org.apache.ws.security.util.XmlSchemaDateFormat.parse(XmlSchemaDateFo
rmat.java:79)
        at java.text.DateFormat.parse(Unknown Source)
        at org.apache.ws.security.message.token.Timestamp.<init>(Timestamp.java:
93)
        at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecur
ityEngine.java:383)
        at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecur
ityEngine.java:245)
        at org.apache.ws.axis.security.WSDoAllReceiver.invoke(WSDoAllReceiver.ja
va:156)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrateg
y.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:190)
        ... 7 more


"Dittmann, Werner" <[EMAIL PROTECTED]> wrote:
Rama,
 
looking at your deployment file (and the stacktrace) I see en error in the deployment
descriptor.
 
Inside the <requestFlow> you define two handlers, the WSDoAllSender and the WSDoAllReceiver.
 
The WSDoAllReceiver shall go into the <responseFlow> on the client side, and into the <requestFlow>
on the server side. Can you check that?
 
Regards,
Werner
 


Von: Rama Chennupati [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 28. April 2006 16:15
An: Dittmann, Werner; Julie McCabe; [email protected]
Betreff: Re: AW: AW: Did not understand "MustUnderstand" header(s):

Hi,
Here is the stack trace. Thanks alot for your response.
Thanks,
Rama
 
Even i tried with setting the     parameters without any difference for both true and false.
<parameter name="mustUnderstandWSSHeader" value="true"/>
<parameter name="mustUnderstandMessageID" value="true"/>
 
C:\wsdltest>java -Daxis.ClientConfigFile=client_deploy.wsdd -classpath %CLASSPAT
H% Hello.Tester
- Using Crypto Engine [org.apache.ws.security.components.crypto.Merlin]
- Verification successful for URI "#id-11416420"
Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand
 faultSubcode:
 faultString: Did not understand &quot;MustUnderstand&quot; header(s):
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
tandChecker.java:96)
        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 Hello.HelloWorldServiceSoapBindingStub.getWish(HelloWorldServiceSoapB
indingStub.java:103)
        at Hello.Tester.main(Tester.java:17)
        {http://xml.apache.org/axis/}hostname:hqltprchenupatt
Did not understand "MustUnderstand" header(s):
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
tandChecker.java:96)
        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 Hello.HelloWorldServiceSoapBindingStub.getWish(HelloWorldServiceSoapB
indingStub.java:103)
        at Hello.Tester.main(Tester.java:17)


"Dittmann, Werner" <[EMAIL PROTECTED]> wrote:
Rama,
 
can you provide a stacktrace when Axis complains about that?
 
Regards,
Werner


Von: Rama Chennupati [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 28. April 2006 15:53
An: Dittmann, Werner; Julie McCabe; [email protected]
Betreff: Re: AW: Did not understand "MustUnderstand" header(s):

Hi Werner,
Even though I use the WSS4J security handlers, i am getting the similar kind of errors. Here is my client configuration file. Even i listed in this group earlier.
Thanks,
Rama
 
Here is my client_deploy.wsdd
<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"/>
    <!-- Use the Client's cert/key to sign the request -->
    <parameter name="user" value="alice"/>
    <parameter name="passwordCallbackClass"
      value="Hello.PWCallback1"/>
    <parameter name="signatureKeyIdentifier" value="DirectReference" />
    <parameter name="signaturePropFile" value="wsstest.properties" />
   </handler>
   <handler type="java:org.apache.ws.axis.security.WSDoAllReceiver">
    <parameter name="action" value="Signature"/>
 <parameter name="signatureKeyIdentifier" value="DirectReference" />
 <parameter name="signaturePropFile" value="wsstest.properties"/>
   </handler>
   </requestFlow >
  </globalConfiguration >
</deployment>

"Dittmann, Werner" <[EMAIL PROTECTED]> wrote:
Julie,
 
according to your deployment parameters it seems to me that you do not
use the original WSS4J security handler. The WSS4J security handlers
have some specific code that deal with the "mustunderstand" flag in the
SOAP headers. Maybe you cna check if the derived handlers use or implement
the same or similar mechanisms?
 
Regards,
Werner


Von: Julie McCabe [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 28. April 2006 15:23
An: [email protected]
Betreff: Did not understand "MustUnderstand" header(s):

Hello,

I am using WS-Security Headers through a third-party handler which uses wss4j.  I am trying to make a first attempt to call a service, I get the following error:

Did not understand "MustUnderstand" header(s):
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:96)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2727)
        at org.apache.axis.client.Call.invoke(Call.java:2710)
        at org.apache.axis.client.Call.invoke(Call.java:2386)
        at org.apache.axis.client.Call.invoke(Call.java:2309)
        at org.apache.axis.client.Call.invoke(Call.java:1766)
        at SecureOperation.Call(SecureOperation.java:182)
        at Client.main(Client.java:85)

I invoke the client with the following properties set:
 -Djava.endorsed.dirs=$CATALINA_HOME/common/endorsed  -Daxis.ClientConfigFile=$CATALINA_HOME/bin/client-config.wsdd

The client-config.wsdd is as follows:
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java=" http://xml.apache.org/axis/wsdd/providers/java ">
    <globalConfiguration>
        <parameter name="adminPassword" value="admin"/>
        <parameter name="sendXsiTypes" value="false"/>
        <parameter name="sendMultiRefs" value="false"/>
        <parameter name="sendXMLDeclaration" value="false"/>

        <parameter name="axis.sendMinimizedElements" value="true"/>
        <parameter name="defaultRequestMessageClassification" value="UNCLASSIFIED"/>

        <requestFlow>
            <handler type="java:mil.dia.nces.security.axis.handler.NCESClientHandler">
                <!-- Set the mustUnderstand attribute of the WSS Security element to true?  Default, if not present, is false. -->
                <parameter name="mustUnderstandWSSHeader" value="true"/>
                <!-- Set the mustUnderstand attribute of the WS-Addressing MessageID element to true?  Default, if not present, is false. -->
                <parameter name="mustUnderstandMessageID" value="false"/>
            </handler>
        </requestFlow>
        <responseFlow>
            <handler type="java:mil.dia.nces.security.axis.handler.NCESClientHandler">
                <parameter name="disableCertificateStatusChecking" value="true"/>
            </handler>
        </responseFlow>
    </globalConfiguration>

    <transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender"/>
    <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/>
    <transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/>
</deployment>


The service has the following in its server-config.wsdd
<service name="examples/core/factory/SimpleService" provider="Handler" use="literal" style="document">
        <parameter name="className" value="uk.ac.qub.prism.factory.impl.SimpleService"/>
        <wsdlFile>share/schema/uk/ac/qub/prism/factory/schema/Simple_service.wsdl</wsdlFile>
        <parameter name="allowedMethods" value="*"/>
        <parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
        <parameter name="scope" value="Application"/>
        <parameter name="loadOnStartup" value="true"/>
        <parameter name="allowedRoles" value="INTEL ANALYST"/>
        <parameter name="defaultResponseMessageClassification" value="UNCLASSIFIED"/>
        <parameter name="serviceQName" value="http://localhost:8080/wsrf/services/examples/core/factory/SimpleService#SimpleService "/>
    </service>

I searched this mailing list and could not find anything conclusive, I read from an IBM websphere mailing list that:
"interface doesn't have an actor parameter available to define
the root
actor/role to associate with the header URL parameter. As a
result a
binding isn't being made which the semantic checking code,

activated by
the mustUnderstand flag, uses to determine if the soap header is
understood by the client. If using the deployment descriptor to
register
a handler statically, this actor/role is defined by the

<soap-role>
child element of the <handler> definition block. This limitation
in the
specifications for HandlerInfo causes the inability of
mustUnderstand to"
work when using dynamic handler registration.


which kind of makes sense but I dont know what the implication for the configuration are, I would really apprecipate some help on this matter as ive been stuck on this matter for some time now.

Environment: Java 1.4.2_04-b05, tomcat 4.1.30, fc 5.


Many thanks,
Julie.





Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.


Yahoo! Mail goes everywhere you do. Get it on your phone.


Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.

Reply via email to