Author Message
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi

I have problem that I could not integration with Customer WS with HTTPS because of SOAP Header.
So I have questions to add SOAP Header as sample below:-

<soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="TestUser"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>test</wsse:Username>
<wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">5326501900010000ac1e97b223300002</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>

Please guide me on how to add this SOAP Header.
Thankyou.

Chukiat D.
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
This web service appears to be using the Username Token profile for security. That type of header is automatically created as part of the SOAP request when you enter in credentials in the Authentication section of the WSOP. From the Method drop down, choose Username Token and then enter in the username and password information. If the web service needs a timestamp, then select the Username Token with timestamp option.
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi

I follow up your suggestion to set up with authen Tokenkey.
But we still got the error as detail logs below:-

6DF7336514E8B3420E7ECF65840E5E23:/TestAMIVR_22072014 : Got AxisFault during web service call: The security token could not be authenticated or authorized
06/08/2557 14:24:36:840 INFO - 6DF7336514E8B3420E7ECF65840E5E23:/TestAMIVR_22072014 : Capturing exception [org.apache.axis2.AxisFault]. Message [The security token could not be authenticated or authorized]
06/08/2557 14:24:36:850 INFO - 6DF7336514E8B3420E7ECF65840E5E23:/TestAMIVR_22072014 : Using SCESession 6DF7336514E8B3420E7ECF65840E5E23:/TestAMIVR_22072014 servlet : Response_error
06/08/2557 14:24:36:911 DEBUG - 6DF7336514E8B3420E7ECF65840E5E23:/TestAMIVR_22072014 : session id:sess927789 | TestAMIVR_22072014:Response_error | error
06/08/2557 14:24:36:911 INFO - 6DF7336514E8B3420E7ECF65840E5E23:/TestAMIVR_22072014 : Using SCESession 6DF7336514E8B3420E7ECF65840E5E23:/TestAMIVR_22072014 servlet : Exit
06/08/2557 14:24:36:961 INFO - 6DF7336514E8B3420E7ECF65840E5E23:/TestAMIVR_22072014 : Removing session from AvayaSessionTermination Servlet

Please give us any suggestion.

Thank you.

Chukiat D.
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
Are you using Username Token with Timestamp?
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi

I follow up your suggestion by using Token with Timestamp. But it still got the error as log below:-

to complex: session:aai as []
13/08/2557 10:10:55:674 DEBUG - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : CTICallOperation Request: callinfoInitialCall
13/08/2557 10:10:55:674 DEBUG - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : CTICallOperation Response: okay
13/08/2557 10:10:55:854 INFO - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : Calling method [{http://endpoint.security.amivr.nfs.scb.com/}verifyTin] on web service [SecurityEndpointImplService] at [https://10.20.164.236:9445/nfs-sg/services/SecurityService]
13/08/2557 10:10:56:335 INFO - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : Using Username Token with timestamp authentication for web service call
13/08/2557 10:11:02:205 ERROR - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : Got AxisFault during web service call: The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of the message have expired)
13/08/2557 10:11:02:215 INFO - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : Capturing exception [org.apache.axis2.AxisFault]. Message [The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of the message have expired)]
13/08/2557 10:11:02:276 INFO - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : Using SCESession 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 servlet : Response_error
13/08/2557 10:11:02:326 DEBUG - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : session id:sess9316279 | TestAMIVR_22072014:Response_error | error
13/08/2557 10:11:02:326 INFO - 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 : Using SCESession 0D825D91C9B5D6C851B181099116DFD4:/TestAMIVR_22072014 servlet : Exit


Please give me any suggestion on this case.

Chukiat D.
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
That error usually indicates that there is a sync issue with the time set on the server and the client. Security settings will not allow there to be more than a 5 minute difference, by default, between the two clocks. Check the time settings on the server and your machine and make sure they are the same. If they are in different time zones, make sure that is set correctly as well.
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi

I still got the issue after check time that time diff less than 30 sec. but we still got issue error "Invalid timestamp The security semantics of the message have expired)]".

So please give us any suggestion.
Thank you.


to complex: session:aai as []
18/08/2557 11:23:43:847 DEBUG - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : CTICallOperation Request: callinfoInitialCall
18/08/2557 11:23:43:847 DEBUG - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : CTICallOperation Response: okay
18/08/2557 11:23:43:977 INFO - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : Calling method [{http://endpoint.security.amivr.nfs.scb.com/}verifyTin] on web service [SecurityEndpointImplService] at [https://10.20.164.236:9445/nfs-sg/services/SecurityService]
18/08/2557 11:23:44:317 INFO - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : Using Username Token with timestamp authentication for web service call
18/08/2557 11:23:50:348 ERROR - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : Got AxisFault during web service call: The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of the message have expired)
18/08/2557 11:23:50:348 INFO - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : Capturing exception [org.apache.axis2.AxisFault]. Message [The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of the message have expired)]
18/08/2557 11:23:50:359 INFO - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : Using SCESession 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 servlet : Response_error
18/08/2557 11:23:50:419 DEBUG - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : session id:sess6624501 | TestAMIVR_22072014:Response_error | error
18/08/2557 11:23:50:419 INFO - 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 : Using SCESession 8E92DB452C3484F4A49BC0D40EC19632:/TestAMIVR_22072014 servlet : Exit
SamareshKowshik
Joined: Nov 6, 2013
Messages: 351
Offline
There's really nothing else I can tell you, to be honest. The information I gave previously was found by doing web searches, and there's still more out there. Clearly, the username/password is correct, and the security information is being sent, but for some reason it refuses to authenticate. Perhaps try using a different client, even SoapUI would be fine, and see how that works.
ramnathkini
Joined: Dec 19, 2013
Messages: 3
Offline
we had the same issue in one of the customer place...

It is related to time difference between web services and the client machines .

check if both are in different time zones ?
if yes, then check the difference in time .

web server expects the SOAP request with in a particular time period.
Exception says that the time stamp in the soap message has expired when it compares with the time in the server side.
Hope it helps !!!!!
Thanx.
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi

I still got the problem " Invalid timestamp The security semantics of the message ".

- Client Timezone is Windows base with UTC + 7
- WS Server Timezone is HKT

So how can we set in the same time zone as WS Server?

Thank you.

Best Regards,
Chukiat D.
chukiatdenkongpon
Joined: Nov 7, 2013
Messages: 97
Offline
Hi

we try to coding to integration to WS with TokenUser that can be able to connect to WS Server properly without error.
And it can use SOAPUI to connect and getting result properly.

So is it has any way to be able to add SOAP Header instead?

Please provide me any suggestion and sample code for adding header.

Thank you.

Best Regards,
Chukiat D.
Go to:   
Mobile view