How to use Moxy XPath annotated beans in web services?

前端 未结 1 513
栀梦
栀梦 2020-12-21 14:31

I have a bean

@XmlRootElement(name = \"alpha\")
public class MyBean {
    private String thetaValue;

    @XmlPath(\"beta/theta/text()\")
    public String g         


        
相关标签:
1条回答
  • 2020-12-21 15:11

    There isn't a standards based integration point between JAX-WS (JSR-224) and JAXB (JSR-222) implementations. This means support for EclipseLink MOXy as the JAXB provider is dependent upon the JAX-WS implementation (see note below).

    JAX-WS Provider - Reference Implementation

    Support for MOXy is baked right into the JAX-WS reference implementation. This means any environment leveraging a new enough version of the JAX-WS RI should be able to leverage MOXy as the JAXB provider. I need to find out more about the specifics to do this.

    • http://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-eclipselink-plugin

    Other JAX-WS Providers

    You could leverage the javax.xml.ws.Provider interface instead of the traditional service endpoint interface. Provider gives you access to the actual XML message. With access to the XML message you can interact with it directly using MOXy.

    • http://blog.bdoughan.com/2013/02/leveraging-moxy-in-your-web-service-via.html

    Note

    You can create traditional JAX-WS Web Services that leverage MOXy's extends annotations in the following environments:

    • WebLogic (12.1.1 and above) - EclipseLink MOXy is the JAXB Provider in WebLogic Server 12c
    • GlassFish (3.1.2 and above) - GlassFish 3.1.2 is Full of MOXy (EclipseLink JAXB)
    0 讨论(0)
提交回复
热议问题