I have in my WSDL file parts like that:

    <operation name="PROVIDER">
        <input message="s0:PROVIDERSoapIn"/>
        <output message="s0:PROVIDERSoapOut"/>
    </operation>

    <operation name="PROVIDER">
        <soap:operation soapAction="http://someSoapAtion" style="document"/>
        <input>
            <soap:body use="literal"/>
        </input>
        <output>
            <soap:body use="literal"/>
        </output>
    </operation>

and several

    <s:attribute name="PROVIDER" type="s:string"/>

in several complex types.

On the other hand, I have

        <s:complexType name="ArrayOfProviderProvider">
            <s:sequence>
                <s:element maxOccurs="unbounded" minOccurs="0" name="Provider" nillable="true" type="s0:Provider"/>
            </s:sequence>
        </s:complexType>
        <s:complexType name="Provider">
            <s:attribute name="SYSCODE" use="required">
                <s:simpleType>
                    <s:restriction base="s:string">
                        <s:maxLength value="25"/>
                    </s:restriction>
                </s:simpleType>
            </s:attribute>
         ....

On generation by jaxws-maven-plugin configured as

        <plugin>
            <!--https://github.com/mojohaus/jaxws-maven-plugin/issues/54-->
            <groupId>com.helger.maven</groupId>
            <artifactId>jaxws-maven-plugin</artifactId>
            <version>2.6.2</version>
            <executions>
                <execution>
                    <goals>
                        <goal>wsimport</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <vmArgs>
                    <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
                </vmArgs>
                <args>
                    <arg>-B-XautoNameResolution</arg>
                </args>
                <verbose>true</verbose>
                <wsdlFiles>
                    <wsdlFile>${project.basedir}/src/main/resources/META-INF/wsdl/our.wsdl.xml</wsdlFile>
                </wsdlFiles>
                <packageName>com.openpayment.client.kamp</packageName>
            </configuration>
        </plugin>

I'm getting the below errors of conflicts between those 2 namings:

[INFO] jaxws:wsimport args: [-keep, -s, 'ourpathtotarget\target\generated-sources\wsimport', -d, 'ourpathtotarget\target\classes', -verbose, -encoding, UTF-8, -Xnocompile, 
-B-XautoNameResolution, -p, com.openpayment.client.kamp,  "file:/ourpath/src/main/resources/META-INF/wsdl/our.wsdl.xml"]
parsing WSDL...


[ERROR] A class/interface with the same name "com.openpayment.client.kamp.PROVIDER" is already in use. Use a class customization to resolve this conflict.
  line 2639 of file:ourpathtosrc/src/main/resources/META-INF/wsdl/AWGW.WS.xml

[ERROR] (Relevant to above error) another "Provider" is generated from here.
  line 2691 of file:ourpathtosrc/src/main/resources/META-INF/wsdl/AWGW.WS.xml

[ERROR] This error is caused because on Windows you cannot have both "Provider.java" and "PROVIDER.java" in the same directory.


Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at org.codehaus.mojo.jaxws.Invoker.main(Invoker.java:109)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.mojo.jaxws.Invoker.main(Invoker.java:99)
Caused by: com.sun.tools.ws.wscompile.AbortException
        at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:144)
        at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2298)
        at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:198)
        at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:141)
        at com.sun.tools.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:444)
        at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:205)
        at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:183)
        ... 5 more

How to work this conflict around? Note, that I have no XSD file as it wasn't provided to me.

0

There are 0 answers