Shelli, 

I'm not a big fan of soap encoded arrays, but I used to use them alot and I 
may be able to help. Doc / Lit is the way things are going. Nevertheless, try 
posting your original wsdl, and mention where you want to put your String 
array. Chances are though, your wsdl may be fine. 

Your Deserialization Error may just mean that your client can't find the wsdl 
or its mapping. It can be a tricky problem. Try searching for 
org.apache.axis.encoding.ser.BeanSerializerFactory and 
org.apache.axis.encoding.ser.BeanDeserializerFactory . 

HTH,
iksrazal

Em Sexta 06 Janeiro 2006 21:09, o Shelli D. Orton escreveu:
> I should have mentioned in the original post, that with the second WSDL,
> there is no SOCArray class.  The Java methods receive/pass a String[]
> array. I was hoping by changing to that I wouldn't have the deserialization
> error I'm getting.
>
> Thanks again,
> Shelli
>
> -----Original Message-----
> From: Shelli D. Orton [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 06, 2006 3:57 PM
> To: [email protected]
> Subject: Deserialization(?) Error on String Array
>
>
> Hi,
>
> I have to make some modifications to an existing (working) webservice.  We
> needed to add a new parameter to one of the existing methods, an array of
> strings.  I originall created a a new type as follows in the WSDL:
>
>     <wsdl:types>
>         <xsd:schema
> targetNamespace="http://clearmode.com:80/ws/ConsumerProvision";
>           xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>
>             <xsd:element name="SOCArray">
>                 <xsd:complexType>
>                     <xsd:sequence>
>                         <xsd:element name="SOC" type="xsd:string"
> maxOccurs="unbounded"/>
>                     </xsd:sequence>
>                 </xsd:complexType>
>             </xsd:element>
>
>         </xsd:schema>
>     </wsdl:types>
>
> and added it to the message definiton:
>
>     <wsdl:message name="addRequest">
>         <wsdl:part name="username" type="xsd:string"/>
>         <wsdl:part name="password" type="xsd:string"/>
>         ...
>         <wsdl:part name="gender" type="xsd:string"/>
>         <wsdl:part name="state" type="xsd:string"/>
>         <wsdl:part name="timeZone" type="xsd:string"/>
>         <wsdl:part name="SOCs" element="impl:SOCArray"/>
>     </wsdl:message>
>
> When I ran WSDL2Java, it created an SOCArray class.  During testing of the
> modified service, I get the following error when I try to call the
> addRequest:
>
>
> Exception caught: java.lang.reflect.InvocationTargetException
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: java.lang.reflect.InvocationTargetException
>  faultActor:
>  faultNode:
>  faultDetail:
>       {http://xml.apache.org/axis/}hostname:localhost
>
> java.lang.reflect.InvocationTargetException
>       at
> org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:
>2 21)
>       at
> org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:1
>2 8)
>       at
> org.apache.axis.encoding.DeserializationContext.endElement(DeserializationC
>o ntext.java:1087)
>       at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
>       at org.apache.crimson.parser.Parser2.content(Unknown Source)
>       at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
>       at org.apache.crimson.parser.Parser2.content(Unknown Source)
>       at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
>       at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
>       at org.apache.crimson.parser.Parser2.parse(Unknown Source)
>       at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
>       at javax.xml.parsers.SAXParser.parse(Unknown Source)
>       at
> org.apache.axis.encoding.DeserializationContext.parse(DeserializationContex
>t .java:227)
>       at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
>       at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
>       at
> org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandCh
>e cker.java:62)
>       at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
>       at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
>       at org.apache.axis.client.Call.invoke(Call.java:2748)
>       at org.apache.axis.client.Call.invoke(Call.java:2424)
>       at org.apache.axis.client.Call.invoke(Call.java:2347)
>       at org.apache.axis.client.Call.invoke(Call.java:1804)
>       at
> com.wmode.clearmode.applications.provisioningengine..ConsumerProvisionSoapB
>i ndingStub.add(ConsumerProvisionSoapBindingStub.java:119)
>       at
> com.wmode.clearmode.applications.provisioningengine.ClientTest.main(ClientT
>e st.java:111)
>
> Since I couldn't figure out what the serialization problem was, I modified
> the WSDL again to define the type like this:
>
>     <wsdl:types>
>         <xsd:schema
> targetNamespace="http://clearmode.com:80/ws/ConsumerProvision";
>                     xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>             <xsd:complexType name="SOCArray">
>                 <xsd:complexContent>
>                     <xsd:restriction base="soapenc:Array">
>                         <xsd:attribute ref="soapenc:arrayType"
> wsdl:arrayType="xsd:string[]"/>
>                     </xsd:restriction>
>                 </xsd:complexContent>
>             </xsd:complexType>
>         </xsd:schema>
>     </wsdl:types>
>
> and the message to be:
>
>     <wsdl:message name="addRequest">
>         <wsdl:part name="username" type="xsd:string"/>
>         <wsdl:part name="password" type="xsd:string"/>
>         ...
>         <wsdl:part name="gender" type="xsd:string"/>
>         <wsdl:part name="state" type="xsd:string"/>
>         <wsdl:part name="timeZone" type="xsd:string"/>
>         <wsdl:part name="SOCs" type="impl:SOCArray"/>
>     </wsdl:message>
>
> I am still getting the same error as before when I try to call the add
> method.  I've looked for solutions on the net, but the error message is
> pretty vague, so it's not an easy search.
>
> Can anybody help me identify what I'm doing wrong?
>
> Thanks in advance,
> Shelli

-- 
http://www.braziloutsource.com/

Reply via email to