0

In JAVA I am consuming (JAX-WS client) .NET webservice that returns data of type string[].

After I consume web service In JAVA, I get object ArrayOfStrings, and I don't have idea what to do with it. This class is generated by wsimport tool.

I need somehow to convert it to String[]

I tried to change web service to return List, but in java, resulting data is always of type ArrayOfStrings.

Is there a way to receive List or Array in JAVA?

.NET

    [WebMethod]
    public List<string> GetListADocuments(string code)
    { ... }

JAVA:

    WebServiceSoap service = client.getWebServiceSoap();
    result = service.getListADocuments(code);

Thanks

1
  • Please stop shouting Java Commented Jan 24, 2013 at 0:23

2 Answers 2

1

Doesn't it have a method result.getString()? that return a String[] or List

Sign up to request clarification or add additional context in comments.

1 Comment

Uh, there is method getString() available. It returns the List<String>. Somehow I refused to notice it. Thanks.
0

Get its length, make a String[] the same length, iterate over ArrayOfStrings' contents, fill String[] with it. If ArrayOfStrings' has any methods that return a String[] directly, of course use that instead.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.