Skip to Content
author's profile photo Former Member
Former Member

Web service: Serial/Deserialization problem - using Netweaver DS and Axis

I made my own Web Service. This web service has two operation - the first one returns s string and second one returns a bean. This was done by using Netweaver DS. Result of this phase was wsdl file and running service on portal (I examine this by Netweaver`s tool Portal Web Services Checker and it works).

Then I forwarded wsdl file to Apache Axis tool - it generates java files for me. By using these files I can acces my web service.

I can access first operation (return value is String) without any problems, but when I'm trying to access second operation, i get this exception:

"org.xml.sax.SAXException: Deserializing parameter 'response': could not find deserializer for type IMyTime"

IMyTime is my bean and time.ws.jhg.cz reversed package name.

Can anybody help me?

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2004 at 08:06 AM

    Does this exception occur in your client code (the one generated with axis)? Then I would assume a problem with the axis generation.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi

      The .jar files that are required at a minimum are

      activation.jar, exception.jar, jaxm.jar, jaxrpc-api.jar, mail.jar, sapj2eeclient.jar, sapxmltoolkit.jar, tc_sec_wssec_lib.jar, webservices_api.jar, webservices_lib.jar

      Most of these can be found within the NW developer studio plugins at various different places

      I hope this helps

      Darrell

  • Posted on Oct 20, 2004 at 11:49 AM

    There are incompatibilities between AXIS and the NW libraries because in the inqmysoap.jar library, there are some classes which belongs to the javax.xml package that have been modified (not a good idea isn't it ?), and then, since the inqmysoap.jar lib has priority on your AXIS lib, it will try to run the code with a modified version of a class from javax.xml package and you'll get an exception.

    So if possible, as already mentioned, please rather use the NW DS plugin to generate the proxy classes.

    Regards,

    Xavier

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2004 at 01:36 PM

    Hi,

    yet another one:

    if your client proxy classes are contained within your portalapp, try

    Thread thread = Thread.currentThread();

    ClassLoader oldContextClassLoader = thread.getContextClassLoader();

    thread.setContextClassLoader(this.getClass().getClassLoader());

    // do your actions here

    // and after doing IT, reset to the old context classloader

    thread.setContextClassLoader(oldContextClassLoader);

    The problem you encounter maybe because your axis 'deserializer factory' or however it's called may not find your classloader, as it has possibly been loaded by a parent classloader than your .par classloader. 8|

    Regards,

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2004 at 09:24 AM

    Hi,

    We are alos facing same kind of problem but within WAS only.

    We have a webservice which has a method with parameter as userdefined object.(UserDetail.class).

    But If I test the same webservice from EP perspective using enterprise portal webservice checker it gives below error message.

    <faultcode>SOAP-ENV:Client</faultcode>

    <faultstring>Deserializing fails. Nested message: XML Deserialization Error. Can not create instance of class [NULL] when deserializing XML type [][UserDetail]..</faultstring>

    Web service was developed using the ND studio and deployed.

    While accessing from portal client also getting deserialisation error.

    Do we need to do any specific configuration while using userdefined types.

    Thanks in advance,

    Abdul Raheem .S

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.