users@jax-rpc.java.net

Problems moving from EA1 to EA2

From: YAWN,MICHAEL (HP-Cupertino,ex1) <"YAWN,MICHAEL>
Date: Thu, 11 Apr 2002 16:04:17 -0400

Since I was having several problems, particularly in the use of DII,
I tried updating from the EA1 release to EA2 to see if that resolved
anything. Instead, I appear to have regressed quite a bit.

1. First problem noticed: when the service starts up, I get errors in the
Tomcat output window about log4j not being properly initialized. Are
these warnings, or something I need to fix? I did have to change several
of the jar files being packaged; for example, EA1 had log4j.jar, but EA2
instead has commons-logging.jar.

2. I did attempt to resolve #1 by downloading JWSDP, and using the
Tomcat version bundled there, rather than my separately installed
Tomcat 4.0.1. That does eliminate the log4j messages, but doesn't
fix the real problem (#3 below)

3. The major problem is that I can't make any method calls on my
Stub object. I have a simple init() call that takes no parameters and
returns nothing, it worked fine in EA1. On the EA2 build it fails with
the following lengthy stack trace:

jwork03 % test.sh
before init
javax.xml.soap.SOAPException: Invalid Content-Type:text/html
        at
com.sun.xml.messaging.soap.MessageImpl.verify(MessageImpl.java:159)
        at
com.sun.xml.messaging.soap.MessageImpl.<init>(MessageImpl.java:91)
        at
com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFa
ctoryImpl.java:32)
        at
com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTran
sport.java:143)
        at
com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:64)

        at nfl.application.jaxrpc.JaxRpcStandingsIF_Stub.init(Unknown
Source)
        at nfl.application.jaxrpc.Client.run(Unknown Source)
        at nfl.application.jaxrpc.Client.main(Unknown Source)
java.rmi.RemoteException: HTTP transport error:
javax.xml.soap.SOAPException: Un
able to internalize message; nested exception is:
        HTTP transport error: javax.xml.soap.SOAPException: Unable to
internaliz
e message
HTTP transport error: javax.xml.soap.SOAPException: Unable to internalize
messag
e
        at
com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTran
sport.java:176)
        at
com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:64)

        at nfl.application.jaxrpc.JaxRpcStandingsIF_Stub.init(Unknown
Source)
        at nfl.application.jaxrpc.Client.run(Unknown Source)
        at nfl.application.jaxrpc.Client.main(Unknown Source)

CAUSE:

javax.xml.soap.SOAPException: Unable to internalize message
        at
com.sun.xml.messaging.soap.MessageImpl.<init>(MessageImpl.java:135)
        at
com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFa
ctoryImpl.java:32)
        at
com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpClientTran
sport.java:143)
        at
com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:64)

        at nfl.application.jaxrpc.JaxRpcStandingsIF_Stub.init(Unknown
Source)
        at nfl.application.jaxrpc.Client.run(Unknown Source)
        at nfl.application.jaxrpc.Client.main(Unknown Source)

Anyone understand what happened here? Again, this code all worked in EA1,
so unless there
are code changes required I didn't know about, I'm not sure where to start.

Actually, there were two code changes made due to implementation differences
in EA2:
    My service class name was changed from NFLStandingsImpl to
NFLStandings_Impl
    Syntax for setting the endpoint changed from stub._setTargetEndpoint()
to
          stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, ...)
I mention these just for completeness, I don't see how they can have any
effect such as
the one I'm seeing.

Thanks,
Mike