質問編集履歴
1
情報の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -21,3 +21,85 @@
|
|
21
21
|
そもそもIIS上に配置しているWEBAPIから別サーバのWEBサービスにアクセス可能なのでしょうか?
|
22
22
|
|
23
23
|
できる、できないの文献があまりなくなまじローカル稼働で行えている為判断ができません。
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
WEBサービス参照の追加を行い。
|
28
|
+
|
29
|
+
WEBサービスへアクセスしています。
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
var ws = webサービス参照で追加した項目;
|
34
|
+
|
35
|
+
ws.ClientCredentials.UserName.UserName = wsUserName;
|
36
|
+
|
37
|
+
ws.ClientCredentials.UserName.Password = wsPassWord;
|
38
|
+
|
39
|
+
ws.Connect(wsSystemID, wsLoginID, wsLoginPwd);
|
40
|
+
|
41
|
+
strData = ws.GetDataXML(param);
|
42
|
+
|
43
|
+
ws.DisConnect();
|
44
|
+
|
45
|
+
ws.Close();
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
-- web.config
|
50
|
+
|
51
|
+
<system.serviceModel>
|
52
|
+
|
53
|
+
<protocolMapping>
|
54
|
+
|
55
|
+
<remove scheme="http" />
|
56
|
+
|
57
|
+
<add scheme="http" binding="wsHttpBinding" />
|
58
|
+
|
59
|
+
<add scheme="https" binding="wsHttpBinding" />
|
60
|
+
|
61
|
+
</protocolMapping>
|
62
|
+
|
63
|
+
<bindings>
|
64
|
+
|
65
|
+
<wsHttpBinding>
|
66
|
+
|
67
|
+
<binding name="WSHttpBinding_class1">
|
68
|
+
|
69
|
+
<reliableSession enabled="true" />
|
70
|
+
|
71
|
+
<security mode="TransportWithMessageCredential">
|
72
|
+
|
73
|
+
<transport clientCredentialType="None" />
|
74
|
+
|
75
|
+
</security>
|
76
|
+
|
77
|
+
</binding>
|
78
|
+
|
79
|
+
<binding name="WSHttpBinding_class12" maxBufferPoolSize="4288" maxReceivedMessageSize="2147483647" openTimeout="01:00:00" closeTimeout="01:00:00" sendTimeout="01:00:00" receiveTimeout="01:00:00">
|
80
|
+
|
81
|
+
<reliableSession enabled="true" />
|
82
|
+
|
83
|
+
<readerQuotas maxDepth="32" maxStringContentLength="819200000" maxArrayLength="2147483647" maxBytesPerRead="2147483647" />
|
84
|
+
|
85
|
+
<security mode="TransportWithMessageCredential">
|
86
|
+
|
87
|
+
<transport clientCredentialType="None" />
|
88
|
+
|
89
|
+
<message clientCredentialType="UserName" />
|
90
|
+
|
91
|
+
</security>
|
92
|
+
|
93
|
+
</binding>
|
94
|
+
|
95
|
+
</wsHttpBinding>
|
96
|
+
|
97
|
+
</bindings>
|
98
|
+
|
99
|
+
<client>
|
100
|
+
|
101
|
+
<endpoint address="https://hogehoge.jp/hogehoge.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_class12" contract="ServiceReference.clshogehoge" name="WSHttpBinding_class1" />
|
102
|
+
|
103
|
+
</client>
|
104
|
+
|
105
|
+
</system.serviceModel>
|