如何使用javax.xml.bind.annotation在java中添加空白命名空间
我不熟悉SOAP服务,这是我的输出和java类的详细信息如何使用javax.xml.bind.annotation在java中添加空白命名空间,java,annotations,java-annotations,Java,Annotations,Java Annotations,我不熟悉SOAP服务,这是我的输出和java类的详细信息 如何在子类中添加空白 XMLNs/COD>?< /P> 发出请求: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <sendEmail xmlns="http://ws.cns.channel.sendnotification.sdfsfds.com/"> <
如何在子类中添加空白<代码> XMLNs/COD>?< /P> 发出请求:
<?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>
请求头类
@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>
fsdfs
电双凸极
自卫队
DSF
<?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>