Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

WS test returns: null (row:-1, col:-1)

Hi,

Lately I've been developing web service for SAP Portal. It supposed to return String[][], but instead it gives me a message:

An error has occurred. Maybe the request is not accepted by the server:

null (row:-1, col:-1)

See <a href="http://img809.imageshack.us/img809/4383/webservicenavigatorerro.jpg">print screen</a>

Full Response:

An error has occurred. Maybe the request is not accepted by the server:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >

<SOAP-ENV:Body><rpl:businessMethodResponse xmlns:rpl='urn:DanielTestWSVi'><rpl:Response xmlns:pns='urn:java/lang'>

<pns:String>

<pns:String>OK1333700034238</pns:String>

<pns:String>x</pns:String>

<pns:String>x</pns:String>

<pns:String>x</pns:String>

</pns:String>

<pns:String>

<pns:String>prop1</pns:String>

<pns:String>1</pns:String>

<pns:String>1</pns:String>

<pns:String>1</pns:String>

</pns:String>

<pns:String>

<pns:String>prop3</pns:String>

<pns:String>abc</pns:String>

<pns:String>one</pns:String>

<pns:String>two</pns:String>

</pns:String>

<pns:String>

<pns:String>prop2</pns:String>

<pns:String>1</pns:String>

<pns:String>y</pns:String>

<pns:String>y</pns:String>

</pns:String>

</rpl:Response></rpl:businessMethodResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

XML structure looks just fine. (text formated for clarity)

Part of Java code that generates String[][] result:

(please notice comment)

String[][] result = new String[resultRows.size()][columnCount];

for (int r=0; r<resultRows.size(); r++) {

String[] tmp = (String[])resultRows.get(r);

for (int c=0; c<tmp.length; c++) {

  if (tmp[c]!=null) {

    result[r][c] = tmp[c]; // if instead of tmp[c] i put here null or String "whatever" - web service returns expected array

  } else {

    result[r][c] = "y";

  }

}

Strange, isn't it? I would appriciate any help.

Tags:
Former Member
Former Member replied

Hello everyone,

I got this: it turned out one of Strings in tmp[] was built like this:

tmp[c] = "blah" + myChar + "blah".

myChar was not initialized and that was the problem.

Topic closed.

Regards,

Daniel

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question