Deploying to Weblogic 10.3.1

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Deploying to Weblogic 10.3.1

Andreas Loew
Joe,

Carl Roberts schrieb:

> I have this working in Weblogic 10.3.1.

glad that I was able to put you on the right track :-)

> So, as a workaround, in my ear file, I copied the META-INF\services
> directory from webservices-rt.jar to earFile\META-INF\metro-services
> and I then renamed the lookup path inside ServiceFinder.java to be
> META-INF\metro-services instead of META-INF\services.  This is the
> only way I could override the META-INF\services entries in
> weblogic.jar without touching that jar file or modifying the startup
> script for Weblogic.

Have you already tried adding

  <package-name>META-INF.*</package-name>

or

  <package-name>META-INF.services.*</package-name>

below "<prefer-application-packages>"?

If the Weblogic implementation of overriding classloader delegation does
its job correctly, I would assume that this should work and saves you
the additional pain of fiddling around with renaming META-INF\services
to META-INF\metro-services.

Good luck & best regards,

Andreas

--
Andreas Loew
Senior Java Architect
Sun Microsystems (Germany)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Deploying to Weblogic 10.3.1

Harold Carr
Hello Joe,

Would it be possible for you to write up a step-by-step procedure for this?

Thanks,
Harold

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
Hi Harold,

I will have one for you by tomorrow.

Thanks,

Joe

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Wednesday, July 15, 2009 1:10 PM
To: [hidden email]
Cc: [hidden email]
Subject: Re: Deploying to Weblogic 10.3.1

Hello Joe,

Would it be possible for you to write up a step-by-step procedure for this?

Thanks,
Harold


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Deploying to Weblogic 10.3.1

Harold Carr
thanks,
h


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
Here are the steps to use the Metro 2.0 JAX-WS implementation instead of Oracle's JAX-WS implementation in Weblogic 10.3.1.0 without affecting the Weblogic domain or other applications under the same domain:

These instructions do not signify that doing this (i.e. replacing the baked in JAX-WS implementation) is supported by Oracle/BEA.

1- JVM VERSION:
   
    Make sure you are using Sun's JRE version 1.6.0_14-b08 or later in Weblogic to avoid this nasty bug in SAAJ:
                   
    java.lang.IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings
                                                                             
    To Change the JVM version change the value of JAVA_HOME in the startWebLogic.cmd under user_projects/domains/your_domain_name/bin directory:
   
2- EAR FILE:

    Create an EAR file and include your WAR file inside it.  Here is the directory structure of the EAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    META-INF/application.xml
    META-INF/weblogic-application.xml
    war_files/
    war_files/DocumentServiceSoap11.war
    APP-INF/
    APP-INF/lib/
    APP-INF/lib/webservices-api.jar
    APP-INF/lib/webservices-extra-api.jar
    APP-INF/lib/webservices-extra.jar
    APP-INF/lib/webservices-rt.jar
    APP-INF/lib/webservices-tools.jar
    APP-INF/classes/
    APP-INF/classes/com/
    APP-INF/classes/com/sun/
    APP-INF/classes/com/sun/xml/
    APP-INF/classes/com/sun/xml/ws/
    APP-INF/classes/com/sun/xml/ws/util/
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder$1.class
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder$LazyIterator.class
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder.class
   
       
    2.1 - Include a META-INF/application.xml file to point out the name of the EAR file and the location and context of the WAR file:
   
        <?xml version='1.0' encoding='UTF-8'?>
        <application xmlns="http://java.sun.com/xml/ns/javaee"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <display-name>DocumentServiceSoap11Ear</display-name>
          <module>
            <web>
              <web-uri>war_files/DocumentServiceSoap11.war</web-uri>
              <context-root>DocumentServiceSoap11</context-root>
            </web>
          </module>
        </application>


    2.2 - Include a META-INF/weblogic-application.xml file that uses Weblogic's class loading filtering feature to override the System class loader packages with the application class loader packages located under APP-INF\lib directory:
   
   <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
    <application-param>
          <param-name>webapp.encoding.default</param-name>
          <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
    <package-name>com.ctc.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.msv.datatype.*</package-name>
    <package-name>com.sun.msv.driver.*</package-name>
    <package-name>com.sun.msv.grammar.*</package-name>
    <package-name>com.sun.msv.reader.*</package-name>
    <package-name>com.sun.msv.relaxns.*</package-name>
    <package-name>com.sun.msv.scanner.*</package-name>
    <package-name>com.sun.msv.util.*</package-name>
    <package-name>com.sun.msv.verifier.*</package-name>
    <package-name>com.sun.msv.writer.*</package-name>
    <package-name>com.sun.org.apache.xml.internal.*</package-name>
    <package-name>com.sun.wsit.*</package-name>
    <package-name>javax.jws.*</package-name>
    <package-name>javax.xml.bind.*</package-name>
    <package-name>javax.xml.soap.*</package-name>
    <package-name>javax.xml.stream.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>javax.xml.activation.*</package-name>
    <package-name>javax.xml.annotation.*</package-name>
    <package-name>javax.xml.mail.*</package-name>
    <package-name>javax.xml.security.*</package-name>
    <package-name>javax.xml.registry.*</package-name>
    <package-name>javax.xml.rpc.*</package-name>
    <package-name>javax.xml.crypto.*</package-name>
    <package-name>javanet.staxutils.*</package-name>
    <package-name>jp.gr.xml.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    <package-name>org.glassfish.gmbal.*</package-name>
    <package-name>org.iso_relax.*</package-name>
    <package-name>org.jcp.xml.dsig.*</package-name>
    <package-name>org.jvnet.*</package-name>
    <package-name>org.relaxng.*</package-name>    
      </prefer-application-packages>
    </weblogic-application>
       
   
   
    2.3 - Redefine the prefix inside the metro com.sun.xml.ws.util.ServiceFinder class from META-INF/services to META-INF/metro-services.  This step is necessary since weblogic.jar file has already been loaded by the System class loader and it contains its own META-INF/services abstract implementations which will override the ones in the META-INF/services directory inside webservices-rt.jar and cause the following class cast exception as it tries to cast the Metro abstract class to Weblogic's implementation class (you want to use the Metro implementation class and not Weblogic's):
   
    AssemblerFactory but could not be instantiated: java.lang.ClassCastException
    com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider weblogic.wsee.jaxws.WLSTubelineAssemblerFactory is specified in jar:file:/C:/oracle/Middleware/home_LOAD16F/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut could not be instantiated: java.lang.ClassCastException

    Place the compiled ServiceName class under APP-INF/classes directory  
   
    Note:  There is another way to override the META-INF/services abstract implementations in weblogic.jar file but it involves creating a directory in %DOMAIN_HOME%/patches/META-INF/services directory and putting the com.sun.xml.ws.api.pipe.TubelineAssemblerFactory file containing the com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl line insdie it, but this approach affects the domain and all applications under the domain.  You could also crate a jar file with the META-INF\services directory from webservices-rt.jar and place the jar file in front of weblogic.jar in the CLASSPATH in webLogicStart.cmd file but this approach will affect the entire server and all applications under it.
   
    Here is an excerpt from FileMon.exe showing the resource lookup peformed by Weblogic when it fails:
   
    198684 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    198685 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\webservices-rt.jar SUCCESS Offset: 12202793 Length: 160
    198686 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    198687 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 35923110 Length: 160
    198688 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 29696388 Length: 30
    198689 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 29696484 Length: 49
    198690 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\com\sun\xml\ws\util\ServiceConfigurationError.class PATH NOT FOUND Attributes: Error

    Here is an excerpt from FileMon.exe showing how the new lookup works:
   
    156157 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Attributes: A
    156158 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156159 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 21828 Length: 160
    156160 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156161 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156162 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\common\lib\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156163 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\Oracle_SOA1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156164 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\config\soa-infra\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156165 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156166 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\common\lib\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156167 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\Oracle_SOA1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156168 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\config\soa-infra\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156169 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Attributes: A
    156170 2:20:29 PM java.exe:176 OPEN C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Options: Open  Access: 00100080
    156171 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Attributes: A
    156172 2:20:29 PM java.exe:176 CLOSE C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS
    156173 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 17499 Length: 30
    156174 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 17601 Length: 49
    156175 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\com\sun\xml\ws\assembler\TubelineAssemblerFactoryImpl.class PATH NOT FOUND Attributes: Error
    156176 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\com\sun\xml\ws\assembler\TubelineAssemblerFactoryImpl.class PATH NOT FOUND Attributes: Error
    156177 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 12960704 Length: 160
    156178 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl NOT FOUND Attributes: Error
    156179 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 10736409 Length: 30
    156180 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 10736498 Length: 367
   
    Notice that even though our WAR file was a WEB-INF\classes\META-INF\metro-services directory the lookup for WEB-INF\classes\META-INF\metro-services fails; this is because when Weblogic deploys the WAR file inside the EAR it creates a _wl_cls_gen.jar file with the contents of the WEB-INF\classes directory.  The important thing is that it didn't find META-INF\metro-services in weblogic.jar file so it will continue looking for it and find it under the _wl_cls_gen.jar file.
   
    Here are the contents of the _wl_cls_gen.jar file:
   
    handlers.xml
    META-INF/
    META-INF/metro-services/
    META-INF/metro-services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
    META-INF/metro-services/com.sun.xml.ws.api.policy.PolicyResolverFactory
    META-INF/metro-services/com.sun.xml.ws.api.wsdl.parser.MetadataResolverFactory
    META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.ModelConfiguratorProvider
    META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.PolicyMapUpdateProvider
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionCreator
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionValidator
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PrefixMapper
    META-INF/metro-services/javax.xml.bind.JAXBContext
    META-INF/metro-services/javax.xml.soap.MessageFactory
    META-INF/metro-services/javax.xml.soap.MetaFactory
    META-INF/metro-services/javax.xml.soap.SOAPConnectionFactory
    META-INF/metro-services/javax.xml.soap.SOAPFactory
    META-INF/metro-services/javax.xml.stream.XMLEventFactory
    META-INF/metro-services/javax.xml.stream.XMLInputFactory
    META-INF/metro-services/javax.xml.stream.XMLOutputFactory
    META-INF/metro-services/javax.xml.ws.spi.Provider
    META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.dtd
    META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.relaxng
    META-INF/metro-services/org.iso_relax.verifier.VerifierFactoryLoader
    META-INF/metro-services/org.relaxng.datatype.DatatypeLibraryFactory
   
   
    2.4 - Make sure the webservices-*.jar files are placed in the APP-INF/lib directory.
   
   
    2.5 - Make sure any other Metro classes you are overriding are placed in the APP-INF/classes directory.
       
