📄 wsfromjava.aspx.htm
字号:
me. I'm not happy unless I'm learning something new.<br>
<table>
<tbody><tr id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_jobTitleRow">
<td class="SmallText" nowrap="nowrap">Occupation: </td>
<td width="100%"><span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberJobTitle" class="SmallText">Web Developer</span></td>
</tr>
<tr id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_locationRow">
<td class="SmallText">Location: </td>
<td width="100%"><span id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberLocation" class="SmallText"><img src="WSfromJava.aspx_files/UK.gif" alt="United Kingdom" height="11" width="16"> United Kingdom</span></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<br>
<table id="ctl00_PopularArticlesRow" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr valign="top">
<td style="width: 100%;">
<h2>Other popular XML articles:</h2><ul><li><a href="http://www.codeproject.com/KB/XML/csharpcodedocumentation.aspx">C# and XML Source Code Documentation</a><div class="SmallText">Demonstrates how to use C#.NET's XML source documentation to produce professional, indexed and searchable source documentation.</div></li><li><a href="http://www.codeproject.com/KB/XML/MTOMWebServices.aspx">Sending Files in Chunks with MTOM Web Services and .NET 2.0</a><div class="SmallText">How to send large files across web services in small chunks using MTOM (WSE 3)</div></li><li><a href="http://www.codeproject.com/KB/XML/ooxml_is_defective.aspx">Microsoft Office XML formats ? Defective by design</a><div class="SmallText">Case studies why Microsoft Office XML formats are broken</div></li><li><a href="http://www.codeproject.com/KB/XML/xmlserializerforunknown.aspx">XmlSerializer and 'not expected' Inherited Types</a><div class="SmallText">A solution to XmlSerializing inherited types not known until runtime.</div></li><li><a href="http://www.codeproject.com/KB/XML/xml_serializationasp.aspx">Load and save objects to XML using serialization</a><div class="SmallText">A C# program to demonstrate loading and saving an object to an XML file using XML serialization encapsulated in a wrapper class.</div></li></ul>
<h2></h2>
</td>
<td>
<iframe src="WSfromJava.aspx_files/ServeThirdParty_004.htm" frameborder="0" height="250" scrolling="no" width="300"></iframe>
</td>
</tr>
</tbody></table>
<div id="ctl00_AddTo_AddTo" style="margin: 10px;">
<script language="JavaScript" type="text/javascript">
var addtoMethod=1;
var AddURL = document.location.href;
var AddTitle = escape(document.title);
DrawLinks(100, 0, "SmallText Bold", "AddTo")
</script><span class="SmallText Bold">Add this article to: </span> <a class="AddTo" title="Add this page to Digg" onclick="return addto(0);" href="#"><img src="WSfromJava.aspx_files/AddTo_Digg.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Del.icio.us" onclick="return addto(1);" href="#"><img src="WSfromJava.aspx_files/AddTo_Delicious.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Google" onclick="return addto(2);" href="#"><img src="WSfromJava.aspx_files/AddTo_Google.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Windows Live" onclick="return addto(3);" href="#"><img src="WSfromJava.aspx_files/AddTo_Live.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Yahoo! MyWeb" onclick="return addto(4);" href="#"><img src="WSfromJava.aspx_files/AddTo_Yahoo.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Technorati" onclick="return addto(5);" href="#"><img src="WSfromJava.aspx_files/AddTo_Technorati.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Blink" onclick="return addto(6);" href="#"><img src="WSfromJava.aspx_files/AddTo_Blink.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Facebook" onclick="return addto(7);" href="#"><img src="WSfromJava.aspx_files/AddTo_Facebook.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Furl" onclick="return addto(8);" href="#"><img src="WSfromJava.aspx_files/AddTo_Furl.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Simpy" onclick="return addto(9);" href="#"><img src="WSfromJava.aspx_files/AddTo_Simpy.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Reddit" onclick="return addto(10);" href="#"><img src="WSfromJava.aspx_files/AddTo_Reddit.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Newsvine" onclick="return addto(11);" href="#"><img src="WSfromJava.aspx_files/AddTo_Newsvine.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Stumbleupon" onclick="return addto(12);" href="#"><img src="WSfromJava.aspx_files/AddTo_stumbleupon.png" align="absmiddle" border="0" height="16" width="16"></a> <a class="AddTo" title="Add this page to Mr. Wong" onclick="return addto(13);" href="#"><img src="WSfromJava.aspx_files/AddTo_MrWong.png" align="absmiddle" border="0" height="16" width="16"></a>
</div>
<table id="ctl00_RateArticleRow" class="RatingBar" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td><a href="#_top">Article Top</a></td>
<td align="right">
<table cellpadding="0" cellspacing="0" width="100%"><tbody><tr>
<td id="ctl00_RateArticle_VoteResultDiv" align="right" nowrap="nowrap" width="100%">
<span id="voteRes"></span>
<img id="loaderImg" alt="loading..." src="WSfromJava.aspx_files/ajax-loader.gif" style="display: none;" height="16" width="16">
</td>
<td id="voteTbl" style="white-space: nowrap;" class="SmallText" align="right">
<table><tbody><tr>
<td id="ctl00_RateArticle_RateText" style="padding-right: 5px; white-space: nowrap;"><i><b>Rate this Article for us!</b></i></td>
<td id="ctl00_RateArticle_StartForm" align="right"><i> Poor</i></td>
<td id="ctl00_RateArticle_VoteFormDiv" style="white-space: nowrap;" align="left">
<table id="ctl00_RateArticle_VoteRBL" border="0">
<tbody><tr>
<td><input id="ctl00_RateArticle_VoteRBL_0" name="ctl00$RateArticle$VoteRBL" value="1" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_1" name="ctl00$RateArticle$VoteRBL" value="2" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_2" name="ctl00$RateArticle$VoteRBL" value="3" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_3" name="ctl00$RateArticle$VoteRBL" value="4" type="radio"></td><td><input id="ctl00_RateArticle_VoteRBL_4" name="ctl00$RateArticle$VoteRBL" value="5" type="radio"></td>
</tr>
</tbody></table>
</td>
<td id="ctl00_RateArticle_EndForm" align="left" nowrap="nowrap"><i>Excellent</i>
<input name="ctl00$RateArticle$SubmitRateBtn" value="Vote" onclick="return rateItem(5867,2);" id="ctl00_RateArticle_SubmitRateBtn" class="FormButton" type="submit">
</td>
<td><span id="ctl00_RateArticle_ErrorMessage"></span></td>
</tr></tbody></table>
</td>
</tr></tbody></table>
</td>
</tr>
</tbody></table>
<div>
<input name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWCAK21oS5DQLAlMXDBwLBlMXDBwLClMXDBwLDlMXDBwLElMXDBwLP+++tCwK5upDkCy7DoO88QzhFNgZfx3eLssOQx/kB" type="hidden">
</div></form>
<div style="padding: 10px; overflow: hidden; text-align: center; white-space: nowrap;">
<iframe src="WSfromJava.aspx_files/ServeThirdParty_005.htm" frameborder="0" height="60" scrolling="no" width="468"></iframe>
</div>
<a name="_comments"></a><!-- Forum Start -->
<div id="_MessageBoard" onclick="return SwitchMessage(event, null)">
<table id="ForumTable" class="Frm_MainTable" cellpadding="0" cellspacing="0">
<tbody><tr>
<td><form action="/script/Forums/SetOptions.aspx?floc=%2fKB%2fXML%2fWSfromJava.aspx&fid=31497" method="get" style="margin: 0pt; padding: 0pt;">
<input name="fid" value="31497" type="hidden"><input name="currentQS" value="?floc=%2fKB%2fXML%2fWSfromJava.aspx&fid=31497" type="hidden"><input name="floc" value="/KB/XML/WSfromJava.aspx" type="hidden"><table border="0" cellpadding="3" cellspacing="0" width="100%">
<tbody><tr class="Frm_HeaderRow1">
<td style="white-space: nowrap;"><img src="WSfromJava.aspx_files/forum_faq.gif" alt="FAQ" align="middle" border="0" height="16" width="16"> <a href="http://www.codeproject.com/script/Forums/FAQ.aspx"><b>FAQ</b></a> </td><td style="white-space: nowrap; text-align: right;">Noise Tolerance<select size="1" class="Frm_DropDown" name="noise">
<option value="1">Very High</option><option value="2">High</option><option selected="selected" value="3">Medium</option><option value="4">Low</option><option value="5">Very Low</option>
</select></td><td colspan="2" style="white-space: nowrap; text-align: right;"><img src="WSfromJava.aspx_files/forum_search.gif" alt="Search" align="top" border="0" height="15" width="16"> <a href="http://www.codeproject.com/script/Forums/Search.aspx?fid=31497">Search Messages</a> </td><td style="text-align: right;"><input value="Set Options" name="submit" class="Frm_Button" type="submit"></td>
</tr><tr class="Frm_HeaderRow2">
<td style="width: 100%;"> </td><td style="white-space: nowrap; text-align: right;">Layout<select size="1" class="Frm_DropDown" name="view">
<option selected="selected" value="Quick">Normal</option><option value="Topic">Expand Root Messages</option><option value="Expanded">Expand All Messages</option><option value="Thread">Thread View</option><option value="Normal">No Javascript (slow)</option><option value="Preview">No Javascript Preview</option>
</select> </td><td style="white-space: nowrap;">Per page<select size="1" class="Frm_DropDown" name="mpp">
<option value="10">10</option><option selected="selected" value="25">25</option><option value="50">50</option>
</select> </td><td colspan="2"> </td>
</tr>
</tbody></table>
</form></td>
</tr><tr>
<td><a name="xx0xx"></a><table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr class="Frm_NavigationBar">
<td><img src="WSfromJava.aspx_files/forum_newmsg.gif" alt="new" align="top" border="0" height="16" width="16"><a href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=31497&floc=/KB/XML/WSfromJava.aspx" class="Frm_HL" name="Frm_HoverNL" title="Create a new message thread" target="_top"><b>New Message</b></a></td><td>Msgs 1 to 25 of 57 (Total in Forum: 57) (<a href="http://www.codeproject.com/KB/XML/WSfromJava.aspx?fid=31497">Refresh</a>)</td><td style="text-align: right; white-space: nowrap;"><span class="Frm_HL">First</span><span class="Frm_HL">Prev</span><a class="Frm_HL" name="Frm_HoverNL" href="http://www.codeproject.com/KB/XML/WSfromJava.aspx?fid=31497&fr=26#xx0xx">Next</a></td>
</tr>
</tbody></table></td>
</tr><tr>
<td><table class="Frm_MsgTable" border="0" cellpadding="0" cellspacing="0" width="100%">
<!-- Column Headers -->
<tbody><tr class="Frm_ColumnHeaders">
<td style="width: 100%;"><table border="0" cellpadding="2" cellspacing="0" width="100%">
<tbody><tr>
<td>Subject </td><td class="Frm_MsgAuthor"> Author </td><td class="Frm_MsgDate">Date </td>
</tr>
</tbody></table></td>
</tr><tr>
<td><img src="WSfromJava.aspx_files/t_002.gif" alt="" border="0" height="5" width="1"></td>
</tr>
<!-- Start Message head -->
<tr class="MsgHd Rt HdUnSel" id="F2472971_h0">
<td width="100%"><table class="QuickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td class="Frm_MsgIndent" width="16"><a name="xx2472971xx"></a><img src="WSfromJava.aspx_files/msg_question.gif" alt="Question" align="top" height="16" width="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="2472971" href="http://www.codeproject.com/KB/XML/WSfromJava.aspx?fid=31497&select=2472971#xx2472971xx">Unable to connect to .NET web service</a></td><td style="width: 20px; white-space: nowrap;"><img src="WSfromJava.aspx_files/member_sm.gif" title="member" alt="member" border="0" height="16"></td><td class="Frm_MsgAuthor"><a href="http://www.codeproject.com/script/Membership/Profiles.aspx?mid=2094181">Member 2094181</a></td><td class="Frm_MsgDate" style="vertical-align: top; white-space: nowrap;">6:42 19 Mar '08 </td>
</tr>
</tbody></table></td>
</tr><!-- End Message head -->
<tr id="F2472971_h1" style="display: none;">
<td style="width: 100%;"><table class="QuickBd" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td class="Frm_MsgIndent" style="width: 16px;"></td><td class="MsgBd BdSel"><table border="0" cellpadding="0" cellspacing="5" width="100%">
<tbody><tr>
<td><table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td colspan="2">Hi David (and others)<br><br>I'm trying to use <b>SoapRequestBuilder</b> to make a SOAP call to .NET web service. But it is unsuccessful. I really hope you can help me out.<br><br>The exception that i received is as following:<br><small>java.net.SocketException: Connection reset<br> at java.net.SocketInputStream.read(SocketInputStream.java:195)<br> at java.net.SocketInputStream.read(SocketInputStream.java:114)<br> at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:325)<br> at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)<br> at java.io.InputStreamReader.read(InputStreamReader.java:208)<br> at java.io.BufferedReader.fill(BufferedReader.java:153)<br> at java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code))<br> at java.io.BufferedReader.readLine(BufferedReader.java:379)<br> at com.s1.affin.test.SoapRequestBuilder.sendRequest(SoapRequestBuilder.java:134)<br> at com.s1.affin.test.cheong_test.testSoapRequestBuilder(cheong_test.java:49)<br> at com.s1.affin.test.cheong_test.main(cheong_test.java:32)<br>Response=Error: cannot communicate.</small><br><br><br>Below is my coding:<br><code> public static void testSoapRequestBuilder() {<br> try {<br> String strToSend = "some value";<br> SoapRequestBuilder srb = new SoapRequestBuilder();<br> srb.Server = "172.17.2.140";<br> srb.MethodName = "StmtCycleInq";<br> srb.XmlNamespace = "http://tempuri.org/";<br> srb.WebServicePath = "/BSDwsvc/RIBStmtInqService.asmx";<br> srb.SoapAction = srb.XmlNamespace+srb.MethodName;<br> srb.AddParameter("RequestMessage", strToSend);<br> String response = srb.sendRequest();<br> System.out.println("Response="+response);<br> } catch (Exception e) {<br> e.printStackTrace();<br> }<br> }</code><br><br><br>And below is the SOAP information i see when i open <a href="http://172.17.2.140/BSDwsvc/RIBStmtInqService.asmx?op=StmtCycleInq">http://172.17.2.140/BSDwsvc/RIBStmtInqService.asmx?op=StmtCycleInq</a>[<a href="http://172.17.2.140/BSDwsvc/RIBStmtInqService.asmx?op=StmtCycleInq" target="_blank" title="New Window">^</a>]<br><br><small><br>POST /BSDwsvc/RIBStmtInqService.asmx HTTP/1.1<br>Host: 172.17.2.140<br>Content-Type: text/xml; charset=utf-8<br>Content-Length: length<br>SOAPAction: "http://tempuri.org/StmtCycleInq"<br><br><?xml version="1.0" encoding="utf-8"?><br><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/"><br> <soap:Body><br> <StmtCycleInq xmlns="http://tempuri.org/"><br> <RequestMessage>string</RequestMessage><br> </StmtCycleInq><br> </soap:Body><br></soap:Envelope><br></small><br><br><br>Many many thanks in advance.<br><br>Thank you<br><br>Regards,<br>Cheong <br></td>
</tr><tr style="vertical-align: middle;">
<td class="Frm_MsgFt"><a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=31497&select=2472971&floc=/KB/XML/WSfromJava.aspx&fa=r" title="Reply">Reply</a>路<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/Edit.aspx?fid=31497&select=2472971&floc=/KB/XML/WSfromJava.aspx&fa=e" title="Email">Email</a>路<a class="Frm_MHL" href="http://www.codeproject.com/KB/XML/WSfromJava.aspx?fid=31497&tid=2472971" title="View Thread">View Thread</a>路<a class="Frm_MHL" href="http://www.codeproject.com/script/Forums/View.aspx?fid=31497&msg=2472971" title="Get permanent link">PermaLink</a>路<a class="Frm_MHL" href="http://www.codeproject.com/script/Bookmarks/Add.aspx?&obid=2472971&obtid=3&bma=AddBookmark" title="Bookmark this post">Bookmark</a></td><td class="Frm_MsgFt" style="text-align: right;"><span id="MVF2472971" style="white-space: nowrap;"><script type="text/javascript">
MsgVoteForm(2094181,2472971,false,"","","");
</script>Rate this message: <a href="#xx2472971xx" onclick="RateMsg(2094181, 2472971,1);"><img src="WSfromJava.aspx_files/thumbs_down.gif" alt="vote 1" align="middle" border="0" height="14" width="14"></a> <a class="Frm_MHL" href="#xx2472971xx" title="vote this message a 1" onclick="RateMsg(2094181, 2472971, 1)"><b>1</b></a> <a class="Frm_MHL" href="#xx2472971xx" title="vote this message a 2" onclick="RateMsg(2094181, 2472971, 2)"><b>2</b></a> <a class="Frm_MHL" href="#xx2472971xx" title="vote this message a 3" onclick="RateMsg(2094181, 2472971, 3)"><b>3</b></a> <a class="Frm_MHL" href="#xx2472971xx" title="vote this message a 4" onclick="RateMsg(2094181, 2472971, 4)"><b>4</b></a> <a class="Frm_MHL" href="#xx2472971xx" title="vote this message a 5" onclick="RateMsg(2094181, 2472971, 5)"><b>5</b></a> <a href="#xx2472971xx" onclick="RateMsg(2094181, 2472971,5);"><img src="WSfromJava.aspx_files/thumbs_up.gif" alt="vote 5" align="middle" border="0" height="14" width="14"></a> </span></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table></td>
</tr><tr class="Quick">
<td class="Frm_MsgRtDivide"><img src="WSfromJava.aspx_files/t_002.gif" alt="" border="0" height="1" width="1"></td>
</tr>
<!-- Start Message head -->
<tr class="MsgHd Rt HdUnSel" id="F2362904_h0">
<td width="100%"><table class="QuickHd" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody><tr>
<td class="Frm_MsgIndent" width="16"><a name="xx2362904xx"></a><img src="WSfromJava.aspx_files/msg_question.gif" alt="Question" align="top" height="16" width="16"></td><td class="Frm_MsgSubject"><a id="DynMessLink" name="2362904" href="http://www.codeproject.com/KB/XML/WSfromJava.aspx?fid=31497&select=2362904#xx2362904xx">Connection cl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -