Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在WayWebService上创建WayHeader_Java_Web Services_Soap - Fatal编程技术网

Java 如何在WayWebService上创建WayHeader

Java 如何在WayWebService上创建WayHeader,java,web-services,soap,Java,Web Services,Soap,我使用威威网络服务有问题。 我使用wsimport创建了客户端ws 生成该文件后,我调用了ws ManageRebillTestSoap soap = new ManageRebillTest() .getManageRebillTestSoap(); CustomerDetails details = soap.createRebillCustomer(....); 消息返回错误为:根据其数据类型,“CustomerId”元素具有无效值。 Soap消息的格式是 <soap:Envelo

我使用威威网络服务有问题。
我使用wsimport创建了客户端ws
生成该文件后,我调用了ws

ManageRebillTestSoap soap = new ManageRebillTest() .getManageRebillTestSoap();
CustomerDetails details = soap.createRebillCustomer(....);
消息返回错误为:根据其数据类型,“CustomerId”元素具有无效值。

Soap消息的格式是

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <eWAYHeader xmlns="http://www.eway.com.au/gateway/rebill/manageRebill">
      <eWAYCustomerID>string</eWAYCustomerID>
      <Username>string</Username>
      <Password>string</Password>
    </eWAYHeader>
  </soap:Header>
  <soap:Body>
    <CreateRebillCustomer xmlns="http://www.eway.com.au/gateway/rebill/manageRebill">
      <customerTitle>string</customerTitle>
      <customerFirstName>string</customerFirstName>
      <customerLastName>string</customerLastName>
      <customerAddress>string</customerAddress>
      <customerSuburb>string</customerSuburb>
      <customerState>string</customerState>
      <customerCompany>string</customerCompany>
      <customerPostCode>string</customerPostCode>
      <customerCountry>string</customerCountry>
      <customerEmail>string</customerEmail>
      <customerFax>string</customerFax>
      <customerPhone1>string</customerPhone1>
      <customerPhone2>string</customerPhone2>
      <customerRef>string</customerRef>
      <customerJobDesc>string</customerJobDesc>
      <customerComments>string</customerComments>
      <customerURL>string</customerURL>
    </CreateRebillCustomer>
  </soap:Body>
</soap:Envelope>

一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
一串
在上面的方法中,只需添加

有人知道在调用WayWebService上的方法时添加WayHeader或
?请帮帮我。

这里已经回答了-


将选项'-XadditionalHeaders'添加到wsimport命令解决了这个问题。它为方法生成一个额外的参数,通过该参数可以传递/检索头。非常感谢。这就是我要找的。非常有帮助。你好@Jimmy,我是支付网关的新手。例如,您正在使用java第三方库?。请将链接发送到为eaway定义Java api的地方。@jimmy您解决了这个问题吗?