3 - WAR FILE:
   
    Here is the directory structure of the WAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    WEB-INF/
    WEB-INF/web.xml
    WEB-INF/sun-jaxws.xml
    WEB-INF/wsdl/
    WEB-INF/wsdl/DocumentService.wsdl
    WEB-INF/wsdl/DocumentService.xsd
    WEB-INF/classes/
    WEB-INF/classes/handlers.xml
    WEB-INF/weblogic.xml
    WEB-INF/lib/
    WEB-INF/lib/DocumentServiceSoap11.jar
    WEB-INF/classes/META-INF/
    WEB-INF/classes/META-INF/metro-services/
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.policy.PolicyResolverFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.wsdl.parser.MetadataResolverFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.ModelConfiguratorProvider
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.PolicyMapUpdateProvider
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionCreator
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionValidator
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PrefixMapper
    WEB-INF/classes/META-INF/metro-services/javax.xml.bind.JAXBContext
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.MessageFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.MetaFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.SOAPConnectionFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.SOAPFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLEventFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLInputFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLOutputFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.ws.spi.Provider
    WEB-INF/classes/META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.dtd
    WEB-INF/classes/META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.relaxng
    WEB-INF/classes/META-INF/metro-services/org.iso_relax.verifier.VerifierFactoryLoader
    WEB-INF/classes/META-INF/metro-services/org.relaxng.datatype.DatatypeLibraryFactory
   
   
    3.1 - Copy the webservices-rt.jar/META-INF/services directory to the WAR file as WEB-INF/classes/META-INF/metro-services.  The ServiceFinder class in step 2.3 will use this directory to lookup the abstract class implementations.
   
    3.2 - Include a WEB-INF\weblogic.xml file with the prefer-web-inf-classes entry to override the System class loader classes with the ones in the WEB-INF\lib directory:
   
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"
                      xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
      <container-descriptor>
        <prefer-web-inf-classes>true</prefer-web-inf-classes>
      </container-descriptor>
    </weblogic-web-app>

   
    3.3 - Place your jar file with the service implementation class and schem classes inside the WEB-INF/lib directory
   
    Here are the contents of the DocumentServiceSoap11.jar file:
   
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/oracle/
    com/oracle/webservices/
    com/oracle/webservices/documentservice/
    com/oracle/webservices/documentservice/Attachment.class
    com/oracle/webservices/documentservice/DSIMSG.class
    com/oracle/webservices/documentservice/Diagnosis.class
    com/oracle/webservices/documentservice/DoCallIDSFault.class
    com/oracle/webservices/documentservice/DoCallIDSFault_Exception.class
    com/oracle/webservices/documentservice/DoCallIDSOneWayRequest.class
    com/oracle/webservices/documentservice/DoCallIDSRequest.class
    com/oracle/webservices/documentservice/DoCallIDSResponse.class
    com/oracle/webservices/documentservice/DocumentService.class
    com/oracle/webservices/documentservice/DocumentServicePortType.class
    com/oracle/webservices/documentservice/Error.class
    com/oracle/webservices/documentservice/Errors.class
    com/oracle/webservices/documentservice/HTTP.class
    com/oracle/webservices/documentservice/JMS.class
    com/oracle/webservices/documentservice/MQ.class
    com/oracle/webservices/documentservice/MQSSLCipherspec.class
    com/oracle/webservices/documentservice/MSGVARS.class
    com/oracle/webservices/documentservice/MSMQ.class
    com/oracle/webservices/documentservice/MarshallerClass.class
    com/oracle/webservices/documentservice/ObjectFactory.class
    com/oracle/webservices/documentservice/Properties.class
    com/oracle/webservices/documentservice/Property.class
    com/oracle/webservices/documentservice/ROW.class
    com/oracle/webservices/documentservice/ROWSET.class
    com/oracle/webservices/documentservice/Results.class
    com/oracle/webservices/documentservice/VAR.class
    com/oracle/webservices/documentservice/handler/
    com/oracle/webservices/documentservice/handler/AddressingFilterHandler.class
    com/oracle/webservices/documentservice/handler/AddressingHTTPHandler.class
    com/oracle/webservices/documentservice/handler/AddressingJMSHandler.class
    com/oracle/webservices/documentservice/handler/AddressingMailHandler.class
    com/oracle/webservices/documentservice/handler/LoggingHandler.class
    com/oracle/webservices/documentservice/package-info.class
    com/oracle/webservices/documentservice/schema/
    com/oracle/webservices/documentservice/schema/validation/
    com/oracle/webservices/documentservice/schema/validation/SchemaValidationErrorHandler.class
    com/oracle/webservices/documentservice/server/
    com/oracle/webservices/documentservice/server/DocumentServiceImpl.class
    com/oracle/webservices/documentservice/util/
    com/oracle/webservices/documentservice/util/ByteArrayDataSource.class
    com/oracle/webservices/documentservice/util/Utility.class

4 - Notes:

    4.1 - Make sure your web.xml file does not include the <display-name> and <description> elements under <servlet> element because they are not supported in the following 2.4 or 2.5 Web Deployment Descriptor XSDs:
       
       
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd

    Weblogic will throw this schema validation error if they are present:
       
    Message icon - Error VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null>

   
    4.2 - Make sure any Oneway methods / operations in your service implementation class have the @Oneway annotation in order to avoid this NPE:
   
    Jul 13, 2009 10:43:10 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
    SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NullPointerException
    java.lang.NullPointerException
        at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:375)
        at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl      
       
     

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Wednesday, July 15, 2009 1:45 PM
To: [hidden email]
Subject: Re: Deploying to Weblogic 10.3.1

thanks,
h


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
I updated the info. a little; there were a few typos:

Here are the steps to use the Metro 2.0 JAX-WS implementation instead of Oracle's JAX-WS implementation in Weblogic 10.3.1.0 without affecting the Weblogic domain or other applications under the same domain:

1- JVM VERSION:
   
    Make sure you are using Sun's JRE version 1.6.0_14-b08 or later in Weblogic to avoid this nasty bug in SAAJ:
                   
    java.lang.IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings
                                                                             
    To Change the JVM version change the value of JAVA_HOME in the startWebLogic.cmd under user_projects/domains/your_domain_name/bin directory:
   
