avatar
N*n
2
According to the rumors out there.
avatar
B*g
4
垄断java?

【在 N********n 的大作中提到】
: According to the rumors out there.
avatar
a9
5
你应该输入wsdl还是啥的那个url吧。

address
'.
be
ercot
content
solution
Error

【在 A*******n 的大作中提到】
: web service 我做的不多, 一般情况下我用“Add Service Reference", 在address
: 里面输入web service 的URL, 找到service,在code里面就可以使用。 我现在输入“
: https://xxxxxx.com/2007-08/Nodal/eEDS/EWS/“, 得到下面的message:
: There was an error downloading 'https://xxxxxx.com/2007-08/Nodal/eEDS/EWS/'.
: The request failed with the error message:

avatar
z*h
6
I guess it's for Sun's hardware

【在 B*****g 的大作中提到】
: 垄断java?
avatar
A*n
7
加了也没用。
他们的做法是去他们的网站下载需要的wsdl和xsd files。 用svcutil 建一个cs和一个
config 文件, 然后在写function。
他们说function最后送出去的format like below:
?xml version="1.0" encoding="UTF-8"?>
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


http://docs.oasis-open.org/wss/2004/....................................>
.........................







.........




RequestMessage这部分我可以用他们产生的那个cs来建立,可是“
这部分他们说用 standard WCF coding。
有谁做过他们家的project, 和web service有关的?跪求
avatar
b*y
8
yup, too bad Sun being an innovative company, not successful in marketing.
But that being said, I still admire Sun.
avatar
a9
9
实在不行直接手动组xml得了。估计你也没几个参数
我记得很久以前做过这东西,现在忘的差不多了。大概是给生成的cs文件里加一堆[]的
属性后来搞出来了。当然不是搞的你这个东西,是另外的一个。

【在 A*******n 的大作中提到】
: 加了也没用。
: 他们的做法是去他们的网站下载需要的wsdl和xsd files。 用svcutil 建一个cs和一个
: config 文件, 然后在写function。
: 他们说function最后送出去的format like below:
: ?xml version="1.0" encoding="UTF-8"?>
: : xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
: xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
:
:

avatar
l*0
10
Me too.

【在 b******y 的大作中提到】
: yup, too bad Sun being an innovative company, not successful in marketing.
: But that being said, I still admire Sun.

avatar
c*e
11
还在用soap啊,現在都restful了。

address
'.

【在 A*******n 的大作中提到】
: web service 我做的不多, 一般情况下我用“Add Service Reference", 在address
: 里面输入web service 的URL, 找到service,在code里面就可以使用。 我现在输入“
: https://xxxxxx.com/2007-08/Nodal/eEDS/EWS/“, 得到下面的message:
: There was an error downloading 'https://xxxxxx.com/2007-08/Nodal/eEDS/EWS/'.
: The request failed with the error message:

avatar
r*s
12
server market,
against new player cisco,
as well as old ones like hp, dell ...

【在 z***h 的大作中提到】
: I guess it's for Sun's hardware
avatar
A*n
13
你找人借东西,人家说你给我一元RMB我就借你, 你说别人家都要美金了?
没办法啊老大,人家用什么我们就用什么啊。

【在 c*********e 的大作中提到】
: 还在用soap啊,現在都restful了。
:
: address
: '.

avatar
A*n
14
直接手动组xml?更鸡毛,直接给 500 internal error。
avatar
a9
15
那显然是你组的不对,呵呵。

【在 A*******n 的大作中提到】
: 直接手动组xml?更鸡毛,直接给 500 internal error。
avatar
A*n
16
我就是用对方给我的sample request。 没理由不对,具体的参数可能不对,但是
format我想没问题。
avatar
k*n
17
那是纯soap, 你得拿对方的schema文件, 用svcutilty生成proxy 本地代码. 具体忘了.
的确很难用. 还不如回信骂他们一顿, 什么破公司,还在用15年前的技术, 连web
service wsdl都搞不定. 说不定他们就给你新api 了.

address
'.

【在 A*******n 的大作中提到】
: web service 我做的不多, 一般情况下我用“Add Service Reference", 在address
: 里面输入web service 的URL, 找到service,在code里面就可以使用。 我现在输入“
: https://xxxxxx.com/2007-08/Nodal/eEDS/EWS/“, 得到下面的message:
: There was an error downloading 'https://xxxxxx.com/2007-08/Nodal/eEDS/EWS/'.
: The request failed with the error message:

