我不熟悉soap服务,这是我的输出和java类的细节。
如何添加空白 xmlns
在小班?
输出请求:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sendEmail xmlns="http://ws.cns.channel.sendnotification.sdfsfds.com/">
<EmailNotificationRequest>
<requestHeader>
<channel>fsdfs</channel>
<subChannel>sdfds</subChannel>
<systemName>sdfsd</systemName>
<applicationName>dsfs</applicationName>
</requestHeader>
</EmailNotificationRequest>
</sendEmail>
程序包类
@javax.xml.bind.annotation.XmlSchema(namespace = "http://ws.cns.channel.sendnotification.sdfsfds.com/",
elementFormDefault = XmlNsForm.QUALIFIED
)
package com.etisalat.sendnotification.channel.cns.ws;
import javax.xml.bind.annotation.XmlNsForm;
请求头类
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "requestHeader", propOrder = {
"channel",
"subChannel",
"agentID",
"systemName",
"applicationName",
"hostID",
"requestDate"
})
public class RequestHeader {
@XmlElement(required = true)
protected String channel;
protected String subChannel;
protected String agentID;
@XmlElement(required = true)
protected String systemName;
protected String applicationName;
}
所需输入请求
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sendEmail xmlns="http://ws.cns.channel.sendnotification.sdfsfds.com/">
<EmailNotificationRequest>
<requestHeader xmlns="">
<channel>fsdfs</channel>
<subChannel>sdfds</subChannel>
<systemName>sdfsd</systemName>
<applicationName>dsfs</applicationName>
</requestHeader>
</EmailNotificationRequest>
</sendEmail>
暂无答案!
目前还没有任何答案,快来回答吧!