How do I prevent JAXBElement<String> from being generated in a CXF Web Service client?

ScArcher2 :

I'm trying to create a web service client using CXF to consume a WCF web service. When I use wsdl2java it generates objects with JAXBElement types instead of String.

I read about using a jaxb bindings.xml file to set generateElementProperty="false" to try to fix the problem, but the web service I'm consuming contains 7 imported schemas.

How can I specify the generateElementProperty="false" on all seven schemas, or is there a way to apply it to all schemas?

priya :

You have to create a binding file as below, this will get applied globally and use it as wsdl2java - b "bindings.txt" "wsdl"

<jaxb:bindings version="2.1" 
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
   <jaxb:globalBindings generateElementProperty="false"/> 
</jaxb:bindings> 

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How do I prevent two of the same random numbers being generated from two different variables in Python?

How do I prevent versions from being generated for app in Crashlytics with Gradle build

How do i instantiate a JAXBElement<String> object?

How do I prevent a python script from being redirected from a specific web page?

How do I prevent string keys from being converted to symbols in Rails?

How do I preserve a string and prevent it from being destroyed when passing it to an action script block?

How do I prevent a numpy ndarray column from being converted to string when saving a Pandas DataFrame to csv?

How do you use TLS/SSL Http Authentication with a CXF client to a web service?

Service being generated but not client protoc

How do I prevent a leading space from being entered in a textbox?

How do I prevent system information from being displayed on a terminal?

In Swift, how do I prevent a function from being called on a subclass?

How do I prevent HTTP_REFERER from being overwritten

How do I prevent an object from being extended?

How do I prevent my output from being Nan?

CXF create web service client from wsdl programmatically

How do you prevent output from being generated in Go until all error checks have completed?

How would I prevent a integer from being generated more than once in a random generator

how do i call web service from within a web service

What is the entry point in a CXF generated web service?

How do I consume a web service protected with HTTP basic authentication using the CXF framework?

How do I prevent a RESTful service from XSS attacks

How do I prevent service worker from deleting cache, PWA

How can I prevent my Nuxt.js client side code from being delivered? Similar to .htaccess

How to prevent a URL in an email I send from being auto-linked by the recipient's email client?

How do I parse a number out of a web page that is being generated by Javascript, not HTML?

How can I spoof an IP address to prevent being locked out from a service?

How do I render components generated from a string inside of a method?

How do I prevent just 'exit' from being saved when I close an SSH connection?