Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
315 views
in Technique[技术] by (71.8m points)

java - jaxws 2.1.5 on weblogic 10.3.1 instead of pre-installed jaxws 2.1.1?

Is it possible, and when yes, how?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Actually, the JAX-WS implementation bundled in WebLogic 10.3 is based on JAX-WS RI 2.1.4 as documented in the What's New in WebLogic Server:

The WebLogic Server implementation of JAX-WS is based on the JAX-WS Reference Implementation (RI), Version 2.1.4, and includes enhancements to the tool layer to simplify the building and deployment of JAX-WS services and to ease the migration from JAX-RPC to JAX-WS. The following features and enhancements are available from the JAX-WS RI 2.1.4.

But this is just a side note :) Now, to answer your question, yes, it is possible. Basically, the idea is to package everything as an EAR and to provide a weblogic-application.xml to specify the Java packages that need to loaded from the EAR instead of from WebLogic's default classloader. To do so, follow these steps:

  1. Create an EAR with your war embedded in it
  2. In the META-INF/weblogic-application.xml of your EAR, put

    <?xml version="1.0" encoding="UTF-8"?>
    <weblogic-application>
      <application-param>
        <param-name>webapp.encoding.default</param-name>
        <param-value>UTF-8</param-value>
      </application-param>
      <prefer-application-packages>
        <package-name>com.sun.xml.*</package-name>
        <package-name>javax.xml.bind.*</package-name>
        <package-name>javax.jws.*</package-name>
        <package-name>javax.xml.soap.*</package-name>
      </prefer-application-packages>
    </weblogic-application>
    
  3. Put the required JARs in the WEB-INF/lib of your WAR.

If WebLogic is reporting classloading issues, you may have to add more Java packages under the prefer-application-packages element.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...