cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with login into the BI Platform Server Using REST Web Services SDK

Former Member
0 Kudos

Hi

I am trying to run the following command on SP5 Patch8

curl -i -X "POST" -H "content-type: application/xml" -H "accept: application/xml" -d "E:\login.xml" http://localhost:6405/biprws/logon/long | find "X-SAPLogonToken: " > xsaplogontoken.txtfor /f "tokens=1,2 delims= " %a in (xsaplogontoken.txt) do @echo %b > xsaplogontoken.txt

The output is

Access Denied

When i tried to run the following command its giving the error followed, I have place login.xml in E drive

curl -i -X "POST" -H "content-type: application/xml" -H "accept: application/xml" -d "E\login.xml" http://localhost:6405/biprws/logon/long

Output:


HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
Date: Fri, 07 Jun 2013 02:59:20 GMT
Content-Type: application/xml
Content-Length: 3918

<error>
    <error_code>RWS 000079</error_code>
    <message>Please validate your input. (RWS 000079)</message>
    <stack_trace>com.sap.bip.rs.exceptions.InvalidEntSessionException&#13;
        at com.sap.bip.rs.exceptions.InvalidEntSessionException.InvalidInput(Inv
alidEntSessionException.java:99)&#13;
        at com.sap.bip.rs.session.SessionFactory.getSession2(SessionFactory.java
:53)&#13;
        at com.sap.bip.rs.infostore.LogonResource.doLongFormLogon(LogonResource.
java:231)&#13;
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&#13;
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)&#13;
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)&#13;
        at java.lang.reflect.Method.invoke(Method.java:597)&#13;
        at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(Abst
ractInvoker.java:173)&#13;
        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker
.java:89)&#13;
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:153)&#13;
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:87)&#13;
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInv
okerInterceptor.java:58)&#13;
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)&#13;
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)&#1
3;
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)&#13;
        at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecu
tor.java:37)&#13;
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Se
rviceInvokerInterceptor.java:106)&#13;
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:255)&#13;
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:113)&#13;
        at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDes
tination.java:97)&#13;
        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
ServletController.java:461)&#13;
        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
roller.java:149)&#13;
        at com.sap.bip.rs.server.servlet.BIPServletController.invoke(BIPServletC
ontroller.java:90)&#13;
        at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCX
FServlet.java:148)&#13;
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Ab
stractHTTPServlet.java:179)&#13;
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractH
TTPServlet.java:103)&#13;
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)&#13;
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(Abstract
HTTPServlet.java:159)&#13;
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)&#13;
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)&#13;
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)&#13;
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)&#13;
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)&#13;
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)&#13;
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
555)&#13;
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)&#13;
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:298)&#13;
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:852)&#13;
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:588)&#13;
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
9)&#13;
        at java.lang.Thread.run(Thread.java:722)&#13;
</stack_trace>
</error>

I am able to read the file successfully using

curl -G http://<serverName>:6405/biprws/logon/long -H accept="application/xml"

Please let me know what acn be the issue

Regards,

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi all,

I have resolved this. issue is with login.xml file and command prompt was run not as admin. I got the token successfully now. I am eagerly waiting for 4.1 Release now.

Regards,

Praveen

former_member189544
Contributor
0 Kudos

Praveen,

good to hear. Further enhancements, especially in WebI Restful WS SDK, are already available with Service Pack 6 for BI 4.0 now.

Regards,

Harald

Answers (2)

Answers (2)

Former Member
0 Kudos

Praveen/Harold, we are having the same issue too and did what you suggested: running the curl as Administrator. But we are out of luck. Reading the documentation, it seems there is a problem with our xml file that is fed to Curl.

Here's my Curl command:

curl -v -i --trace-ascii trace -X "POST"  -H "content-type: application/xml" -H "accept: application/xml" -d "@cr.xml" http://TXLPHQSBOBJ01T.usdom1.ad:6405/biprws/logon/long

And this is the content of the cr.xml file:

<attrs xmlns="http://www.sap.com/rws/bip">

<attr name="userName" type="string"/>user1</attr>

<attr name="password" type="string"/>5thtry</attr>

