bill zhang [
http://community.jboss.org/people/billzhang1123] created the discussion
"consume web service with complex data type"
To view the discussion, visit:
http://community.jboss.org/message/537851#537851
--------------------------------------------------------------
I have been playing with webservice_consumer1 sample in JBoss ESB. I modified the sample
code to invoke another web service which has an array of string as input parameter along
with another String type paramter. Here is my code of process method in
webservice_consumer1 MyRequestAction method. No changes on jboss-esb.xml.
public Message process(Message message) throws Exception
{
logHeader();
String msgBody = (String) message.getBody().get();
* HashMap requestMap = new HashMap();
String[] arrayOfStr = new String[2];
arrayOfStr[0] = "b";
arrayOfStr[1] = "b1";*
*
requestMap.put("sayHello.arg1.name", "vicky");
requestMap.put("sayHello.arg1.kids", arrayOfStr);
*
*message.getBody().add(requestMap);
}
*After I ran the SendJMSMessage, on the web service side I can see the incoming value of
name which is a String type. However web service can only see the number of elements but
not the values. If I use SOAPUI to call the service I can see the array of kids that I
send.*
*Therefore, I guess the use of 'requestMap.put("sayHello.arg1.kids",
arrayOfStr);' is wrong for array as input. Can someone please give me a hint of how to
send an array of string using HashMap? Thanks.**
*
****
*
*
*
*
*
**
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/537851#537851]
Start a new discussion in JBoss ESB Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]