2- EAR FILE:

    Create an EAR file and include your WAR file inside it.  Here is the directory structure of the EAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    META-INF/application.xml
    META-INF/weblogic-application.xml
    war_files/
    war_files/DocumentServiceSoap11.war
    APP-INF/
    APP-INF/lib/
    APP-INF/lib/webservices-api.jar
    APP-INF/lib/webservices-extra-api.jar
    APP-INF/lib/webservices-extra.jar
    APP-INF/lib/webservices-rt.jar
    APP-INF/lib/webservices-tools.jar
    APP-INF/classes/
    APP-INF/classes/com/
    APP-INF/classes/com/sun/
    APP-INF/classes/com/sun/xml/
    APP-INF/classes/com/sun/xml/ws/
    APP-INF/classes/com/sun/xml/ws/util/
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder$1.class
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder$LazyIterator.class
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder.class
   
       
    2.1 - Include a META-INF/application.xml file to point out the name of the EAR file and the location and context of the WAR file:
   
        <?xml version='1.0' encoding='UTF-8'?>
        <application xmlns="http://java.sun.com/xml/ns/javaee"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <display-name>DocumentServiceSoap11Ear</display-name>
          <module>
            <web>
              <web-uri>war_files/DocumentServiceSoap11.war</web-uri>
              <context-root>DocumentServiceSoap11</context-root>
            </web>
          </module>
        </application>


    2.2 - Include a META-INF/weblogic-application.xml file that uses Weblogic's class loading filtering feature to override the System class loader packages with the application class loader packages located under APP-INF\lib directory:
   
   <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
    <application-param>
          <param-name>webapp.encoding.default</param-name>
          <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
    <package-name>com.ctc.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.msv.datatype.*</package-name>
    <package-name>com.sun.msv.driver.*</package-name>
    <package-name>com.sun.msv.grammar.*</package-name>
    <package-name>com.sun.msv.reader.*</package-name>
    <package-name>com.sun.msv.relaxns.*</package-name>
    <package-name>com.sun.msv.scanner.*</package-name>
    <package-name>com.sun.msv.util.*</package-name>
    <package-name>com.sun.msv.verifier.*</package-name>
    <package-name>com.sun.msv.writer.*</package-name>
    <package-name>com.sun.org.apache.xml.internal.*</package-name>
    <package-name>com.sun.wsit.*</package-name>
    <package-name>javax.jws.*</package-name>
    <package-name>javax.xml.bind.*</package-name>
    <package-name>javax.xml.soap.*</package-name>
    <package-name>javax.xml.stream.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>javax.xml.activation.*</package-name>
    <package-name>javax.xml.annotation.*</package-name>
    <package-name>javax.xml.mail.*</package-name>
    <package-name>javax.xml.security.*</package-name>
    <package-name>javax.xml.registry.*</package-name>
    <package-name>javax.xml.rpc.*</package-name>
    <package-name>javax.xml.crypto.*</package-name>
    <package-name>javanet.staxutils.*</package-name>
    <package-name>jp.gr.xml.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    <package-name>org.glassfish.gmbal.*</package-name>
    <package-name>org.iso_relax.*</package-name>
    <package-name>org.jcp.xml.dsig.*</package-name>
    <package-name>org.jvnet.*</package-name>
    <package-name>org.relaxng.*</package-name>    
      </prefer-application-packages>
    </weblogic-application>
       
   
   
    2.3 - Redefine the prefix inside the metro com.sun.xml.ws.util.ServiceFinder class from META-INF/services to META-INF/metro-services.  This step is necessary since weblogic.jar file has already been loaded by the System class loader and it contains its own META-INF/services abstract implementations which will override the ones in the META-INF/services directory inside webservices-rt.jar and cause the following class cast exception as it tries to cast the Metro abstract class to Weblogic's implementation class (you want to use the Metro implementation class and not Weblogic's):
   
    AssemblerFactory but could not be instantiated: java.lang.ClassCastException
    com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider weblogic.wsee.jaxws.WLSTubelineAssemblerFactory is specified in jar:file:/C:/oracle/Middleware/home_LOAD16F/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut could not be instantiated: java.lang.ClassCastException

    Place the compiled ServiceFinder class under APP-INF/classes directory  
   
    Note:  There is another way to override the META-INF/services abstract implementations in weblogic.jar file but it involves creating a directory in %DOMAIN_HOME%/patches/META-INF/services directory and putting the com.sun.xml.ws.api.pipe.TubelineAssemblerFactory file containing the com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl line inside it, but this approach affects the domain and all applications under the domain.  You could also crate a jar file with the META-INF\services directory from webservices-rt.jar and place the jar file in front of weblogic.jar in the CLASSPATH in webLogicStart.cmd file but this approach will affect the entire server and all applications under it.
   
    Here is an excerpt from FileMon.exe showing the resource lookup peformed by Weblogic when it fails:
   
    198684 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    198685 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\webservices-rt.jar SUCCESS Offset: 12202793 Length: 160
    198686 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    198687 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 35923110 Length: 160
    198688 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 29696388 Length: 30
    198689 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 29696484 Length: 49
    198690 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\com\sun\xml\ws\util\ServiceConfigurationError.class PATH NOT FOUND Attributes: Error

    Here is an excerpt from FileMon.exe showing how the new lookup works:
   
    156157 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Attributes: A
    156158 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156159 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 21828 Length: 160
    156160 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156161 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156162 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\common\lib\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156163 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\Oracle_SOA1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156164 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\config\soa-infra\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156165 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156166 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\common\lib\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156167 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\Oracle_SOA1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156168 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\config\soa-infra\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156169 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Attributes: A
    156170 2:20:29 PM java.exe:176 OPEN C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Options: Open  Access: 00100080
    156171 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Attributes: A
    156172 2:20:29 PM java.exe:176 CLOSE C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS
    156173 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 17499 Length: 30
    156174 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 17601 Length: 49
    156175 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\com\sun\xml\ws\assembler\TubelineAssemblerFactoryImpl.class PATH NOT FOUND Attributes: Error
    156176 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\com\sun\xml\ws\assembler\TubelineAssemblerFactoryImpl.class PATH NOT FOUND Attributes: Error
    156177 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 12960704 Length: 160
    156178 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl NOT FOUND Attributes: Error
    156179 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 10736409 Length: 30
    156180 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 10736498 Length: 367
   
    Notice that even though our WAR file has a WEB-INF\classes\META-INF\metro-services directory the lookup for WEB-INF\classes\META-INF\metro-services fails; this is because when Weblogic deploys the WAR file inside the EAR it creates a _wl_cls_gen.jar file with the contents of the WEB-INF\classes directory.  The important thing is that it didn't find META-INF\metro-services in weblogic.jar file so it will continue looking for it and find it under the _wl_cls_gen.jar file.
   
    Here are the contents of the _wl_cls_gen.jar file:
   
    handlers.xml
    META-INF/
    META-INF/metro-services/
    META-INF/metro-services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
    META-INF/metro-services/com.sun.xml.ws.api.policy.PolicyResolverFactory
    META-INF/metro-services/com.sun.xml.ws.api.wsdl.parser.MetadataResolverFactory
    META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.ModelConfiguratorProvider
    META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.PolicyMapUpdateProvider
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionCreator
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionValidator
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PrefixMapper
    META-INF/metro-services/javax.xml.bind.JAXBContext
    META-INF/metro-services/javax.xml.soap.MessageFactory
    META-INF/metro-services/javax.xml.soap.MetaFactory
    META-INF/metro-services/javax.xml.soap.SOAPConnectionFactory
    META-INF/metro-services/javax.xml.soap.SOAPFactory
    META-INF/metro-services/javax.xml.stream.XMLEventFactory
    META-INF/metro-services/javax.xml.stream.XMLInputFactory
    META-INF/metro-services/javax.xml.stream.XMLOutputFactory
    META-INF/metro-services/javax.xml.ws.spi.Provider
    META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.dtd
    META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.relaxng
    META-INF/metro-services/org.iso_relax.verifier.VerifierFactoryLoader
    META-INF/metro-services/org.relaxng.datatype.DatatypeLibraryFactory
   
   
    2.4 - Make sure the webservices-*.jar files are placed in the APP-INF/lib directory.
   
   
    2.5 - Make sure any other Metro classes you are overriding are placed in the APP-INF/classes directory.
       
3 - WAR FILE:
   
    Here is the directory structure of the WAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    WEB-INF/
    WEB-INF/web.xml
    WEB-INF/sun-jaxws.xml
    WEB-INF/wsdl/
    WEB-INF/wsdl/DocumentService.wsdl
    WEB-INF/wsdl/DocumentService.xsd
    WEB-INF/classes/
    WEB-INF/classes/handlers.xml
    WEB-INF/weblogic.xml
    WEB-INF/lib/
    WEB-INF/lib/DocumentServiceSoap11.jar
    WEB-INF/classes/META-INF/
    WEB-INF/classes/META-INF/metro-services/
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.policy.PolicyResolverFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.wsdl.parser.MetadataResolverFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.ModelConfiguratorProvider
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.PolicyMapUpdateProvider
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionCreator
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionValidator
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PrefixMapper
    WEB-INF/classes/META-INF/metro-services/javax.xml.bind.JAXBContext
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.MessageFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.MetaFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.SOAPConnectionFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.SOAPFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLEventFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLInputFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLOutputFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.ws.spi.Provider
    WEB-INF/classes/META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.dtd
    WEB-INF/classes/META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.relaxng
    WEB-INF/classes/META-INF/metro-services/org.iso_relax.verifier.VerifierFactoryLoader
    WEB-INF/classes/META-INF/metro-services/org.relaxng.datatype.DatatypeLibraryFactory
   
   
    3.1 - Copy the webservices-rt.jar/META-INF/services directory to the WAR file as WEB-INF/classes/META-INF/metro-services.  The ServiceFinder class in step 2.3 will use this directory to lookup the abstract class implementations.
   
    3.2 - Include a WEB-INF\weblogic.xml file with the prefer-web-inf-classes entry to override the System class loader classes with the ones in the WEB-INF\lib directory:
   
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"
                      xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
      <container-descriptor>
        <prefer-web-inf-classes>true</prefer-web-inf-classes>
      </container-descriptor>
    </weblogic-web-app>

   
    3.3 - Place your jar file with the service implementation class and schema classes inside the WEB-INF/lib directory
   
    Here are the contents of the DocumentServiceSoap11.jar file:
   
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/oracle/
    com/oracle/webservices/
    com/oracle/webservices/documentservice/
    com/oracle/webservices/documentservice/Attachment.class
    com/oracle/webservices/documentservice/DSIMSG.class
    com/oracle/webservices/documentservice/Diagnosis.class
    com/oracle/webservices/documentservice/DoCallIDSFault.class
    com/oracle/webservices/documentservice/DoCallIDSFault_Exception.class
    com/oracle/webservices/documentservice/DoCallIDSOneWayRequest.class
    com/oracle/webservices/documentservice/DoCallIDSRequest.class
    com/oracle/webservices/documentservice/DoCallIDSResponse.class
    com/oracle/webservices/documentservice/DocumentService.class
    com/oracle/webservices/documentservice/DocumentServicePortType.class
    com/oracle/webservices/documentservice/Error.class
    com/oracle/webservices/documentservice/Errors.class
    com/oracle/webservices/documentservice/HTTP.class
    com/oracle/webservices/documentservice/JMS.class
    com/oracle/webservices/documentservice/MQ.class
    com/oracle/webservices/documentservice/MQSSLCipherspec.class
    com/oracle/webservices/documentservice/MSGVARS.class
    com/oracle/webservices/documentservice/MSMQ.class
    com/oracle/webservices/documentservice/MarshallerClass.class
    com/oracle/webservices/documentservice/ObjectFactory.class
    com/oracle/webservices/documentservice/Properties.class
    com/oracle/webservices/documentservice/Property.class
    com/oracle/webservices/documentservice/ROW.class
    com/oracle/webservices/documentservice/ROWSET.class
    com/oracle/webservices/documentservice/Results.class
    com/oracle/webservices/documentservice/VAR.class
    com/oracle/webservices/documentservice/handler/
    com/oracle/webservices/documentservice/handler/AddressingFilterHandler.class
    com/oracle/webservices/documentservice/handler/AddressingHTTPHandler.class
    com/oracle/webservices/documentservice/handler/AddressingJMSHandler.class
    com/oracle/webservices/documentservice/handler/AddressingMailHandler.class
    com/oracle/webservices/documentservice/handler/LoggingHandler.class
    com/oracle/webservices/documentservice/package-info.class
    com/oracle/webservices/documentservice/schema/
    com/oracle/webservices/documentservice/schema/validation/
    com/oracle/webservices/documentservice/schema/validation/SchemaValidationErrorHandler.class
    com/oracle/webservices/documentservice/server/
    com/oracle/webservices/documentservice/server/DocumentServiceImpl.class
    com/oracle/webservices/documentservice/util/
    com/oracle/webservices/documentservice/util/ByteArrayDataSource.class
    com/oracle/webservices/documentservice/util/Utility.class

4 - Notes:

    4.1 - Make sure your web.xml file does not include the <display-name> and <description> elements under <servlet> element because they are not supported in the following 2.4 or 2.5 Web Deployment Descriptor XSDs:
       
       
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd

    Weblogic will throw this schema validation error if they are present:
       
    Message icon - Error VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null>

   
    4.2 - Make sure any Oneway methods / operations in your service implementation class have the @Oneway annotation in order to avoid this NPE:
   
    Jul 13, 2009 10:43:10 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
    SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NullPointerException
    java.lang.NullPointerException
        at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:375)
        at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl      
       



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Deploying to Weblogic 10.3.1

Andreas Loew
In reply to this post by Andreas Loew
Joe,

Andreas Loew schrieb:

> Have you already tried adding
>
>          <package-name>META-INF.*</package-name>
>
> or
>
>          <package-name>META-INF.services.*</package-name>
>
> below "<prefer-application-packages>"?
>
> If the Weblogic implementation of overriding classloader delegation does
> its job correctly, I would assume that this should work and saves you
> the additional pain of fiddling around with renaming META-INF\services
> to META-INF\metro-services.

