项目构建错误:不可解析的POM /pom.xml:实体引用名称不能包含字符='(位置:已看到START_TAG ...)

时间:2018-11-17 05:40:31

标签: java maven web-services spring-boot pom.xml

我正在使用Spring Boot使用SOAP Web服务。要将WSDL转换为Java Binding(Domain)类,我正在使用maven-jaxb2-plugin

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.13.1</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <schemaLanguage>WSDL</schemaLanguage>
        <generateDirectory>${project.basedir}/src/main/java</generateDirectory>
        <generatePackage>com.test.consume</generatePackage>
        <schemas>
            <schema>
                <url>https://test.co.in/cordys/WSDLGateway.wcp?service=http://schemas.cordys.com/default/getIDV&organization=o=B2C,cn=cordys,cn=defaultInst106,o=mydomain.com</url>
            </schema>
        </schemas>
    </configuration>
</plugin>
  

<url>标签中,我这样写了WSDL URL

<url>https://test.co.in/cordys/WSDLGateway.wcp?service=http://schemas.cordys.com/default/getIDV&organization=o=B2C,cn=cordys,cn=defaultInst106,o=mydomain.com</url>
  

但是我遇到了pom.xml的以下问题

Project build error: Non-parseable POM /home/altaf/My Workspace/TestConsumer/pom.xml: entity reference name can not contain character =' (position: START_TAG seen ...wcp?service=http://schemas.cordys.com/default/getIDV&organization=... @64:117)

  

如何解决此问题?

1 个答案:

答案 0 :(得分:0)

我在xml节点内的&遇到了同样的问题。通过将&替换为&amp;来解决,如注释中建议的@ygor。

将其发布为答案以获得更好的可见性。

相关问题