クラスコンストラクターに引数を渡そうとしていますが、成功していません。私は以下を試しました
PHP
$c = "site.wsdl";
$client = new SoapClient($c,array('classmap' => array('state' => "mystate",'county' => "mycounty")),array("trace"=> 1,"exceptions" => 1));
$client = new SoapClient($c,array('classmap' => array('state' => "mystate",'county' => "mycounty")));
$client = new SoapClient($c,array('state' => "mystate",'county'=>"mycounty"));
WebサービスコードJava
@WebService
public class MyWebservice{
String test = "";
/**
*
* @param county
* @param state
*/
public MyWebservice(@WebParam(name = "county") String county,
@WebParam(name = "state") String state) {
test= county+"_"+state;
//want to use this String elsewhere in the class
}
}
エラー
Fatal error: Uncaught SoapFault exception: [S:Server] com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class
コンストラクターからパラメーターを削除しても、soapクライアントの作成に問題はありません。
助けてくれてありがとう。