<attr name="auth" type="string" possibilities="secEnterprise,secLDAP,secWinAD,secSAPR3">secEnterprise</attr>

</attrs>

And here is the top few lines of the Java Stack Trace:

== Info: About to connect() to TXLPHQSBOBJ01T.usdom1.ad port 6405 (#0)

== Info:   Trying 10.253.2.146... == Info: connected

== Info: Connected to TXLPHQSBOBJ01T.usdom1.ad (10.253.2.146) port 6405 (#0)

=> Send header, 232 bytes (0xe8)

0000: POST /biprws/logon/long HTTP/1.1

0022: User-Agent: curl/7.19.3 (i386-pc-win32) libcurl/7.19.3 OpenSSL/0

0062: .9.8j zlib/1.2.3

0074: Host: TXLPHQSBOBJ01T.usdom1.ad:6405

0099: content-type: application/xml

00b8: accept: application/xml

00d1: Content-Length: 267

00e6:

=> Send data, 267 bytes (0x10b)

0000: <attrs xmlns="http://www.sap.com/rws/bip"><attr name="userName"

0040: type="string"/>Administrator</attr><attr name="password" type="s

0080: tring"/>nustar01</attr><attr name="auth" type="string" possibili

00c0: ties="secEnterprise,secLDAP,secWinAD,secSAPR3">secEnterprise</at

0100: tr></attrs>

<= Recv header, 27 bytes (0x1b)

0000: HTTP/1.1 401 Unauthorized

<= Recv header, 27 bytes (0x1b)

0000: Server: Apache-Coyote/1.1

<= Recv header, 37 bytes (0x25)

0000: Date: Thu, 12 Dec 2013 15:40:25 GMT

<= Recv header, 31 bytes (0x1f)

0000: Content-Type: application/xml

<= Recv header, 22 bytes (0x16)

0000: Content-Length: 4356

<= Recv header, 2 bytes (0x2)

0000:

<= Recv data, 2774 bytes (0xad6)

0000: <error>

0009:     <error_code>RWS 000079</error_code>

0032:     <message>Please validate your input. (RWS 000079)</message>

0073:     <stack_trace>com.sap.bip.rs.exceptions.InvalidEntSessionExce

00b3: ption&#13;

00bf: .at com.sap.bip.rs.exceptions.InvalidEntSessionException.Invalid

00ff: Input(InvalidEntSessionException.java:63)&#13;

012f: .at com.sap.bip.rs.infostore.LogonResource.doLongFormLogon(Logon

016f: Resource.java:261)&#13;

0188: .at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)

01c8: &#13;

01cf: .at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe

020f: thodAccessorImpl.java:25)&#13;

022f: .at java.lang.reflect.Method.invoke(Method.java:597)&#13;

026a: .at org.apache.cxf.service.invoker.AbstractInvoker.performInvoca

02aa: tion(AbstractInvoker.java:173)&#13;

02cf: .at org.apache.cxf.service.invoker.AbstractInvoker.invoke(Abstra

030f: ctInvoker.java:89)&#13;

Here's what I think, but I dont know why it is not working though:

1. It seems the curl reads in the xml payload just fine

2. For same reason when it comes to one of Java modules, it throws off an exception for invalid input. There is no specific as to what is invalid

3. I have checked in CMC that the user is valid and I can login just fine either to CMC or Launchpad using the same credentials

I am curious as to what went wrong with the xml file that you feed to Curl. Anything that you fixed in the file? Does BOBJ have different set of web service users that are different from the CMC's?

BTW, our BOBJ is a trial version, not sure if that makes a difference.

Any help is appreciated.

Franz

Former Member
0 Kudos

Hi,

I'm trying to authenticate using rest by using the URL http://fmsapbo205:6405/biprws/logon/adsso

using REST client app.

i get the same error as "/" and when i read through network traces, i get the error "Please validate your input. (RWS 000079)"

can some one guide me as to where the extra "/" is?

Thanks in advance

Dilkush

former_member189544
Contributor
0 Kudos
Hi Praveen,
try -d "@login.xml" instead of -d "e:\logon.xml".
As per the CURL documentation you need to have the @ to tell curl that you want to read the input from a file. See also: http://curl.haxx.se/docs/manpage.html
Regards,
Harald