sorry to repeat myself, but did you try my proposal as shown above?

If it worked - well, fine, and if it doesn't, then how about - as an
Oracle/BEA internal person - creating a bug against Weblogic to fix the
resource loading mechanism from non-delegating web app classloaders...

Just my 2 cents...

Best regards,

Andreas

--
Andreas Loew
Senior Java Architect
Sun Microsystems (Germany)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
In reply to this post by Andreas Loew
Hi Andreas,

I tried adding META-INF.* and META-INF.services.* under <prefer-application-packages> using the default ServiceFinder class that does a lookup for META-INF\services but the outcome did not change.  The code still looked in weblogic.jar and found the abstract implementations there.

Thanks,

Joe

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Wednesday, July 15, 2009 12:51 PM
To: [hidden email]
Cc: [hidden email]
Subject: Re: Deploying to Weblogic 10.3.1

Joe,

Carl Roberts schrieb:

> I have this working in Weblogic 10.3.1.

glad that I was able to put you on the right track :-)

> So, as a workaround, in my ear file, I copied the META-INF\services
> directory from webservices-rt.jar to earFile\META-INF\metro-services
> and I then renamed the lookup path inside ServiceFinder.java to be
> META-INF\metro-services instead of META-INF\services.  This is the
> only way I could override the META-INF\services entries in
> weblogic.jar without touching that jar file or modifying the startup
> script for Weblogic.

Have you already tried adding

  <package-name>META-INF.*</package-name>

or

  <package-name>META-INF.services.*</package-name>

below "<prefer-application-packages>"?

If the Weblogic implementation of overriding classloader delegation does its job correctly, I would assume that this should work and saves you the additional pain of fiddling around with renaming META-INF\services to META-INF\metro-services.

Good luck & best regards,

Andreas

--
Andreas Loew
Senior Java Architect
Sun Microsystems (Germany)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
In reply to this post by Andreas Loew
Hi Andreas,

I tried adding META-INF.* and META-INF.services.* under <prefer-application-packages> using the default ServiceFinder class that does a lookup for META-INF\services but the outcome did not change.  The code still looked in weblogic.jar and found the abstract implementations there.  I think I am going to file a bug, but I want to do a little more testing first and double check my results.

Per the Oracle/BEA docs on Class Loading resources should also be found in this order when filtering is provided:  application - war - system

At least that is the way I am reading it.  Here is the link the the doc. I am referring to and an excerpt:


http://edocs.bea.com/wls/docs92/programming/classloading.html

Resource Loading Order

The resource loading order is the order in which java.lang.ClassLoader methods getResource()and getResources() return resources. When filtering is enabled, this order is slightly different from the case when filtering is disabled. Filtering is enabled implies that there are one or more package patterns in the FilteringClassLoader. Without any filtering (default), the resources are collected in the top-down order of the classloader tree. For instance, if Web (1) requests resources, the resources are grouped in the following order: Sys (3), App (2) and Web(1). See Figure 7-5.

Figure 7-5 Using the System Classloader
       System (3)

          |

         App (2)

          |

         Web (1)

To be more explicit, given a resource /META-INF/foo.xml which exists in all the classloaders, would return the following list of URLs:

    META-INF/foo.xml - from the System ClassLoader (3)
    META-INF/foo.xml - from the App ClassLoader (2)
    META-INF/foo.xml - from the Web ClassLoader (1)
When filtering is enabled, the resources from the child of the FilteringClassLoader (an application classloader) down to the calling classloader are returned before the ones from the system classloader. In Figure 7-6, if the same resource existed in all the classloaders (D), (B) and (A) one would get them in the following order if requested by the Web classloader:

    META-INF/foo.xml - from the App ClassLoader (B)
    META-INF/foo.xml - from the Web ClassLoader (A)
    META-INF/foo.xml - from the System ClassLoader (D)
Note: The resources are returned in the default J2EE delegation model beneath the FilteringClassLoader. Only the resources from the parent of the FilteringClassLoader are appended to the end of the enumeration being returned.
Figure 7-6 Using a Filtering Classloading Implementation
       System (D)

          |

         FilteringClassLoader (filterList := x.y.*) (C)

          |

         App (B)

          |

         Web (A)

If the application classloader requested the same resource, the following order would be obtained.

    META-INF/foo.xml - from the App ClassLoader (B)
    META-INF/foo.xml - from the System ClassLoader (D)
For getResource(), only the first descriptor is returned and getResourceAsStream() returns the inputStream of the first resource.

 


Thanks,

Joe

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Friday, July 17, 2009 8:15 AM
To: [hidden email]
Cc: [hidden email]
Subject: Re: Deploying to Weblogic 10.3.1

Joe,

Andreas Loew schrieb:

> Have you already tried adding
>
>          <package-name>META-INF.*</package-name>
>
> or
>
>          <package-name>META-INF.services.*</package-name>
>
> below "<prefer-application-packages>"?
>
> If the Weblogic implementation of overriding classloader delegation
> does its job correctly, I would assume that this should work and saves
> you the additional pain of fiddling around with renaming
> META-INF\services to META-INF\metro-services.

sorry to repeat myself, but did you try my proposal as shown above?

If it worked - well, fine, and if it doesn't, then how about - as an Oracle/BEA internal person - creating a bug against Weblogic to fix the resource loading mechanism from non-delegating web app classloaders...

Just my 2 cents...

Best regards,

Andreas

--
Andreas Loew
Senior Java Architect
Sun Microsystems (Germany)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
Hi Andreas,

I went back to testing with the following two entries added to weblogic-application.xml file and by changing the ServiceFinder class to the original code where it looks for abstract implementations in META-INF\services:  

                <package-name>META-INF.*</package-name>
                <package-name>META-INF.services.*</package-name>  


WLS finds the TubeLineAssemblerFactory in webservices-rt.jar but then it looks for it again and finds it in weblogic.jar.  An excerpt from FileMon.exe follows:


15097 9:39:48 AM java.exe:3972 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
15098 9:39:48 AM java.exe:3972 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 12202793 Length: 160
15099 9:39:48 AM java.exe:3972 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
15100 9:39:48 AM java.exe:3972 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
15101 9:39:48 AM java.exe:3972 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 35923110 Length: 160

 
I am going to file an Oracle bug for this issue.

Thanks,

Joe


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
 
Hi,

I just created a bug for Weblogic 10.3.1 in the oracle bug tracker but the URL is internal so I will keep you posted once they contact me.

Thanks,

Joe


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
Just FYI,

I was able to test an Oracle based Web HelloWorld service which I developed and deployed using the following link:  http://download.oracle.com/docs/cd/E12839_01/web.1111/e13758/use_cases.htm

And the metro based web service also works so they both happily coexist on the same WLS domain and server.

I hadn't tested the HellowWorld service for a few days so I tested the HelloWorld service again this morning and I run into the same SAAJ exception which prompted me to do a little more testing this morning and I have since revised the How to steps for deploying a Metro 2.0 based web service to Weblogic 10.3.1 (basically, Step 1 is not needed nor desired).

He are the revised steps:

                 
Here are the steps to use the Metro 2.0 JAX-WS implementation instead of Oracle's JAX-WS implementation in Weblogic 10.3.1.0 without affecting the Weblogic domain or other applications under the same domain:

These instructions do not signify that doing this (i.e. replacing the baked in JAX-WS implementation) is supported by Oracle/BEA.

REVISIONS:

REVISION 1 - 7/17/09:

    Step 1 is not needed and in fact switching to JVM version 1.6.0_14-b08 causes the same SAAJ exception in the Oracle baked in web services.  The reason the exception was being thrown in step 1 during deployment of the Metro web service was due to only having the following packages present in weblogic-application.xml file at that time:

    <package-name>javax.jws.*</package-name>
    <package-name>javax.xml.soap.*</package-name>


1- JVM VERSION (THIS STEP IS NOT REQUIRED NOR DESIRED - SEE REVISION 1):
   
    Make sure you are using Sun's JRE version 1.6.0_14-b08 or later in Weblogic to avoid this nasty bug in SAAJ:
                   
    java.lang.IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings
                                                                             
    To Change the JVM version change the value of JAVA_HOME in the startWebLogic.cmd under user_projects/domains/your_domain_name/bin directory:
   
