Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8763987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:54:58+00:00 2026-06-13T15:54:58+00:00

I’m a C# developer, but recently I had to rewrite a version of my

  • 0

I’m a C# developer, but recently I had to rewrite a version of my app in Java.

The C# app works with a WCF host/client transmitting custom objects. Since Java is not my specialty I struggled a little to create a working web service that communicated with my WCF host, but I managed to do it. In the process of parsing the WCF custom objects, apparently, Java does most of the work for me, creating all the classes and objects.

However, in any String property of my custom object, it defined it as an JAXBElement. Each of the others properties in this generated class are saved to an XML file, except for those created as “JAXB” properties.

Searching the web I found several articles declaring that the following code would prevent the generation of such property type (leaving only the original property type, in my case String)

<jaxb:bindings version="2.0"
        xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
        xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <jaxb:bindings schemaLocation="schema-importedby-wcfsvcwsdl"
             node="/xs:schema">
    <jaxb:globalBindings generateElementProperty="false"/>
  </jxb:bindings>

The only problem is that it doesn’t say where do I put this code. In my project I have several wsdl and xml files, and though I tried it in a few, none seems to work.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:55:00+00:00Added an answer on June 13, 2026 at 3:55 pm

    Add parameter to generation tool – xjc.

    • save bindings.xml file
    <jaxb:bindings version="2.0" 
    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:bindings node="/xs:schema"> 
            <jaxb:globalBindings generateElementProperty="false"/> 
        </jaxb:bindings> 
    </jaxb:bindings>
    
    • in console / tool add parameter :

      xjc -verbose -b bindings.xml -wsdl my_wsdl_from_c_sharp.wsdl …

    or if you use wsdl2java: wsdl2java -b bindings.xml …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
This could be a duplicate question, but I have no idea what search terms
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want to construct a data frame in an Rcpp function, but when I
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.