i have created a very simple web service using doc/literal encoding to try to test 
string arrays.  my very simple example as a single method:

        public Bean execute(Bean bean) {
                return bean;
        }

a Bean is simply:

        public class Bean {
                private String[] foo;
        }

i am using the Java2WSDL and WDSL2Java utilities to create all the stub code.  my 
client is simply:

                Bean bean = new Bean();
                bean.setFoo(new String[]{"a", "b", "c"});
                MainIF m = (MainIF)service.gettest();
                Bean response = m.execute(bean);

i get an error when the client runs:
org.xml.sax.SAXException: Found character data inside an array element while 
deserializing

and the request XML looks wrong:
        <?xml version="1.0" encoding="UTF-8"?>
        <soapenv:Envelope                                                       
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";       
xmlns:xsd="http://www.w3.org/2001/XMLSchema";    
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <soapenv:Body>
                <bean xmlns="urn:paymentech.com">
                        <foo xsi:type="ns1:ArrayOf_xsd_string" xmlns="" 
xmlns:ns1="urn:paymentech.com">d</foo>
                        <foo xmlns="">e</foo>
                        <foo xmlns="">r</foo>
                </bean>
        </soapenv:Body>
        </soapenv:Envelope>

does anyone know how to make string arrays work correctly with doc/literal encoding?

thanks,
steve
  
Learn more about Paymentech's payment processing services at www.paymentech.com
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are proprietary 
and confidential information intended only for the use of the recipient(s) named 
above.  If you are not the intended recipient, you may not print, distribute, or copy 
this message or any attachments.  If you have received this communication in error, 
please notify the sender by return e-mail and delete this message and any attachments 
from your computer.
..

Reply via email to