Giter Club home page Giter Club logo

Comments (4)

whummer avatar whummer commented on July 3, 2024

Can you please provide a short XML snippet of the WSDL file you are using in your tests? Where exactly does the <xs:appinfo> element occur in your WSDL file, and where (in which class) would you expect the @AppInfo annotation to be generated?

Assuming this is the structure of your WSDL file:

<wsdl:definitions ...>
    <wsdl:types>
        <xs:schema ...>
            <xs:complexType name="TestRequest">
                <xs:annotation id="id123">
                    <xs:appinfo source="src 1">appinfo 1</xs:appinfo>
                    ...
                </xs:annotation>
                ...
            </xs:complexType>
        ...
        </xs:schema>
    </wsdl:types>
    ...
</wsdl:definitions>

... then the <xs:appinfo> can occur only within the <xs:schema> element (e.g., within a <xs:complexType> element), not outside of it. Maybe this answers your question. Otherwise, please provide a minimal test case. Thanks

from jaxb-facets.

DramaticallyDecayed avatar DramaticallyDecayed commented on July 3, 2024

Thank you for reply. I'm using test.wsdl from your project. So it has the snippet you presented. I'm running the following command:
./bin/wsimport.sh -keep -B-jaxb-facets -d ~/temp ~/IdeaProjects/jaxb-facets-master/testutils/src/test/resources/test.wsdl
And I'm expecting that file ~/temp/pellcorp/com/service/personservice/TestRequest.java will have @AppoInfo annotation (just as in the file from your project ~/IdeaProjects/jaxb-facets-master/jaxb-impl/src/test/java/at/ac/tuwien/infosys/jaxb/test/TestRequest.java):

...
@Documentation("doc 3")
@AppInfo(source = "src 1", value = "appinfo 1")
@SuppressWarnings("all")
@Assert(test = "not(bar1) or not(bar2)")
public class TestRequest {
    @XmlAttribute
    public ChartType type;
...

But instead genereated file (~/temp/pellcorp/com/service/personservice/TestRequest.java) has only @document annotation:

...
@Annotation(documentation = @Documentation("doc 3"))
public class TestRequest {

    @XmlElement(required = true)
    @Facets(pattern = "[0-9]+", whiteSpace = Facets.WhiteSpace.preserve)
...

from jaxb-facets.

whummer avatar whummer commented on July 3, 2024

Thanks for reporting. I have pushed a new version 898c4e0 which contains basic support for @AppInfo in generated Java classes.

When you have an element like this one:

<xs:complexType name="TestRequest">
                <xs:annotation>
                    <xs:appinfo source="src 1"><foo xmlns="myns123">appinfo 1</foo></xs:appinfo>
                    <xs:documentation source="src 1" xml:lang="en">doc 1</xs:documentation>
                </xs:annotation>
                ...

... then the generated source will look like this:

@Annotation(documentation = @Documentation("doc 1"), appinfo = @AppInfo("<foo xmlns=\"myns123\">appinfo 1</foo>"))
public class TestRequest {
...

However, there are some limitations imposed on us, due to issues in JAXB/XJC:

Version number has not been changed. To use this updated version, please clean your Maven cache in $HOME/.m2/repository and the updated version will be automatically re-downloaded.

Closing this issue for now. Please feel free to re-open if there are any other issues/questions.

from jaxb-facets.

DramaticallyDecayed avatar DramaticallyDecayed commented on July 3, 2024

Thanks a lot!

from jaxb-facets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.