gpt4 book ai didi

WSDL : WSAM:input action implicitly generated

转载 作者:行者123 更新时间:2023-12-04 18:07:51 25 4
gpt4 key购买 nike

我在 Eclipse 中使用 JAX WS 创建了一个网络服务并部署到 Weblogic 12c 应用服务器。

@Webservice 类和 WSDL 如下所示。问题是当我将 WSDL 用于 wsimport 时,由于 WSAM:input/ouput 操作而出现错误。我知道它用于 WS 寻址,但我没有在我的@SOAPBinding 中指定任何明确的@Addressing。

问题 1) 为什么在 WSDL 中生成这个。 Altova XML spy 未验证此 WSDL。

问题 2) Wsimport 可以完美地生成客户端工件,只需导入<>。我什至没有提供包含 WSDL 中引用的模式的 -b 绑定(bind)文件。 wsimport 如何在没有绑定(bind)文件的情况下生成客户端工件

谢谢...Venkat

package com.arie.account.web.webservice;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
import javax.xml.ws.Action;
import javax.xml.ws.soap.Addressing;

@WebService(serviceName = "AccountWebservice" , name = "AccountWebservice" )
@SOAPBinding(style = Style.RPC ,use=Use.LITERAL)
public class Account {
@WebMethod
@Action()
public @WebResult(partName="return") AccountResponse getAccountData(
@WebParam(partName="AccountRequestBean") AccountRequestBean accountRequest){
return new AccountResponse();
}
}

这里是 WSDL

<?xml version="1.0" encoding="UTF-8" ?> 
<!-- Published by JAXWS RI at http://jaxws.dev.java.net. RI's version is JAXWS RI 2.2.6hudson86 svnrevision#12773.
>
<! Generated by JAXWS RI at http://jaxws.dev.java.net. RI's version is JAXWS RI 2.2.6hudson86 svnrevision#12773.
-->
<definitions xmlns:wsu="http://docs.oasisopen.org/wss/2004/01/oasis200401wsswssecurityutility1.0.xsd" xmlns:wsp="http://www.w3.org/ns/wspolicy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.account.ivr.arie.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservice.account.arie.com/" name="AccountWebservice">
<types>
<xsd:schema>
<xsd:import namespace="http://webservice.account.arie.com/" schemaLocation="http://localhost:7001/ATRWebStatistics/AccountWebservice?xsd=1" />
</xsd:schema>
</types>
<message name="getAccountData">
<part name="AccountRequestBean" type="tns:accountRequestBean" />
</message>
<message name="getAccountDataResponse">
<part name="return" type="tns:accountResponse" />
</message>
<portType name="AccountWebservice">
<operation name="getAccountData">
<input wsam:Action="http://webservice.account.arie.com/AccountWebservice/getAccountDataRequest" message="tns:getAccountData" />
<output wsam:Action="http://webservice.account.arie.com/AccountWebservice/getAccountDataResponse" message="tns:getAccountDataResponse" />
</operation>
</portType>
<binding name="AccountWebservicePortBinding" type="tns:AccountWebservice">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
<operation name="getAccountData">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" namespace="http://webservice.account.arie.com/" />
</input>
<output>
<soap:body use="literal" namespace="http://webservice.account.arie.com/" />
</output>
</operation>
</binding>
<service name="AccountWebservice">
<port name="AccountWebservicePort" binding="tns:AccountWebservicePortBinding">
<soap:address location="http://localhost:7001/ATRWebStatistics/AccountWebservice" />
</port>
</service>
</definitions

最佳答案

尝试从网络方法中删除@Action()。通常 Action 用于指定寻址的显式操作。

关于WSDL : WSAM:input action implicitly generated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22456456/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com