我正在尝试将现有的spring web服务迁移到jdk 1.8,从当前版本的jdk迁移到Webphere 9是1.6和websphere 6.我的Web服务按照预期使用jdk 1.6和websphere 6。
org.springframework.ws.server.endpoint.MethodEndpoint.invoke()调用正确的方法,但使用参数org.apache.xmlbeans.impl.values.XmlComplexContentImpl调用该方法,而不是扩展XmlComplexContentImpl类的XXXRequestDocumentImpl。
控制台出错:
[err] java.lang.IllegalArgumentException: argument type mismatch
[err] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[err] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
[err] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
[err] at java.lang.reflect.Method.invoke(Method.java:508)
[err] at org.springframework.ws.server.endpoint.MethodEndpoint.invoke(MethodEndpoint.java:115)
Soap UI中的错误
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring xml:lang="en">Invalid request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
答案 0 :(得分:0)
使用Jdk 1.8和xmlbeans 2.6.0我遇到了错误 并且根本原因是xmlbeans-maven-plugin中缺少xmlConfig标记。因为xmlbeans-maven-plugin没有在\ target \ generated-classes \ xmlbeans \ schemaorg_apache_xmlbeans下生成文件夹schemaorg_apache_xmlbeans。
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xmlbeans-maven-plugin</artifactId>
<version>2.3.2</version>
<executions>
<execution>
<goals>
<goal>xmlbeans</goal>
</goals>
</execution>
</executions>
<!--<inherited>true</inherited>-->
<configuration>
<schemaDirectory>${basedir}/src/main/resources/xsd</schemaDirectory>
<javaSource>1.8</javaSource>
<xmlConfigs>
<xmlConfig implementation="java.io.File">${basedir}/src/main/resources/xsdconfig/xxxxx.xsdconfig</xmlConfig>
</xmlConfigs>
</configuration>
</plugin>