【发布时间】:2018-03-20 07:41:23
【问题描述】:
我有一个需要从 dot net 应用程序调用的 java servlet 服务。我找到了一些代码,但在响应流中我收到了 null。当通过 html 调用时它工作正常。
下面是 html 代码,它在执行时工作,xml 结构化数据被粘贴到文本框中并被调用。
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head><body>
<form action="http://172.18.1.57:8080/webdesktop/APIExecutor" method="POST">
<textarea rows="10" cols="150" name="inXml"></textarea>
<br><br>
<input type="submit" value="register">
</form>
</body></html>
以下是我在 xml 中的输入
<?xml version="1.0"?>
<WMConnect_Input>
<Option>WMConnect</Option>
<EngineName>abcuat</EngineName>
<ApplicationInfo>172.18.1.57</ApplicationInfo>
<Participant>
<Name>username</Name>
<Password>test1234</Password>
<Scope></Scope>
<UserExist>Y</UserExist>
<Locale>en-US</Locale>
<ParticipantType>U</ParticipantType>
</Participant>
</WMConnect_Input>
在xml中输出如下。
这适用于 html,但从 dot net 应用程序会抛出空值。
下面的代码我试过了。
click here to check code i have tried.
提前谢谢你。
【问题讨论】:
标签: java c# asp.net xml servlets