I'm trying to produce a WebService that create and return a list of ERXGenericRecord.
The WS works correctly (I can create the Record in the DB passing the parameter I need to create it). But when I call the other action, that return all the objects from an entity, and try to return a NSarray with the Objects fetched from the DB, I get this error:
at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1507)
at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
at org.apache.axis.encoding.SerializationContext.outputMultiRefs(SerializationContext.java:1055)
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:145)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:478)
at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:632)
at org.apache.axis.Message.getSOAPPartAsString(Message.java:412)
... skipped 10 stack elements
Because, the WS is serializing a complextype I've added also added the Factories for the EO.
WOWebServiceRegistrar.registerFactoriesForClassWithQName(
new BeanSerializerFactory(TestPicture.class, new QName("http://ws.app.your", "TestPicture")),
new BeanDeserializerFactory(TestPicture.class, new QName("http://ws.app.your", "TestPicture")),
TestPicture.class, new QName("http://ws.app.your", "TestPicture"));
WOWebServiceRegistrar.registerWebService("ImageUpload", ImageUpload.class, true);
Where TestPicture is my EO class, and ImageUpload is my WS.
The WS class ImageUpload has two methods:
public static boolean uploadPicture(String datas);
public NSArray<TestPicture> getPictures();
The WSDL is shown correctly, but I don't see the definition for the Complex Type:
<?xml version="1.0" encoding="UTF-8"?>
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<complexType name="NSArray">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>
</restriction>
</complexContent>
</complexType>
</schema></wsdl:types>
<wsdl:message name="getPicturesResponse">
<wsdl:part name="getPicturesReturn" type="tns1:NSArray"/>
</wsdl:message>
<wsdl:message name="uploadPictureRequest">
<wsdl:part name="datas" type="soapenc:string"/>
</wsdl:message>
<wsdl:message name="uploadPictureResponse">
<wsdl:part name="uploadPictureReturn" type="xsd:boolean"/>
</wsdl:message>
<wsdl:message name="getPicturesRequest">
</wsdl:message>
<wsdl:portType name="ImageUpload">
<wsdl:operation name="uploadPicture" parameterOrder="datas">
<wsdl:input message="impl:uploadPictureRequest" name="uploadPictureRequest"/>
<wsdl:output message="impl:uploadPictureResponse" name="uploadPictureResponse"/>
</wsdl:operation>
<wsdl:operation name="getPictures">
<wsdl:input message="impl:getPicturesRequest" name="getPicturesRequest"/>
<wsdl:output message="impl:getPicturesResponse" name="getPicturesResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ImageUploadSoapBinding" type="impl:ImageUpload">
<wsdl:operation name="uploadPicture">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="uploadPictureRequest">
</wsdl:input>
<wsdl:output name="uploadPictureResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getPictures">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="getPicturesRequest">
</wsdl:input>
<wsdl:output name="getPicturesResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ImageUpload">
<wsdl:port binding="impl:ImageUploadSoapBinding" name="ImageUpload">
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I really have no idea of what I am wrong... Googling the error, I've not found something useful...
Thanks in advance for any help!
--
Daniele Corti
--
I DON'T DoubleClick