2- EAR FILE:

    Create an EAR file and include your WAR file inside it.  Here is the directory structure of the EAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    META-INF/application.xml
    META-INF/weblogic-application.xml
    war_files/
    war_files/DocumentServiceSoap11.war
    APP-INF/
    APP-INF/lib/
    APP-INF/lib/webservices-api.jar
    APP-INF/lib/webservices-extra-api.jar
    APP-INF/lib/webservices-extra.jar
    APP-INF/lib/webservices-rt.jar
    APP-INF/lib/webservices-tools.jar
    APP-INF/classes/
    APP-INF/classes/com/
    APP-INF/classes/com/sun/
    APP-INF/classes/com/sun/xml/
    APP-INF/classes/com/sun/xml/ws/
    APP-INF/classes/com/sun/xml/ws/util/
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder$1.class
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder$LazyIterator.class
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder.class
   
       
    2.1 - Include a META-INF/application.xml file to point out the name of the EAR file and the location and context of the WAR file:
   
        <?xml version='1.0' encoding='UTF-8'?>
        <application xmlns="http://java.sun.com/xml/ns/javaee"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <display-name>DocumentServiceSoap11Ear</display-name>
          <module>
            <web>
              <web-uri>war_files/DocumentServiceSoap11.war</web-uri>
              <context-root>DocumentServiceSoap11</context-root>
            </web>
          </module>
        </application>


    2.2 - Include a META-INF/weblogic-application.xml file that uses Weblogic's class loading filtering feature to override the System class loader packages with the application class loader packages located under APP-INF\lib directory:
   
   <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
    <application-param>
          <param-name>webapp.encoding.default</param-name>
          <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
    <package-name>com.ctc.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.msv.datatype.*</package-name>
    <package-name>com.sun.msv.driver.*</package-name>
    <package-name>com.sun.msv.grammar.*</package-name>
    <package-name>com.sun.msv.reader.*</package-name>
    <package-name>com.sun.msv.relaxns.*</package-name>
    <package-name>com.sun.msv.scanner.*</package-name>
    <package-name>com.sun.msv.util.*</package-name>
    <package-name>com.sun.msv.verifier.*</package-name>
    <package-name>com.sun.msv.writer.*</package-name>
    <package-name>com.sun.org.apache.xml.internal.*</package-name>
    <package-name>com.sun.wsit.*</package-name>
    <package-name>javax.jws.*</package-name>
    <package-name>javax.xml.bind.*</package-name>
    <package-name>javax.xml.soap.*</package-name>
    <package-name>javax.xml.stream.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>javax.xml.activation.*</package-name>
    <package-name>javax.xml.annotation.*</package-name>
    <package-name>javax.xml.mail.*</package-name>
    <package-name>javax.xml.security.*</package-name>
    <package-name>javax.xml.registry.*</package-name>
    <package-name>javax.xml.rpc.*</package-name>
    <package-name>javax.xml.crypto.*</package-name>
    <package-name>javanet.staxutils.*</package-name>
    <package-name>jp.gr.xml.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    <package-name>org.glassfish.gmbal.*</package-name>
    <package-name>org.iso_relax.*</package-name>
    <package-name>org.jcp.xml.dsig.*</package-name>
    <package-name>org.jvnet.*</package-name>
    <package-name>org.relaxng.*</package-name>    
      </prefer-application-packages>
    </weblogic-application>
       
   
   
    2.3 - Redefine the prefix inside the metro com.sun.xml.ws.util.ServiceFinder class from META-INF/services to META-INF/metro-services.  This step is necessary since weblogic.jar file has already been loaded by the System class loader and it contains its own META-INF/services abstract implementations which will override the ones in the META-INF/services directory inside webservices-rt.jar and cause the following class cast exception as it tries to cast the Metro abstract class to Weblogic's implementation class (you want to use the Metro implementation class and not Weblogic's):
   
    AssemblerFactory but could not be instantiated: java.lang.ClassCastException
    com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider weblogic.wsee.jaxws.WLSTubelineAssemblerFactory is specified in jar:file:/C:/oracle/Middleware/home_LOAD16F/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut could not be instantiated: java.lang.ClassCastException

    Place the compiled ServiceName class under APP-INF/classes directory  
   
    Note:  There is another way to override the META-INF/services abstract implementations in weblogic.jar file but it involves creating a directory in %DOMAIN_HOME%/patches/META-INF/services directory and putting the com.sun.xml.ws.api.pipe.TubelineAssemblerFactory file containing the com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl line insdie it, but this approach affects the domain and all applications under the domain.  You could also crate a jar file with the META-INF\services directory from webservices-rt.jar and place the jar file in front of weblogic.jar in the CLASSPATH in webLogicStart.cmd file but this approach will affect the entire server and all applications under it.
   
    Here is an excerpt from FileMon.exe showing the resource lookup peformed by Weblogic when it fails:
   
    198684 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    198685 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\webservices-rt.jar SUCCESS Offset: 12202793 Length: 160
    198686 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    198687 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 35923110 Length: 160
    198688 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 29696388 Length: 30
    198689 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 29696484 Length: 49
    198690 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\com\sun\xml\ws\util\ServiceConfigurationError.class PATH NOT FOUND Attributes: Error

    Here is an excerpt from FileMon.exe showing how the new lookup works:
   
    156157 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Attributes: A
    156158 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156159 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 21828 Length: 160
    156160 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156161 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156162 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\common\lib\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156163 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\Oracle_SOA1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156164 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\config\soa-infra\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156165 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156166 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\common\lib\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156167 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\Oracle_SOA1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156168 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\config\soa-infra\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156169 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Attributes: A
    156170 2:20:29 PM java.exe:176 OPEN C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Options: Open  Access: 00100080
    156171 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Attributes: A
    156172 2:20:29 PM java.exe:176 CLOSE C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS
    156173 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 17499 Length: 30
    156174 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 17601 Length: 49
    156175 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\com\sun\xml\ws\assembler\TubelineAssemblerFactoryImpl.class PATH NOT FOUND Attributes: Error
    156176 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\com\sun\xml\ws\assembler\TubelineAssemblerFactoryImpl.class PATH NOT FOUND Attributes: Error
    156177 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 12960704 Length: 160
    156178 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl NOT FOUND Attributes: Error
    156179 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 10736409 Length: 30
    156180 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 10736498 Length: 367
   
    Notice that even though our WAR file was a WEB-INF\classes\META-INF\metro-services directory the lookup for WEB-INF\classes\META-INF\metro-services fails; this is because when Weblogic deploys the WAR file inside the EAR it creates a _wl_cls_gen.jar file with the contents of the WEB-INF\classes directory.  The important thing is that it didn't find META-INF\metro-services in weblogic.jar file so it will continue looking for it and find it under the _wl_cls_gen.jar file.
   
    Here are the contents of the _wl_cls_gen.jar file:
   
    handlers.xml
    META-INF/
    META-INF/metro-services/
    META-INF/metro-services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
    META-INF/metro-services/com.sun.xml.ws.api.policy.PolicyResolverFactory
    META-INF/metro-services/com.sun.xml.ws.api.wsdl.parser.MetadataResolverFactory
    META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.ModelConfiguratorProvider
    META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.PolicyMapUpdateProvider
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionCreator
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionValidator
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PrefixMapper
    META-INF/metro-services/javax.xml.bind.JAXBContext
    META-INF/metro-services/javax.xml.soap.MessageFactory
    META-INF/metro-services/javax.xml.soap.MetaFactory
    META-INF/metro-services/javax.xml.soap.SOAPConnectionFactory
    META-INF/metro-services/javax.xml.soap.SOAPFactory
    META-INF/metro-services/javax.xml.stream.XMLEventFactory
    META-INF/metro-services/javax.xml.stream.XMLInputFactory
    META-INF/metro-services/javax.xml.stream.XMLOutputFactory
    META-INF/metro-services/javax.xml.ws.spi.Provider
    META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.dtd
    META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.relaxng
    META-INF/metro-services/org.iso_relax.verifier.VerifierFactoryLoader
    META-INF/metro-services/org.relaxng.datatype.DatatypeLibraryFactory
   
   
    2.4 - Make sure the webservices-*.jar files are placed in the APP-INF/lib directory.
   
   
    2.5 - Make sure any other Metro classes you are overriding are placed in the APP-INF/classes directory.
       
3 - WAR FILE:
   
    Here is the directory structure of the WAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    WEB-INF/
    WEB-INF/web.xml
    WEB-INF/sun-jaxws.xml
    WEB-INF/wsdl/
    WEB-INF/wsdl/DocumentService.wsdl
    WEB-INF/wsdl/DocumentService.xsd
    WEB-INF/classes/
    WEB-INF/classes/handlers.xml
    WEB-INF/weblogic.xml
    WEB-INF/lib/
    WEB-INF/lib/DocumentServiceSoap11.jar
    WEB-INF/classes/META-INF/
    WEB-INF/classes/META-INF/metro-services/
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.policy.PolicyResolverFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.wsdl.parser.MetadataResolverFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.ModelConfiguratorProvider
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.PolicyMapUpdateProvider
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionCreator
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionValidator
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PrefixMapper
    WEB-INF/classes/META-INF/metro-services/javax.xml.bind.JAXBContext
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.MessageFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.MetaFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.SOAPConnectionFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.SOAPFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLEventFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLInputFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLOutputFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.ws.spi.Provider
    WEB-INF/classes/META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.dtd
    WEB-INF/classes/META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.relaxng
    WEB-INF/classes/META-INF/metro-services/org.iso_relax.verifier.VerifierFactoryLoader
    WEB-INF/classes/META-INF/metro-services/org.relaxng.datatype.DatatypeLibraryFactory
   
   
    3.1 - Copy the webservices-rt.jar/META-INF/services directory to the WAR file as WEB-INF/classes/META-INF/metro-services.  The ServiceFinder class in step 2.3 will use this directory to lookup the abstract class implementations.
   
    3.2 - Include a WEB-INF\weblogic.xml file with the prefer-web-inf-classes entry to override the System class loader classes with the ones in the WEB-INF\lib directory:
   
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"
                      xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
      <container-descriptor>
        <prefer-web-inf-classes>true</prefer-web-inf-classes>
      </container-descriptor>
    </weblogic-web-app>

   
    3.3 - Place your jar file with the service implementation class and schem classes inside the WEB-INF/lib directory
   
    Here are the contents of the DocumentServiceSoap11.jar file:
   
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/oracle/
    com/oracle/webservices/
    com/oracle/webservices/documentservice/
    com/oracle/webservices/documentservice/Attachment.class
    com/oracle/webservices/documentservice/DSIMSG.class
    com/oracle/webservices/documentservice/Diagnosis.class
    com/oracle/webservices/documentservice/DoCallIDSFault.class
    com/oracle/webservices/documentservice/DoCallIDSFault_Exception.class
    com/oracle/webservices/documentservice/DoCallIDSOneWayRequest.class
    com/oracle/webservices/documentservice/DoCallIDSRequest.class
    com/oracle/webservices/documentservice/DoCallIDSResponse.class
    com/oracle/webservices/documentservice/DocumentService.class
    com/oracle/webservices/documentservice/DocumentServicePortType.class
    com/oracle/webservices/documentservice/Error.class
    com/oracle/webservices/documentservice/Errors.class
    com/oracle/webservices/documentservice/HTTP.class
    com/oracle/webservices/documentservice/JMS.class
    com/oracle/webservices/documentservice/MQ.class
    com/oracle/webservices/documentservice/MQSSLCipherspec.class
    com/oracle/webservices/documentservice/MSGVARS.class
    com/oracle/webservices/documentservice/MSMQ.class
    com/oracle/webservices/documentservice/MarshallerClass.class
    com/oracle/webservices/documentservice/ObjectFactory.class
    com/oracle/webservices/documentservice/Properties.class
    com/oracle/webservices/documentservice/Property.class
    com/oracle/webservices/documentservice/ROW.class
    com/oracle/webservices/documentservice/ROWSET.class
    com/oracle/webservices/documentservice/Results.class
    com/oracle/webservices/documentservice/VAR.class
    com/oracle/webservices/documentservice/handler/
    com/oracle/webservices/documentservice/handler/AddressingFilterHandler.class
    com/oracle/webservices/documentservice/handler/AddressingHTTPHandler.class
    com/oracle/webservices/documentservice/handler/AddressingJMSHandler.class
    com/oracle/webservices/documentservice/handler/AddressingMailHandler.class
    com/oracle/webservices/documentservice/handler/LoggingHandler.class
    com/oracle/webservices/documentservice/package-info.class
    com/oracle/webservices/documentservice/schema/
    com/oracle/webservices/documentservice/schema/validation/
    com/oracle/webservices/documentservice/schema/validation/SchemaValidationErrorHandler.class
    com/oracle/webservices/documentservice/server/
    com/oracle/webservices/documentservice/server/DocumentServiceImpl.class
    com/oracle/webservices/documentservice/util/
    com/oracle/webservices/documentservice/util/ByteArrayDataSource.class
    com/oracle/webservices/documentservice/util/Utility.class

