Post

2 followers Follow
0
Avatar

Login Error while calling Clarizen login API in java

When calling clarizen login API using Axis with java getting the following Fault:
<axis2ns1:ExceptionDetail xmlns:axis2ns1="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><axis2ns1:HelpLink i:nil="true" /><axis2ns1:InnerException i:nil="true" />axis2ns1:MessageSpecified argument was out of the range of valid values.
Parameter name: name/axis2ns1:Messageaxis2ns1:StackTrace at System.ServiceModel.FaultCode..ctor(String name, String ns, FaultCode subCode)
at BCS.API.BusinessLogic.Clarizen.Login(String userName, String password, LoginOptions options) in d:\Bld\projecTeam\V6HFUrgent\Sources\Development\API\BCS.API.BusinessLogic.v1\Code\Clarizen.cs:line 213
at SyncInvokeLogin(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)/axis2ns1:StackTraceaxis2ns1:TypeSystem.ArgumentOutOfRangeException/axis2ns1:Type/axis2ns1:ExceptionDetail

matan alpha Answered

Please sign in to leave a comment.

10 comments

0
Avatar

Hi Matan,
Can you attach a dump of the message you've sent to the server? your code? In addition, if you have a ref# in the return message, please comment with it.
I see you're using V1 of the SOAP API. The most recent version is V2, documented in https://success.clarizen.com/hc/communities/public/questions/203993838-Clarizen-Web-Services-API-Guide-V2-0
You may also want to check on the REST API, documented in
https://success.clarizen.com/hc/communities/public/questions/203993788-Clarizen-REST-API-Version-2-0

Hope this helps,
Ophir

Ophir Kenig 0 votes
0
Avatar

Hi Ophir.
It is not clear how to attach the source code since I got a "noreply" mail.

matan alpha 0 votes
0
Avatar

ClarizenStub stub =
new ClarizenStub();//the default implementation should point to the right endpoint

    Login login=  new Login();
    LoginOptions opts=new LoginOptions();
    opts.setApplicationId("Sample Java client");
    login.setOptions(opts);

    login.setUserName("user");
    login.setPassword("pwd");
    LoginResponse lr= stub.login(login);
matan alpha 0 votes
0
Avatar

Hi Matan,
Looks like we have a bug that masks the real error. I'll refer it to the R&D team. Meanwhile I can recommend:
1. Use GetServerDefinition before you call Login. It's likely you cannot Login because you call the wrong API server.
2. Use API V2.
Hope this helps,
Ophir

Ophir Kenig 0 votes
0
Avatar

Hi Ophir
Any news?
By the way The .Net client also has stopped work for me.
I am currently getting:
"The remote server returned an error: (407) Proxy Authentication Required"

matan alpha 0 votes
0
Avatar

Hi Matan,
As I wrote previously, you should use GetServerDefinition before trying to Login.
It seems your Clarizen account was moved to the European data center so you're probably getting an error for trying to login to the wrong data center.
It's probably a bug the error is not reported in a coherent way, but there's no need for you to wait until the bug is fixed.
As for the .NET client, as the error suggests your outgoing request is rejected by your internal proxy server.
You should configure your proxy usage of your .NET application. Check out this link:
https://msdn.microsoft.com/en-us/library/kd3cf2ex(v=vs.110).aspx

Hope this helps,
Ophir

Ophir Kenig 0 votes
0
Avatar

Hi Ofir
I tried to call GetServerDefinition.
In .Net client I also set the url back to the clarizen client.
In JAVA client I could not find the method to set the URL.
Can you help me regarding this issue?
Thanks

matan alpha 0 votes