geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lin Sun (JIRA)" <j...@apache.org>
Subject [jira] Commented: (GERONIMO-3045) Unable to run jax-rpc war test with Axis2
Date Tue, 03 Apr 2007 18:06:32 GMT

    [ https://issues.apache.org/jira/browse/GERONIMO-3045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486446
] 

Lin Sun commented on GERONIMO-3045:
-----------------------------------

Jarek, I tried to make change at the JAX-WS level as I don't think we should call parseWebServiceDescriptor
at all if it is JAX-RPC based webservices.xml.  However, I didn't handle the case when web.xml
isn't there as the servletTypes will be null.

The new patch is to revert the changes at JAX-WS level and ignore the xmlbeans xmlexception
in Axis2Builder.

I tried to check if namespaceURI equals "http://java.sun.com/xml/ns/javaee" first but it is
hard for me to get xbeans to do what I want.   

Here's what I had: 

            XmlObject xobj = XmlObject.Factory.parse(in);
            SchemaType st = xobj.schemaType();
            
            cursor = xobj.newCursor();
            cursor.toStartDoc();
            cursor.toFirstChild();
            if ("http://java.sun.com/xml/ns/javaee".equals(cursor.getName().getNamespaceURI()))
{
            //the checking is needed as we also send JAX-RPC based webservices.xml here
            //if (xobj instanceof WebservicesDocument) {  
                WebservicesType wst = WebservicesDocument.Factory.parse(in).getWebservices();

it turned out the xobj isn't instanceof WebservicesDocument, so I cannot cast it to WebservicesDocument.

The above if statement works fine, but the inputstream isn't at the right position so calling
the following after if 

            WebservicesType wst = WebservicesDocument.Factory.parse(in).getWebservices();

will fail.   I tried to use inputstream.mark and .reset but these two methods aren't supported.

Thus I decided just to ignore the xmlexception unless someone has a better solution.

Thanks, Lin




> Unable to run jax-rpc war test with Axis2
> -----------------------------------------
>
>                 Key: GERONIMO-3045
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3045
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: webservices
>    Affects Versions: 2.0-M5
>         Environment: 1.5 SUN SDK + WIN XP
>            Reporter: Lin Sun
>         Assigned To: Lin Sun
>             Fix For: 2.0-M5
>
>         Attachments: G3045.patch
>
>
> When running the jax-rpc war test with axis2, both test failed due to an exception thrown
when parseWebServiceDescriptor is called.
> from reading the code, if webservices.xml doesn't exist, we call discoverwebservices,
which will check if the class has annotation. if webservices.xml exists, we 'll just call
parseWebServiceDescriptor, which caused the error for axis2 because axis2 moved to xbeans.
> The fix is to check if annotation exists when webservices.xml exists also.   Tested the
fix and able to pass the 2 jax-rpc war test test with them.   Will attach the patch after
a full build.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message