4 - Notes:

    4.1 - Make sure your web.xml file does not include the <display-name> and <description> elements under <servlet> element because they are not supported in the following 2.4 or 2.5 Web Deployment Descriptor XSDs:
       
       
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd

    Weblogic will throw this schema validation error if they are present:
       
    Message icon - Error VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null>

   
    4.2 - Make sure any Oneway methods / operations in your service implementation class have the @Oneway annotation in order to avoid this NPE:
   
    Jul 13, 2009 10:43:10 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
    SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NullPointerException
    java.lang.NullPointerException
        at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:375)
        at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl      

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Thursday, July 16, 2009 5:00 PM
To: [hidden email]
Subject: Re: Deploying to Weblogic 10.3.1

Hello Joe,

Thanks for those steps!  I am sure many others will benefit from your work.

Question: you say:

> Here are the steps to use the Metro 2.0 JAX-WS implementation instead of Oracle's JAX-WS implementation in Weblogic 10.3.1.0 without affecting the Weblogic domain or other applications under the same domain:

Do you mean that what the steps show is how to use Metro on a specific web service in WebLogic - and that other web services that do not follow those steps will continue to use the web services baked into WebLogic?

Thanks,
H


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
Ok,

Here are some revisions (see REVISION 2):

Here are the steps to use the Metro 2.0 JAX-WS implementation instead of Oracle's JAX-WS implementation in Weblogic 10.3.1.0 without affecting the Weblogic domain or other applications under the same domain:

These instructions do not signify that doing this (i.e. replacing the baked in JAX-WS implementation) is supported by Oracle/BEA.

REVISIONS:

REVISION 1 - 7/17/09:

    Step 1 is not needed and in fact switching to JVM version 1.6.0_14-b08 causes the same SAAJ exception in the Oracle baked in web services.  The reason the exception was being thrown in step 1 during deployment of the Metro web service was due to only having the following packages present in weblogic-application.xml file at that time:

    <package-name>javax.jws.*</package-name>
    <package-name>javax.xml.soap.*</package-name>

