YF Authentication Error (Error code - 25) from .NET code

Avijit Samanta shared this problem 6 years ago
Resolved

Hi, we are trying to integrate our .NET application with YF web service, specifically Admin web service. We are already using YF for our production analytics services. We read the documentation and some forum help and tried to build a PoC. But, getting Error Code:25 (Auth err). Though we are able to successfully login with same id/pwd as used in code. The user id has Administrator role and it has "web services" enabled. I am attaching my code.

Please let us know the solution ASAP. It is a blocker item for us.

96a6fe1b6d2fc7a31b717535f9753802

version-

4d66033e7bbbdd8f2941807c633d6859

references-

http://wiki.yellowfin.com.au/display/USER73Plus/Web+Services

http://wiki.yellowfin.com.au/display/USER73Plus/Administration+Service

http://wiki.yellowfin.com.au/display/USER73Plus/Web+Services+Exceptions

https://www.yellowfinbi.com/resources/forum/YFForum-dot-Net-Net-integration-thread-110922

Replies (8)

photo
1

Hello Avijit,


We're sorry to hear that you have been having some issues with .Net integration and webservices.


The good news is we have seen this before and I think we have a solution for you!


When using .NET, Yellowfin/Tomcat default to using the Axis datatype system, this system doesn't map the datatypes correctly.

The solution is to make a change in the web.xml file to enable JAX webservices over Axis.


find the following section in the web.xml file and remove the comment tags to make it active:


  <!-- Uncomment this section to enable JAX-WS Web Services. Java 1.6+ only

  <listener>
        <listener-class>
                com.sun.xml.ws.transport.http.servlet.WSServletContextListener
        </listener-class>
  </listener>

  <servlet>
		<servlet-name>WebServices</servlet-name>
		<servlet-class>
    		com.sun.xml.ws.transport.http.servlet.WSServlet
		</servlet-class>
  </servlet>
  <servlet-mapping>
		<servlet-name>WebServices</servlet-name>
		<url-pattern>/webservices/*</url-pattern>
  </servlet-mapping>

  -->


once you have enabled it and restarted Yellowfin service, you can get further information here:


http://[yellowfin server]:[port]/webservices/Hello


This should guve you a screen similar to the one below containg the WSDL information:

How-to-enable-JAX-web-services-158117-16275


I hope this helps and allows you to get this working correctly!

Best regards,

Pete

photo
1

Thanks Peter, will check it tomorrow and will update it here

photo
1

Hi Peter, I have updated the web.xml (attached) and restarted yellowfin service + VM. Still I am getting the same error (25)

Files: web.xml
photo
photo
1

Hello Avijit,


Thank you for the update.


Can you please send a screenshot of the "webservices/Hello" page?

I would like to check the info that is on there.


As this system is a cluster, have the changes been made to all nodes?


Best regards,

Pete

photo
1

Hi Peter, right now one node/vm is shutdown & de-allocated and not in use. Other node is up and running. I have changed the file only for the running VM node.

photo
1

Hello Avijit,


I am having to escallate this issue to one of our specialists in webservices, as soon as I have more information, I'll update this ticket.


Best regards,

Pete

photo
1

Hello Avijit,


I have an update from one of my colleagues which is worth investigating:


I see something there that is worth investigating....he says that the "user id has Administrator role", and yet in his code he is using the email address and not the user id to log in (i.e. "admin@yellowfin.com.au" instead of "admin"). Of course this may just be a different understanding of terminology, or he may have set his "admin@yellowfin.com.au" to actually have a User Id of "admin@yellowfin.com.au", but nevertheless, it is certainly worth following up. Ask him if his Logon ID setting in Configuration->Authentication is set to Email Address or User Name. Then check what the user id is for his admin user.


Please take a look and confirm that you have the correct username in place and let us know!


If this doesn't work, we will need to investigate the mapped data-types again, but brom a different angle.


Best regards,

Pete

photo
1

Hi Pete, I checked the suggested approach. It is set to "email address" I am using the same email address to login in portal. Please check the attached screenshots.

photo
1

Hi Avijit,


As the last suggestion didn't work, we will need to look at mapping of data-types a bit further.


Would it be possible for you to use wireshark to grab some info about the XML that is being sent to-from they system on both sides (.NET -> Yellowfin and JSP -> Yellowfin)


Our knowledgable local developer is back in the office from Monday, so I can follow up with him then to hopefully get you a working solution if the above doesn't work!


Best regards,

Pete

photo
1

Hi Peter, I couldn't do much on server side as my access is restricted with any using or installing any software. I tried to use inbuilt "tcpdump" in yf server also tried to change permission. Nothing worked.

I went ahead of capturing request/response data from my development machine from where I am calling the service. Here is the raw data (req/resp) attached.

Also, this is a temp dev box. If it helps, I can share the yf password to review admin settings and other details in private.

photo
1

Hi Peter, Any update?

photo
1

Hello Avijit,


Sorry for the delay, we have had a further look at your tcp info and there doesn't seem to be any OrgID information passed.


When using the API, populate the "OrgID" element with "1".


This should be included for correct functionality.


Please let us know if this resolves the issue.

Best regards

Pete

photo
1

Hi Peter,

Thanks for that observation. Though I was setting the value in code, it was not serializing the XML request data properly to Yellowfin. After I fixed this issue, I tested with couple of API services and it is working now.


Also, just wanted to check with you. If YF has support for REST APIs/services or will be available in later versions.

photo
1

Hi Avijit,


I'm really happy to hear that you have got it working!

I have had a chat with one of devs and REST integration will be happening but it's likely timescale is 12-18 months (possibly more)

Once the RESTful system will be in place, it will reference all aspects of tasks from the GUI.


I hope this helps,

Best regards,

Pete

photo
1

That's great

photo
Leave a Comment
 
Attach a file