avatar
A*n
18
呵呵, 他们sample code都不给,你还指望他们给你新api? 你们知道什么是 primary
signature吗? 我现在的error是the primary signature must be encrypted。
我现在的function可以送request, 用fiddler我也可以看到response, 可是用他们的
proxy得到reponse就出错。我想是不是我的setting不对。
EndpointAddress ea = new EndpointAddress("https://misapi.ercot.
com/2007-08/Nodal/eEDS/EWS/");
System.ServiceModel.Channels.CustomBinding custombinding = new
System.ServiceModel.Channels.CustomBinding();

System.ServiceModel.Channels.AsymmetricSecurityBindingElement
sbe = System.ServiceModel.Channels.AsymmetricSecurityBindingElement.
CreateMutualCertificateDuplexBindingElement(MessageSecurityVersion.
WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPol
icy11BasicSecurityProfile10);
sbe.SecurityHeaderLayout = System.ServiceModel.Channels.
SecurityHeaderLayout.Strict;
sbe.IncludeTimestamp = false;
sbe.SetKeyDerivation(false);
sbe.LocalClientSettings.MaxClockSkew = new TimeSpan (0,3,0);
sbe.LocalClientSettings.ReplayWindow = new TimeSpan(0, 2, 0);
sbe.LocalClientSettings.ReplayCacheSize = 10000;
sbe.LocalServiceSettings.MaxClockSkew = new TimeSpan(0, 3, 0);
sbe.AllowSerializedSigningTokenOnReply = true;
sbe.RequireSignatureConfirmation = false;

System.ServiceModel.Channels.HttpsTransportBindingElement
transport = new System.ServiceModel.Channels.HttpsTransportBindingElement();
custombinding.Elements.Add(sbe);
custombinding.Elements.Add(new System.ServiceModel.Channels.
TextMessageEncodingBindingElement(System.ServiceModel.Channels.
MessageVersion.Soap11, System.Text.Encoding.UTF8));
custombinding.Elements.Add(transport);
OperationsClient client = new OperationsClient(custombinding,ea);

//client certificate
System.Security.Cryptography.X509Certificates.X509Certificate2
ercotcert = new System.Security.Cryptography.X509Certificates.
X509Certificate2("C:\ESettlement\ESettlementConsole\albertqse2014.pfx","xxx"
);
client.ClientCredentials.ClientCertificate.Certificate =
ercotcert;

//server certificate
System.Security.Cryptography.X509Certificates.X509Certificate2
ercotservicecert = new System.Security.Cryptography.X509Certificates.
X509Certificate2("C:\ESettlement\ESettlementConsole\misapi.ercot.com public
key.cer");
client.ClientCredentials.ServiceCertificate.DefaultCertificate =
ercotservicecert;
client.Open();


DateTime dt = DateTime.Now.AddDays(-1);
RequestMessage RM = new RequestMessage();
RequestType rt = new RequestType();
HeaderType ht = new HeaderType();
rt.StartTime = new DateTime(dt.Year,dt.Month,dt.Day,0,0,0,0);
rt.StartTimeSpecified = true;
rt.EndTime = new DateTime(dt.Year, dt.Month, dt.Day, 23, 59, 59,
999);
rt.EndTimeSpecified = true;
rt.Option = "11113";//Real Time Market Consolidated Operating
Day Extract
rt.OperatingDate = DateTime.Now;

ht.UserID = "API_xxxx";
ht.Verb = HeaderTypeVerb.get;
ht.Noun = "Reports";
AttributedDateTime adt = new AttributedDateTime();
EncodedString es = new EncodedString();
Random r = new Random();
es.Value = r.Next().ToString();

adt.Value = DateTime.Now.ToString("s");

ReplayDetectionType rdt = new ReplayDetectionType();
rdt.Created = adt;
rdt.Nonce = es;
ht.ReplayDetection = rdt;
ht.Revision = "001";
ht.Source = "7800613002000";
//ht.MessageID = "151451";
RM.Header = ht;
RM.Request = rt;
XmlSerializer ser = new XmlSerializer(RM.GetType());
StringWriter sw = new StringWriter();
ser.Serialize(sw, RM);
string xml = sw.ToString();
try
{
ResponseMessage responsemessage = client.MarketInfo(RM);
}
catch (Exception ex)
{
//client.Close();
}
avatar
A*n
19
总算告一段落,谢谢各位
avatar
c*e
20
8天才解决问题,这在我们公司要被赶走了。

【在 A*******n 的大作中提到】
: 总算告一段落,谢谢各位
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。