HI,
  I'm using Apache SOAP 2.2 and I'm trying to serialize an array. The return
type is LITERAL_XML, but the params are NS_URI_SOAP_ENC. I get the dreaded 
No Serializer found to serialize a 'java.lang.String' using encoding style
'http://xml.apache.org/xml-soap/literalxml'.  Does anyone know if this has
been fixed or am I doing something wrong in my client? I've pulled the
soap.jar from the nightly build and my client still has the same problem.
Any insight would be greatly appreciated. Thanks in advance.


   // Set return Type to be org.w3c.dom.Element
    call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);

    call.setTargetObjectURI ("urn:someSvc");
    call.setMethodName ("someMethod");

    String [] planTypeArr = new String[2];
    String [] planCodeArr = new String[2];

    planTypeArr[0] = "STR1";
    planTypeArr[1] = "STR2";
    planCodeArr[0] = "STRING1";
    planCodeArr[1] = "STRING2";

    Vector params = new Vector ();    
    params.addElement(new Parameter("planTypeArray", String[].class,
                                    (String [])planTypeArr, 
                                    Constants.NS_URI_SOAP_ENC));
    params.addElement(new Parameter("planCodeArray", String[].class,
                                    (String [])planCodeArr, 
                                    Constants.NS_URI_SOAP_ENC));
    call.setParams (params);
    . . . 
    Response resp = call.invoke (/* router URL */ url, /* actionURI */ "" );


Reply via email to