You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Melzer, Steven" <St...@paymentech.com> on 2004/09/09 14:13:29 UTC

arrays problem

all,

i have been trying to create a web service (only my second one) that requires arrays from the client to the web service.  for complete compatibility, i am using document/literal.  i have tried to do this with both axis 1.1 and axis 1.2beta.

my web service uses a complex object as a parameter.  this object is a class that contains some arrays.  one array is an array of strings, and another array is an array of custom objects (this custom object is flat though).

public class Merchant {
...
    private String[] cardBrandID;
    private MerchantContact[] contacts;
...

i created my java classes first, then ran the java2wsdl utility.  this wsdl looked fine and created all the stubs and skeletons when run through wsdl2java.  

here is the array definition in the wsdl:
   <complexType name="ArrayOf_xsd_string">
    <complexContent>
     <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
     </restriction>
    </complexContent>
   </complexType>

   <complexType name="Merchant">
    <sequence>
	...
     <element name="cardBrandID" nillable="true" type="impl:ArrayOf_xsd_string"/>
	...

i took this same wsdl to create the client side.  all worked and compiled fine.

my problem is only one item in the array is seen by the server.  the SOAP message looks wrong, when you use TCPMon to see it.

<?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>
  <insertMerchantParameter xmlns="urn:boarding.gateway.ws.paymentech.com">
   <ECPAuthMethod xmlns="">ecp auth</ECPAuthMethod>
   ...
   <cardBrandID xsi:type="ns1:ArrayOf_xsd_string" xmlns="" xmlns:ns1="urn:boarding.gateway.ws.paymentech.com">2</cardBrandID>
   <cardBrandID xmlns="">28</cardBrandID>
   <cardBrandID xmlns="">22</cardBrandID>
   <cardBrandID xmlns="">11</cardBrandID>
   ...

thoughts?

thanks in advance, i am pulling my hair out,
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.
..