REVISION 2 - 7/20/09:

    Step 2.2 Has been modified.  The new content of weblogic-application.xml is:
   
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
    <application-param>
          <param-name>webapp.encoding.default</param-name>
          <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
    <package-name>com.ctc.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.msv.datatype.*</package-name>
    <package-name>com.sun.msv.driver.*</package-name>
    <package-name>com.sun.msv.grammar.*</package-name>
    <package-name>com.sun.msv.reader.*</package-name>
    <package-name>com.sun.msv.relaxns.*</package-name>
    <package-name>com.sun.msv.scanner.*</package-name>
    <package-name>com.sun.msv.util.*</package-name>
    <package-name>com.sun.msv.verifier.*</package-name>
    <package-name>com.sun.msv.writer.*</package-name>
    <package-name>com.sun.org.apache.xml.internal.*</package-name>
    <package-name>com.sun.wsit.*</package-name>
    <package-name>javax.jws.*</package-name>
    <package-name>javax.xml.bind.*</package-name>
    <package-name>javax.xml.soap.*</package-name>
    <package-name>javax.xml.stream.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>javax.xml.activation.*</package-name>
    <package-name>javax.xml.annotation.*</package-name>
    <package-name>javax.xml.mail.*</package-name>
    <package-name>javax.xml.security.*</package-name>
    <package-name>javax.xml.registry.*</package-name>
    <package-name>javax.xml.rpc.*</package-name>
    <package-name>javax.xml.crypto.*</package-name>
    <package-name>javanet.staxutils.*</package-name>
    <package-name>jp.gr.xml.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    <package-name>org.glassfish.gmbal.*</package-name>
    <package-name>org.iso_relax.*</package-name>
    <package-name>org.jcp.xml.dsig.*</package-name>
    <package-name>org.jvnet.*</package-name>
    <package-name>org.relaxng.*</package-name>    
      </prefer-application-packages>
      <prefer-application-resources>
            <resource-name>META-INF/services/*</resource-name>
      </prefer-application-resources>
    </weblogic-application>
           
     Step 2.3 is no longer needed.
     
     Step 3.1 is no longer needed.
     
1- JVM VERSION (THIS STEP IS NOT REQUIRED NOR DESIRED - SEE REVISION 1):
   
    Make sure you are using Sun's JRE version 1.6.0_14-b08 or later in Weblogic to avoid this nasty bug in SAAJ:
                   
    java.lang.IllegalArgumentException: com.sun.xml.internal.messaging.saaj.soap.LocalStrings != com.sun.xml.messaging.saaj.soap.LocalStrings
                                                                             
    To Change the JVM version change the value of JAVA_HOME in the startWebLogic.cmd under user_projects/domains/your_domain_name/bin directory:
   
2- EAR FILE:

    Create an EAR file and include your WAR file inside it.  Here is the directory structure of the EAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    META-INF/application.xml
    META-INF/weblogic-application.xml
    war_files/
    war_files/DocumentServiceSoap11.war
    APP-INF/
    APP-INF/lib/
    APP-INF/lib/webservices-api.jar
    APP-INF/lib/webservices-extra-api.jar
    APP-INF/lib/webservices-extra.jar
    APP-INF/lib/webservices-rt.jar
    APP-INF/lib/webservices-tools.jar
    APP-INF/classes/
    APP-INF/classes/com/
    APP-INF/classes/com/sun/
    APP-INF/classes/com/sun/xml/
    APP-INF/classes/com/sun/xml/ws/
    APP-INF/classes/com/sun/xml/ws/util/
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder$1.class
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder$LazyIterator.class
    APP-INF/classes/com/sun/xml/ws/util/ServiceFinder.class
   
       
    2.1 - Include a META-INF/application.xml file to point out the name of the EAR file and the location and context of the WAR file:
   
        <?xml version='1.0' encoding='UTF-8'?>
        <application xmlns="http://java.sun.com/xml/ns/javaee"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <display-name>DocumentServiceSoap11Ear</display-name>
          <module>
            <web>
              <web-uri>war_files/DocumentServiceSoap11.war</web-uri>
              <context-root>DocumentServiceSoap11</context-root>
            </web>
          </module>
        </application>


    2.2 - Include a META-INF/weblogic-application.xml file that uses Weblogic's class loading filtering feature to override the System class loader packages with the application class loader packages located under APP-INF\lib directory:
   
   <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
    <application-param>
          <param-name>webapp.encoding.default</param-name>
          <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
    <package-name>com.ctc.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.msv.datatype.*</package-name>
    <package-name>com.sun.msv.driver.*</package-name>
    <package-name>com.sun.msv.grammar.*</package-name>
    <package-name>com.sun.msv.reader.*</package-name>
    <package-name>com.sun.msv.relaxns.*</package-name>
    <package-name>com.sun.msv.scanner.*</package-name>
    <package-name>com.sun.msv.util.*</package-name>
    <package-name>com.sun.msv.verifier.*</package-name>
    <package-name>com.sun.msv.writer.*</package-name>
    <package-name>com.sun.org.apache.xml.internal.*</package-name>
    <package-name>com.sun.wsit.*</package-name>
    <package-name>javax.jws.*</package-name>
    <package-name>javax.xml.bind.*</package-name>
    <package-name>javax.xml.soap.*</package-name>
    <package-name>javax.xml.stream.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>javax.xml.activation.*</package-name>
    <package-name>javax.xml.annotation.*</package-name>
    <package-name>javax.xml.mail.*</package-name>
    <package-name>javax.xml.security.*</package-name>
    <package-name>javax.xml.registry.*</package-name>
    <package-name>javax.xml.rpc.*</package-name>
    <package-name>javax.xml.crypto.*</package-name>
    <package-name>javanet.staxutils.*</package-name>
    <package-name>jp.gr.xml.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    <package-name>org.glassfish.gmbal.*</package-name>
    <package-name>org.iso_relax.*</package-name>
    <package-name>org.jcp.xml.dsig.*</package-name>
    <package-name>org.jvnet.*</package-name>
    <package-name>org.relaxng.*</package-name>    
      </prefer-application-packages>
    </weblogic-application>
       
   
   
    2.3 - Redefine the prefix inside the metro com.sun.xml.ws.util.ServiceFinder class from META-INF/services to META-INF/metro-services.  This step is necessary since weblogic.jar file has already been loaded by the System class loader and it contains its own META-INF/services abstract implementations which will override the ones in the META-INF/services directory inside webservices-rt.jar and cause the following class cast exception as it tries to cast the Metro abstract class to Weblogic's implementation class (you want to use the Metro implementation class and not Weblogic's):
   
    AssemblerFactory but could not be instantiated: java.lang.ClassCastException
    com.sun.xml.ws.util.ServiceConfigurationError: com.sun.xml.ws.api.pipe.TubelineAssemblerFactory: Provider weblogic.wsee.jaxws.WLSTubelineAssemblerFactory is specified in jar:file:/C:/oracle/Middleware/home_LOAD16F/wlserver_10.3/server/lib/weblogic.jar!/META-INF/services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactorybut could not be instantiated: java.lang.ClassCastException

    Place the compiled ServiceFinder class under APP-INF/classes directory  
   
    Note:  There is another way to override the META-INF/services abstract implementations in weblogic.jar file but it involves creating a directory in %DOMAIN_HOME%/patches/META-INF/services directory and putting the com.sun.xml.ws.api.pipe.TubelineAssemblerFactory file containing the com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl line insdie it, but this approach affects the domain and all applications under the domain.  You could also crate a jar file with the META-INF\services directory from webservices-rt.jar and place the jar file in front of weblogic.jar in the CLASSPATH in webLogicStart.cmd file but this approach will affect the entire server and all applications under it.
   
    Here is an excerpt from FileMon.exe showing the resource lookup peformed by Weblogic when it fails:
   
    198684 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    198685 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\webservices-rt.jar SUCCESS Offset: 12202793 Length: 160
    198686 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    198687 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 35923110 Length: 160
    198688 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 29696388 Length: 30
    198689 9:50:14 AM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\server\lib\weblogic.jar SUCCESS Offset: 29696484 Length: 49
    198690 9:50:14 AM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\com\sun\xml\ws\util\ServiceConfigurationError.class PATH NOT FOUND Attributes: Error

    Here is an excerpt from FileMon.exe showing how the new lookup works:
   
    156157 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Attributes: A
    156158 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156159 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 21828 Length: 160
    156160 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156161 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156162 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\common\lib\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156163 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\Oracle_SOA1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156164 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\config\soa-infra\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156165 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156166 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\wlserver_10.3\common\lib\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156167 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\Oracle_SOA1\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156168 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\config\soa-infra\META-INF\metro-services\com.sun.xml.ws.api.pipe.TubelineAssemblerFactory PATH NOT FOUND Attributes: Error
    156169 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Attributes: A
    156170 2:20:29 PM java.exe:176 OPEN C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Options: Open  Access: 00100080
    156171 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Attributes: A
    156172 2:20:29 PM java.exe:176 CLOSE C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS
    156173 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 17499 Length: 30
    156174 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\lib\_wl_cls_gen.jar SUCCESS Offset: 17601 Length: 49
    156175 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\adffhe\war\WEB-INF\classes\com\sun\xml\ws\assembler\TubelineAssemblerFactoryImpl.class PATH NOT FOUND Attributes: Error
    156176 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\com\sun\xml\ws\assembler\TubelineAssemblerFactoryImpl.class PATH NOT FOUND Attributes: Error
    156177 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 12960704 Length: 160
    156178 2:20:29 PM java.exe:176 QUERY INFORMATION C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\classes\com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl NOT FOUND Attributes: Error
    156179 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 10736409 Length: 30
    156180 2:20:29 PM java.exe:176 READ C:\oracle\Middleware\home_LOAD16F\user_projects\domains\domain1\servers\AdminServer\tmp\_WL_user\DocumentServiceSoap11\4hrhp4\APP-INF\lib\webservices-rt.jar SUCCESS Offset: 10736498 Length: 367
   
    Notice that even though our WAR file was a WEB-INF\classes\META-INF\metro-services directory the lookup for WEB-INF\classes\META-INF\metro-services fails; this is because when Weblogic deploys the WAR file inside the EAR it creates a _wl_cls_gen.jar file with the contents of the WEB-INF\classes directory.  The important thing is that it didn't find META-INF\metro-services in weblogic.jar file so it will continue looking for it and find it under the _wl_cls_gen.jar file.
   
    Here are the contents of the _wl_cls_gen.jar file:
   
    handlers.xml
    META-INF/
    META-INF/metro-services/
    META-INF/metro-services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
    META-INF/metro-services/com.sun.xml.ws.api.policy.PolicyResolverFactory
    META-INF/metro-services/com.sun.xml.ws.api.wsdl.parser.MetadataResolverFactory
    META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.ModelConfiguratorProvider
    META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.PolicyMapUpdateProvider
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionCreator
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionValidator
    META-INF/metro-services/com.sun.xml.ws.policy.spi.PrefixMapper
    META-INF/metro-services/javax.xml.bind.JAXBContext
    META-INF/metro-services/javax.xml.soap.MessageFactory
    META-INF/metro-services/javax.xml.soap.MetaFactory
    META-INF/metro-services/javax.xml.soap.SOAPConnectionFactory
    META-INF/metro-services/javax.xml.soap.SOAPFactory
    META-INF/metro-services/javax.xml.stream.XMLEventFactory
    META-INF/metro-services/javax.xml.stream.XMLInputFactory
    META-INF/metro-services/javax.xml.stream.XMLOutputFactory
    META-INF/metro-services/javax.xml.ws.spi.Provider
    META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.dtd
    META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.relaxng
    META-INF/metro-services/org.iso_relax.verifier.VerifierFactoryLoader
    META-INF/metro-services/org.relaxng.datatype.DatatypeLibraryFactory
   
   
    2.4 - Make sure the webservices-*.jar files are placed in the APP-INF/lib directory.
   
   
    2.5 - Make sure any other Metro classes you are overriding are placed in the APP-INF/classes directory.
       
3 - WAR FILE:
   
    Here is the directory structure of the WAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    WEB-INF/
    WEB-INF/web.xml
    WEB-INF/sun-jaxws.xml
    WEB-INF/wsdl/
    WEB-INF/wsdl/DocumentService.wsdl
    WEB-INF/wsdl/DocumentService.xsd
    WEB-INF/classes/
    WEB-INF/classes/handlers.xml
    WEB-INF/weblogic.xml
    WEB-INF/lib/
    WEB-INF/lib/DocumentServiceSoap11.jar
    WEB-INF/classes/META-INF/
    WEB-INF/classes/META-INF/metro-services/
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.pipe.TubelineAssemblerFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.policy.PolicyResolverFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.api.wsdl.parser.MetadataResolverFactory
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.ModelConfiguratorProvider
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.jaxws.spi.PolicyMapUpdateProvider
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionCreator
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PolicyAssertionValidator
    WEB-INF/classes/META-INF/metro-services/com.sun.xml.ws.policy.spi.PrefixMapper
    WEB-INF/classes/META-INF/metro-services/javax.xml.bind.JAXBContext
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.MessageFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.MetaFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.SOAPConnectionFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.soap.SOAPFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLEventFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLInputFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.stream.XMLOutputFactory
    WEB-INF/classes/META-INF/metro-services/javax.xml.ws.spi.Provider
    WEB-INF/classes/META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.dtd
    WEB-INF/classes/META-INF/metro-services/org.codehaus.stax2.validation.XMLValidationSchemaFactory.relaxng
    WEB-INF/classes/META-INF/metro-services/org.iso_relax.verifier.VerifierFactoryLoader
    WEB-INF/classes/META-INF/metro-services/org.relaxng.datatype.DatatypeLibraryFactory
   
   
    3.1 - Copy the webservices-rt.jar/META-INF/services directory to the WAR file as WEB-INF/classes/META-INF/metro-services.  The ServiceFinder class in step 2.3 will use this directory to lookup the abstract class implementations.
   
    3.2 - Include a WEB-INF\weblogic.xml file with the prefer-web-inf-classes entry to override the System class loader classes with the ones in the WEB-INF\lib directory:
   
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"
                      xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
      <container-descriptor>
        <prefer-web-inf-classes>true</prefer-web-inf-classes>
      </container-descriptor>
    </weblogic-web-app>

   
    3.3 - Place your jar file with the service implementation class and schema classes inside the WEB-INF/lib directory
   
    Here are the contents of the DocumentServiceSoap11.jar file:
   
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/oracle/
    com/oracle/webservices/
    com/oracle/webservices/documentservice/
    com/oracle/webservices/documentservice/Attachment.class
    com/oracle/webservices/documentservice/DSIMSG.class
    com/oracle/webservices/documentservice/Diagnosis.class
    com/oracle/webservices/documentservice/DoCallIDSFault.class
    com/oracle/webservices/documentservice/DoCallIDSFault_Exception.class
    com/oracle/webservices/documentservice/DoCallIDSOneWayRequest.class
    com/oracle/webservices/documentservice/DoCallIDSRequest.class
    com/oracle/webservices/documentservice/DoCallIDSResponse.class
    com/oracle/webservices/documentservice/DocumentService.class
    com/oracle/webservices/documentservice/DocumentServicePortType.class
    com/oracle/webservices/documentservice/Error.class
    com/oracle/webservices/documentservice/Errors.class
    com/oracle/webservices/documentservice/HTTP.class
    com/oracle/webservices/documentservice/JMS.class
    com/oracle/webservices/documentservice/MQ.class
    com/oracle/webservices/documentservice/MQSSLCipherspec.class
    com/oracle/webservices/documentservice/MSGVARS.class
    com/oracle/webservices/documentservice/MSMQ.class
    com/oracle/webservices/documentservice/MarshallerClass.class
    com/oracle/webservices/documentservice/ObjectFactory.class
    com/oracle/webservices/documentservice/Properties.class
    com/oracle/webservices/documentservice/Property.class
    com/oracle/webservices/documentservice/ROW.class
    com/oracle/webservices/documentservice/ROWSET.class
    com/oracle/webservices/documentservice/Results.class
    com/oracle/webservices/documentservice/VAR.class
    com/oracle/webservices/documentservice/handler/
    com/oracle/webservices/documentservice/handler/AddressingFilterHandler.class
    com/oracle/webservices/documentservice/handler/AddressingHTTPHandler.class
    com/oracle/webservices/documentservice/handler/AddressingJMSHandler.class
    com/oracle/webservices/documentservice/handler/AddressingMailHandler.class
    com/oracle/webservices/documentservice/handler/LoggingHandler.class
    com/oracle/webservices/documentservice/package-info.class
    com/oracle/webservices/documentservice/schema/
    com/oracle/webservices/documentservice/schema/validation/
    com/oracle/webservices/documentservice/schema/validation/SchemaValidationErrorHandler.class
    com/oracle/webservices/documentservice/server/
    com/oracle/webservices/documentservice/server/DocumentServiceImpl.class
    com/oracle/webservices/documentservice/util/
    com/oracle/webservices/documentservice/util/ByteArrayDataSource.class
    com/oracle/webservices/documentservice/util/Utility.class

4 - Notes:

    4.1 - Make sure your web.xml file does not include the <display-name> and <description> elements under <servlet> element because they are not supported in the following 2.4 or 2.5 Web Deployment Descriptor XSDs:
       
       
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd

    Weblogic will throw this schema validation error if they are present:
       
    Message icon - Error VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null>

   
    4.2 - Make sure any Oneway methods / operations in your service implementation class have the @Oneway annotation in order to avoid this NPE:
   
    Jul 13, 2009 10:43:10 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
    SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NullPointerException
    java.lang.NullPointerException
        at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:375)
        at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Deploying to Weblogic 10.3.1

Carl Roberts
And here is the final How to (without revisions):


Here are the steps to use the Metro 2.0 JAX-WS implementation instead of Oracle's JAX-WS implementation in Weblogic 10.3.1.0 without affecting the Weblogic domain or other applications under the same domain:

These instructions do not signify that doing this (i.e. replacing the baked in JAX-WS implementation) is supported by Oracle/BEA.

   
1- EAR FILE:

    Create an EAR file and include your WAR file inside it.  Here is the directory structure of the EAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    META-INF/application.xml
    META-INF/weblogic-application.xml
    war_files/
    war_files/DocumentServiceSoap11.war
    APP-INF/
    APP-INF/lib/
    APP-INF/lib/webservices-api.jar
    APP-INF/lib/webservices-extra-api.jar
    APP-INF/lib/webservices-extra.jar
    APP-INF/lib/webservices-rt.jar
    APP-INF/lib/webservices-tools.jar
    APP-INF/classes/
   
       
    1.1 - Include a META-INF/application.xml file to point out the name of the EAR file and the location and context of the WAR file:
   
        <?xml version='1.0' encoding='UTF-8'?>
        <application xmlns="http://java.sun.com/xml/ns/javaee"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <display-name>DocumentServiceSoap11Ear</display-name>
          <module>
            <web>
              <web-uri>war_files/DocumentServiceSoap11.war</web-uri>
              <context-root>DocumentServiceSoap11</context-root>
            </web>
          </module>
        </application>


    1.2 - Include a META-INF/weblogic-application.xml file that uses Weblogic's class loading filtering feature to override the System class loader packages and resources with the ones from the application class loader:
   
   <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.0/weblogic-application.xsd">
    <application-param>
          <param-name>webapp.encoding.default</param-name>
          <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
    <package-name>com.ctc.*</package-name>
    <package-name>com.sun.xml.*</package-name>
    <package-name>com.sun.istack.*</package-name>
    <package-name>com.sun.msv.datatype.*</package-name>
    <package-name>com.sun.msv.driver.*</package-name>
    <package-name>com.sun.msv.grammar.*</package-name>
    <package-name>com.sun.msv.reader.*</package-name>
    <package-name>com.sun.msv.relaxns.*</package-name>
    <package-name>com.sun.msv.scanner.*</package-name>
    <package-name>com.sun.msv.util.*</package-name>
    <package-name>com.sun.msv.verifier.*</package-name>
    <package-name>com.sun.msv.writer.*</package-name>
    <package-name>com.sun.org.apache.xml.internal.*</package-name>
    <package-name>com.sun.wsit.*</package-name>
    <package-name>javax.jws.*</package-name>
    <package-name>javax.xml.bind.*</package-name>
    <package-name>javax.xml.soap.*</package-name>
    <package-name>javax.xml.stream.*</package-name>
    <package-name>javax.xml.ws.*</package-name>
    <package-name>javax.xml.activation.*</package-name>
    <package-name>javax.xml.annotation.*</package-name>
    <package-name>javax.xml.mail.*</package-name>
    <package-name>javax.xml.security.*</package-name>
    <package-name>javax.xml.registry.*</package-name>
    <package-name>javax.xml.rpc.*</package-name>
    <package-name>javax.xml.crypto.*</package-name>
    <package-name>javanet.staxutils.*</package-name>
    <package-name>jp.gr.xml.*</package-name>
    <package-name>org.codehaus.stax2.*</package-name>
    <package-name>org.glassfish.gmbal.*</package-name>
    <package-name>org.iso_relax.*</package-name>
    <package-name>org.jcp.xml.dsig.*</package-name>
    <package-name>org.jvnet.*</package-name>
    <package-name>org.relaxng.*</package-name>    
      </prefer-application-packages>
      <prefer-application-resources>
            <resource-name>META-INF/services/*</resource-name>
      </prefer-application-resources>
    </weblogic-application>
   
     
    1.3 - Make sure the webservices-*.jar files are placed in the APP-INF/lib directory.
   
   
    1.4 - Make sure any Metro classes you are overriding are placed in the APP-INF/classes directory.
       
2 - WAR FILE:
   
    Here is the directory structure of the WAR file:
   
    META-INF/
    META-INF/MANIFEST.MF
    WEB-INF/
    WEB-INF/web.xml
    WEB-INF/sun-jaxws.xml
    WEB-INF/wsdl/
    WEB-INF/wsdl/DocumentService.wsdl
    WEB-INF/wsdl/DocumentService.xsd
    WEB-INF/classes/
    WEB-INF/classes/handlers.xml
    WEB-INF/weblogic.xml
    WEB-INF/lib/
    WEB-INF/lib/DocumentServiceSoap11.jar
   
   
    2.1 - Include a WEB-INF\weblogic.xml file with the prefer-web-inf-classes entry to override the System class loader classes with the ones in the WEB-INF\lib directory:
   
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"
                      xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
      <container-descriptor>
        <prefer-web-inf-classes>true</prefer-web-inf-classes>
      </container-descriptor>
    </weblogic-web-app>

   
    2.2 - Place your jar file with the service implementation class and schema classes inside the WEB-INF/lib directory
   
    Here are the contents of the DocumentServiceSoap11.jar file:
   
    META-INF/
    META-INF/MANIFEST.MF
    com/
    com/oracle/
    com/oracle/webservices/
    com/oracle/webservices/documentservice/
    com/oracle/webservices/documentservice/Attachment.class
    com/oracle/webservices/documentservice/DSIMSG.class
    com/oracle/webservices/documentservice/Diagnosis.class
    com/oracle/webservices/documentservice/DoCallIDSFault.class
    com/oracle/webservices/documentservice/DoCallIDSFault_Exception.class
    com/oracle/webservices/documentservice/DoCallIDSOneWayRequest.class
    com/oracle/webservices/documentservice/DoCallIDSRequest.class
    com/oracle/webservices/documentservice/DoCallIDSResponse.class
    com/oracle/webservices/documentservice/DocumentService.class
    com/oracle/webservices/documentservice/DocumentServicePortType.class
    com/oracle/webservices/documentservice/Error.class
    com/oracle/webservices/documentservice/Errors.class
    com/oracle/webservices/documentservice/HTTP.class
    com/oracle/webservices/documentservice/JMS.class
    com/oracle/webservices/documentservice/MQ.class
    com/oracle/webservices/documentservice/MQSSLCipherspec.class
    com/oracle/webservices/documentservice/MSGVARS.class
    com/oracle/webservices/documentservice/MSMQ.class
    com/oracle/webservices/documentservice/MarshallerClass.class
    com/oracle/webservices/documentservice/ObjectFactory.class
    com/oracle/webservices/documentservice/Properties.class
    com/oracle/webservices/documentservice/Property.class
    com/oracle/webservices/documentservice/ROW.class
    com/oracle/webservices/documentservice/ROWSET.class
    com/oracle/webservices/documentservice/Results.class
    com/oracle/webservices/documentservice/VAR.class
    com/oracle/webservices/documentservice/handler/
    com/oracle/webservices/documentservice/handler/AddressingFilterHandler.class
    com/oracle/webservices/documentservice/handler/AddressingHTTPHandler.class
    com/oracle/webservices/documentservice/handler/AddressingJMSHandler.class
    com/oracle/webservices/documentservice/handler/AddressingMailHandler.class
    com/oracle/webservices/documentservice/handler/LoggingHandler.class
    com/oracle/webservices/documentservice/package-info.class
    com/oracle/webservices/documentservice/schema/
    com/oracle/webservices/documentservice/schema/validation/
    com/oracle/webservices/documentservice/schema/validation/SchemaValidationErrorHandler.class
    com/oracle/webservices/documentservice/server/
    com/oracle/webservices/documentservice/server/DocumentServiceImpl.class
    com/oracle/webservices/documentservice/util/
    com/oracle/webservices/documentservice/util/ByteArrayDataSource.class
    com/oracle/webservices/documentservice/util/Utility.class

3 - Notes:

    3.1 - Make sure your web.xml file does not include the <display-name> and <description> elements under <servlet> element because they are not supported in the following 2.4 or 2.5 Web Deployment Descriptor XSDs:
       
       
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd

    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd

    Weblogic will throw this schema validation error if they are present:
       
    Message icon - Error VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'display-name@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null> problem: cvc-complex-type.2.4a: Expected elements 'servlet-class@http://java.sun.com/xml/ns/javaee jsp-file@http://java.sun.com/xml/ns/javaee' instead of 'description@http://java.sun.com/xml/ns/javaee' here in element servlet@http://java.sun.com/xml/ns/javaee:<null>

   
    3.2 - Make sure any Oneway methods / operations in your service implementation class have the @Oneway annotation in order to avoid this NPE:
   
    Jul 13, 2009 10:43:10 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
    SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NullPointerException
    java.lang.NullPointerException
        at com.sun.xml.ws.model.JavaMethodImpl.freeze(JavaMethodImpl.java:375)
        at com.sun.xml.ws.model.AbstractSEIModelImpl.freeze(AbstractSEIModelImpl


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: RE: Deploying to Weblogic 10.3.1

metro-3
In reply to this post by Carl Roberts
Hi I recently developed a J2EE Program and deployed in Weblogic 10.3
But I am getting error 404...and getting

arted in RUNNING mode>
Dec 10, 2009 12:16:57 AM com.sun.faces.config.ConfigureListener contextInitializ
ed
INFO: Initializing Sun's JavaServer Faces implementation (1.2_03-b04-FCS) for co
ntext '/console'
Dec 10, 2009 12:16:57 AM com.sun.faces.config.ConfigureListener contextInitializ
ed
INFO: Completed initializing Sun's JavaServer Faces implementation (1.2_03-b04-F
CS) for context '/console'
<Dec 10, 2009 12:18:29 AM IST> <Warning> <netuix> <BEA-423420> <Redirect is exec
uted in begin or refresh action. Redirect url is /console/console.portal?_nfpb=t
rue&_pageLabel=AppDeploymentsControlPage.>

Please advise.
[Message sent by forum member 'ankurmdh' ]

http://forums.java.net/jive/thread.jspa?messageID=375626

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

12