• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WO with WebServices - Error in Serialization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WO with WebServices - Error in Serialization


  • Subject: WO with WebServices - Error in Serialization
  • From: Daniele Corti <email@hidden>
  • Date: Thu, 30 Oct 2014 17:34:28 +0100

Hi all,
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:

IOException: No serializer found for class org.apache.log4j.Logger in registry org.apache.axis.encoding.TypeMappingDelegate@1896d2c2

  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


I've followed this Guide to prepare the WS: http://wiki.wocommunity.org/display/documentation/Web+Services-Web+Service+Provider

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:definitions targetNamespace="http://imac-di-daniele:8888/cgi-bin/WebObjects/WSTester.woa/ws/ImageUpload" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://imac-di-daniele:8888/cgi-bin/WebObjects/WSTester.woa/ws/ImageUpload" xmlns:intf="http://imac-di-daniele:8888/cgi-bin/WebObjects/WSTester.woa/ws/ImageUpload" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://www.apple.com/webobjects/webservices/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
    <wsdl:types><schema targetNamespace="http://www.apple.com/webobjects/webservices/soap/" xmlns="http://www.w3.org/2001/XMLSchema">
       <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
       <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">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="uploadPicture">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="uploadPictureRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.app.your" use="encoded"/>
      </wsdl:input>
      <wsdl:output name="uploadPictureResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://imac-di-daniele:8888/cgi-bin/WebObjects/WSTester.woa/ws/ImageUpload" use="encoded"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getPictures">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getPicturesRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.app.your" use="encoded"/>
      </wsdl:input>
      <wsdl:output name="getPicturesResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://imac-di-daniele:8888/cgi-bin/WebObjects/WSTester.woa/ws/ImageUpload" use="encoded"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ImageUpload">
    <wsdl:port binding="impl:ImageUploadSoapBinding" name="ImageUpload">
      <wsdlsoap:address location="http://imac-di-daniele:8888/cgi-bin/WebObjects/WSTester.woa/ws/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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: D2W Problem in new application
  • Next by Date: Re: it's not too early is it?
  • Previous by thread: [MEET] Toronto CocoaHeads / tacow - November 12
  • Next by thread: Re: WO with WebServices - Error in Serialization
  • Index(es):
    • Date
    • Thread