[midPoint] Unable to execute Model-client-sample

Erik Suta erik at evolveum.com
Fri Nov 28 11:28:50 CET 2014


Hi Dharmendra, 

We have tried to replicate the issue with running model-client-sample on local network (not localhost) and we have found, that 
there is a problem, when times on server and client machines are not synchronized (e.g., different time-zones setting on server and client machines). 
The difference between times does not need to be large, even gap above 60 seconds will cause the problem. Is it possible, that the time on machines in your 
environment is not synchronized? 

Here is an example of request from client and response from server. This information can be found in <model-client-sample-dir>/target/client.log. 
The request from client was issued 11:13 while the time on server was only 11:03. However, it does not matter, if the time on client is 
higher or lower than the time on server. Here are the messages: 

================================================================================= 


ID: 1 
Address: http://192.168.1.10:8080/midpoint/model/model-3 
Encoding: UTF-8 
Http-Method: POST 
Content-Type: text/xml 
Headers: {Accept=[*/*], SOAPAction=[""]} 
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soap:mustUnderstand="1"><wsse:UsernameToken wsu:Id="UsernameToken-ebac59a1-d4ea-4aa8-9cd4-c8eb3ec4951f"><wsse:Username>administrator</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">PpBDA+pV5p+TryKVDH92lAjLCu4=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">vBUKOnSTDlRxYVP3IiyvOg==</wsse:Nonce><wsu:Created>2014-11-28T10:13:27.108Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><soap:Body><ns8:getObject xmlns:ns10="http://midpoint.evolveum.com/xml/ns/public/model/scripting-3" xmlns:ns11="http://www.w3.org/2000/09/xmldsig#" xmlns:ns12="http://www.w3.org/2001/04/xmlenc#" xmlns:ns13="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3" xmlns:ns14="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3" xmlns:ns15="http://midpoint.evolveum.com/xml/ns/public/common/fault-3" xmlns:ns16="http://prism.evolveum.com/xml/ns/public/annotation-3" xmlns:ns2="http://prism.evolveum.com/xml/ns/public/types-3" xmlns:ns3="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:ns4="http://prism.evolveum.com/xml/ns/public/query-3" xmlns:ns5="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3" xmlns:ns6="http://midpoint.evolveum.com/xml/ns/model/workflow/common-forms-3" xmlns:ns7="http://midpoint.evolveum.com/xml/ns/model/workflow/process-instance-state-3" xmlns:ns8="http://midpoint.evolveum.com/xml/ns/public/model/model-3" xmlns:ns9="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"><ns8:objectType>ns3:SystemConfigurationType</ns8:objectType><ns8:oid>00000000-0000-0000-0000-000000000001</ns8:oid><ns8:options/></ns8:getObject></soap:Body></soap:Envelope> 
-------------------------------------- 
2014-11-28 11:13:27,163 [com.evolveum.midpoint.testing.model.client.sample.Main.main()] INFO (o.a.c.s.modelService.modelPort.modelPortType): Inbound Message 
---------------------------- 
ID: 1 
Response-Code: 500 
Encoding: UTF-8 
Content-Type: text/xml;charset=UTF-8 
Headers: {connection=[close], Content-Length=[357], content-type=[text/xml;charset=UTF-8], Date=[Fri, 28 Nov 2014 10:03:43 GMT], Server=[Apache-Coyote/1.1]} 
Payload: <?xml version='1.0' encoding='UTF-8'?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ns1:MessageExpired</faultcode><faultstring>The message has expired</faultstring></soap:Fault></soap:Body></soap:Envelope> 
-------------------------------------- 

================================================================================= 




Can you please take a look inside the .log file and tell us, if this is the case? If it is not, can you still provide the messages found in the .log 

(with local times on client and server machines during request), so we could further investigate this issue? 




Best regards, 




Erik Suta 



----- Original Message -----

From: "Pavol Mederly" <mederly at evolveum.com> 
To: midpoint at lists.evolveum.com 
Sent: Wednesday, November 26, 2014 4:51:23 PM 
Subject: Re: [midPoint] Unable to execute Model-client-sample 

Hello Dharmendra, 

invoking SOAP API on remote machine definitely works. I do this quite often. 

For the time being, I have no idea why it does not work in your case. If I get some idea, I'll write you back. 

Best regards, 
Pavol 




Hi 

I tried installing the midpoint on my machine and it worked, similarly i executed model client from my server and it worked there as well. 

I am still not able to execute the client for my remote server, what can be the issue? 
Is it not possible to execute the client from remote machine? 


Regards 
Dharmendra 


On Tue, Nov 25, 2014 at 7:12 PM, dharmendra parakh < dharm.parakh at gmail.com > wrote: 

<blockquote>

Hi 

The time was not same but i tried synchronizing it and no luck. 

I will try installing on my local machine or running it on the same server. 

It will be helpful if you can think of any other pointer... 

Thanks 


On Tue, Nov 25, 2014 at 6:46 PM, Pavol Mederly < mederly at evolveum.com > wrote: 

<blockquote>

Hello Dharmendra, 

I don't know. In my case, everything works (see below). 

One hint for the moment: are clocks on your local machine and the server synchronized? 

Also, you could try to install and run midPoint locally and see if that would yield any difference. 

Best regards, 
Pavol 

D:\midpoint\tgit\midpoint\samples\model-client-sample>mvn exec:java -Dexec.mainClass="com.evolveum.midpoint.testing.model.client.sample.Main" 
[INFO] Scanning for projects... 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building midPoint Samples - Model client sample 3.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- exec-maven-plugin:1.3.2:java (default-cli) @ model-client-sample --- 
[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6. 
Endpoint URL: http://localhost.:8080/midpoint/model/model-3 
Got system configuration 
Got administrator user: 00000000-0000-0000-0000-000000000002 
Got Sailor role 
Resources (2) 
Users (3) 
Tasks (3) 
Created user guybrush, OID: 4fe991fb-f3ba-46d2-9c2c-809f84b78308 
Fetched user guybrush: 
Users fullName: Guybrush Threepwood 
Created user lechuck, OID: c0c010c0-d34d-b33f-f00d-11111111ec1e 
Changed user password 
Changed user given name 
Assigned roles 
Unassigned roles 
Found 0 requestable roles 
Deleted user(s) 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 9.195s 
[INFO] Finished at: Tue Nov 25 14:12:56 CET 2014 
[INFO] Final Memory: 40M/361M 
[INFO] ------------------------------------------------------------------------ 




<blockquote>

Hi 

I was trying to execute com.evolveum.midpoint.testing.model.client.sample.Main.java 

as specified here: https://wiki.evolveum.com/display/midPoint/Model+Web+Service+Client+Sample 


- I was able to clean, install and package it correctly, when i try to execute it from command line i get an error: 



C:\Users\Dharmendra\git\midpoint\samples\model-client-sample>mvn exec:java -Dexec.mainClass="com.evolveum.midpoint.testing.model.client.sample.Main" 
[INFO] Scanning for projects... 
[INFO] 
[INFO] ------------------------------------------------------------------------ 
[INFO] Building midPoint Samples - Model client sample 3.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] 
[INFO] --- exec-maven-plugin:1.3.2:java (default-cli) @ model-client-sample --- 
[WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6. 
Endpoint URL: http:// <server_ip> :8080/midpoint/model/model-3 
javax.xml.ws.soap.SOAPFaultException: The message has expired 
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:159) 
at com.sun.proxy.$Proxy70.getObject(Unknown Source) 
at com.evolveum.midpoint.testing.model.client.sample.Main.getConfiguration(Main.java:189) 
at com.evolveum.midpoint.testing.model.client.sample.Main.main(Main.java:106) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:606) 
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293) 
at java.lang.Thread.run(Thread.java:745) 
Caused by: org.apache.cxf.binding.soap.SoapFault: The message has expired 

Can anybody assist me with this. I am executing the code from my local machine and midpoint is installed on my server which is accessible from my machine. 


Regards 
Dharmendra 




_______________________________________________
midPoint mailing list midPoint at lists.evolveum.com http://lists.evolveum.com/mailman/listinfo/midpoint 




_______________________________________________ 
midPoint mailing list 
midPoint at lists.evolveum.com 
http://lists.evolveum.com/mailman/listinfo/midpoint 


</blockquote>



</blockquote>




_______________________________________________
midPoint mailing list midPoint at lists.evolveum.com http://lists.evolveum.com/mailman/listinfo/midpoint 

</blockquote>


_______________________________________________ 
midPoint mailing list 
midPoint at lists.evolveum.com 
http://lists.evolveum.com/mailman/listinfo/midpoint 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141128/220eec86/attachment.htm>


More information about the midPoint mailing list