0

I have a string which is xml data which is very nicely indented and well formed.

Dim xmlstring as string

I am trying to pass the above mentioned string to a Java Web Service but the input parameter datatype is string array. I am converting the string to string array as shown below

localws.receiveNotification("TestQueue", xmlstring.ToString().Split(CChar("")))

As the datatype for the input parameter in the above webservice is string() array for some reason my XML data is getting messed up and lot of elements are breaking and appearing in two lines and my xml data is no more well formed.

Thanks in advance

1 Answer 1

1

Have you tried wrapping the string in a string array.. IE:

localws.receiveNotification("TestQueue", New String() { xmlstring })

Is possible that the service is expecting an array of xml documents or something to that degree? If so it might each entire xml string that you have as a single element of an array.

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

3 Comments

The string accepts just one string array not array of xml docs
When I said xml documents I was referring to an xml document as a string. If the definition for the parameter in the service is a string array then chances are it isn't looking to accept a char array. I would give a shot to wrapping your string in an array (like the example posted) and noting how the service handles processing that.
Sorry it didn't work for you, without further information about your string, the service, it's intentions and the definition it will be fairly difficult to help you solve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.