Apache CXF 3.1.8 Codegen-cxf-plugin禁用验证
我在我的ejb项目中使用Codegen-cxf-plugin作为soap客户端工作。
private static WsProviderPortType lkService = null;
WsProviderService lk = new WsProviderService(new URL(AppConfig.getConfig().getProperty("lk.service")));
lkService = lk.getWsProviderPort();
@WebServiceClient(name = "WsProviderService",
wsdlLocation = "file:/C:/src/lklB2B/lkB2B_ejb/src/main/resources/wsdl/test/lk_srv.wsdl",
targetNamespace = "http://south.rt.ru/WsProvider/")
public class WsProviderService extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://south.rt.ru/WsProvider/", "WsProviderService");
public final static QName WsProviderPort = new QName("http://south.rt.ru/WsProvider/", "WsProviderPort");
static {
URL url = null;
try {
url = new URL("file:/C:/src/lklB2B/lkB2B_ejb/src/main/resources/wsdl/test/lk_srv.wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(WsProviderService.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "file:/C:/src/lklB2B/lkB2B_ejb/src/main/resources/wsdl/test/lk_srv.wsdl");
}
WSDL_LOCATION = url;
}
public WsProviderService(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public WsProviderService(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public WsProviderService() {
super(WSDL_LOCATION, SERVICE);
}
public WsProviderService(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public WsProviderService(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public WsProviderService(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
......
<wsdl:portType name="WsProviderPortType">
<wsdl:operation name="UpdateStatus">
<wsdl:input name="UpdateStatusRequest" message="tns:UpdateStatusRequest">
</wsdl:input>
<wsdl:output name="UpdateStatusResponse" message="tns:UpdateStatusResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="canCharge">
<wsdl:input name="canChargeRequest" message="tns:canChargeRequest"/>
<wsdl:output name="canChargeResponse" message="tns:canChargeResponse"/>
</wsdl:operation>
<wsdl:operation name="getOrder">
<wsdl:input name="getOrderRequest" message="tns:getOrderRequest">
</wsdl:input>
<wsdl:output name="getOrderResponse" message="tns:getOrderResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getAvailableSIMCardsList">
<wsdl:input name="getAvailableSIMCardsListRequest" message="tns:getAvailableSIMCardsListRequest">
</wsdl:input>
<wsdl:output name="getAvailableSIMCardsListResponse" message="tns:getAvailableSIMCardsListResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="updateOrderStatus">
<wsdl:input name="updateOrderStatusRequest" message="tns:updateOrderStatusRequest">
</wsdl:input>
<wsdl:output name="updateOrderStatusResponse" message="tns:updateOrderStatusResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="createOrderB2B">
<wsdl:input name="createOrderB2BRequest" message="tns:createOrderB2BRequest">
</wsdl:input>
<wsdl:output name="createOrderB2BResponse" message="tns:createOrderB2BResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="searchOrder">
<wsdl:input name="searchOrderRequest" message="tns:searchOrderRequest">
</wsdl:input>
<wsdl:output name="searchOrderResponse" message="tns:searchOrderResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="UpdateStatusLastMileCMS">
<wsdl:input name="UpdateStatusLastMileCMSRequest" message="tns:UpdateStatusLastMileCMSRequest">
</wsdl:input>
<wsdl:output name="UpdateStatusLastMileCMSResponse" message="tns:UpdateStatusLastMileCMSResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WsProviderServiceSoapBinding" type="tns:WsProviderPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="UpdateStatus">
<wsdl:input name="UpdateStatusRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="UpdateStatusResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="canCharge">
<wsdl:input name="canChargeRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="canChargeResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getOrder">
<wsdl:input name="getOrderRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getOrderResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getAvailableSIMCardsList">
<wsdl:input name="getAvailableSIMCardsListRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getAvailableSIMCardsListResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="updateOrderStatus">
<wsdl:input name="updateOrderStatusRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="updateOrderStatusResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="createOrderB2B">
<wsdl:input name="createOrderB2BRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="createOrderB2BResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="searchOrder">
<wsdl:input name="searchOrderRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="searchOrderResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="UpdateStatusLastMileCMS">
<wsdl:input name="UpdateStatusLastMileCMSRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="UpdateStatusLastMileCMSResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WsProviderService">
<wsdl:port name="WsProviderPort" binding="tns:WsProviderServiceSoapBinding">
<soap:address location="http://lkdevel2.south.rt.ru/wsp/soap/wsprovider/lk_srv"/>
</wsdl:port>
</wsdl:service>
这是我的pom:
</dependencies>
<properties>
<cxf-version>3.1.8</cxf-version>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>test</id>
<dependencies>
<dependency>
<groupId>ru.rt.mdm</groupId>
<artifactId>fw_ejb</artifactId>
<version>${mdm.fw.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.1.8</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
${basedir}/src/main/resources/wsdl/test/newordernotificationb2b_client_ep.wsdl
</wsdl>
<extraargs>
<extraarg>-p</extraarg>
<extraarg>http://result.general.rt.ru=ru.rt.general.result.mrf.center
</extraarg>
<extraarg>-p</extraarg>
<extraarg>
http://problem.result.general.rt.ru=ru.rt.general.result.mrf.center.problem
</extraarg>
</extraargs>
</wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/test/wsAttachment.wsdl</wsdl>
</wsdlOption>-->
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<cxf-version>3.1.8</cxf-version>
<mdm.fw.version>3.0</mdm.fw.version>
<mdm.domain.jar>domain-3.0.jar</mdm.domain.jar>
<service.login>testLogin</service.login>
<service.password>testPass</service.password>
</properties>
</profile>
</profiles>
解决方案之一是在服务类中添加BindingProvider,并在getRequestContext()方法中设置endpoint设置:
BindingProvider bp = (BindingProvider) lkService;
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, AppConfig.getConfig().getProperty("lk.service"));
问题内容: 已关闭 。这个问题是基于观点的。它当前不接受答案。 想改善这个问题吗? 更新问题,以便通过编辑此帖子以事实和引用的形式回答。 8个月前关闭。 您如何准备您的SQL增量?您是将每个更改架构的SQL手动保存到增量文件夹中,还是有某种自动差异化过程? 我对与数据库代码一起进行版本控制的约定感兴趣。也许是一个预先提交的钩子,可以与架构进行区分? 此外,除了DbDeploy之外,还有哪些差异差异
问题内容: 基本上我想 从主应用程序上的按钮进行调用。我用这个 当 我出现并关闭它时,/ 也关闭。我尝试添加,但也无法正常工作。如何获得? 任何帮助,将不胜感激。 问题答案: 改变如下。 如果添加false,则close属性的默认出口变为false。
我正在阅读以及如何从这里配置它,当我向下阅读这一页时,我想知道我为什么要这样做,我可以通过它获得什么好处。 我搜索了类似的问题,并到达这里,但仍然不相信相同的。 谁能解释一下我,我可以用同样的方式获得什么好处?
问题内容: 我试图解决日食方面的问题,所以我单击了: 现在,我有了一个新的视图,并且出现了很多错误,而且我不知道如何返回上一步并取消此操作。 你有什么想法吗? 先感谢您。 问题答案: 去你的 编辑档案 对此文件进行 备份 以防万一 搜索标签并删除所有引用,但以下引用除外: 上一行说您正在使用一个Maven项目。 删除其他行,例如:
问题内容: 我找不到有关如何关闭hbm2ddl的参考。 问题答案: 只是忽略默认设置,使Hibernate不执行任何操作。从参考文档中: 1.1.4。hibernate配置 该选项打开直接在数据库中自动生成数据库模式的功能。 也可以通过删除配置选项将其关闭 ,或在SchemaExport Ant任务的帮助下将其重定向到文件。 设置为(未记录)可能会生成警告,例如: