D
Dan
Now I am really confused.
here is the stream going in
<SOAP-ENV:Envelope
xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xe="urn:embrasure"
xmlns:xe1=" urn:VerifyStatus"
xmlns:xe2="http://schemas.xmlsoap.org/soap/encoding/"<SOAP-ENV:Body>
<xe1:standard SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding
/" >
<xe1:key xsi:type="xe:messagekey">
<partnerkey
xsi:type="xsd:string">Embasure</partnerkey>
<companykey
xsi:type="xsd:string">PHTRopphile,disney</companykey>
</xe1:key>
</xe1:standard>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here is the server response:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException:
Server was unable to read request. --->
System.InvalidOperationException: There is an error in XML
document (11, 6). ---> System.InvalidOperationException:
<standard xmlns=' urn:VerifyStatus'> was not expected.
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializat
ionReader1.Read17_standard()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize
(XmlReader xmlReader, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Deserialize
(XmlReader xmlReader)
at
System.Web.Services.Protocols.SoapServerProtocol.ReadParame
ters()
--- End of inner exception stack trace ---
at
System.Web.Services.Protocols.SoapServerProtocol.ReadParame
ters()
at
System.Web.Services.Protocols.WebServiceHandler.Invoke()
at
System.Web.Services.Protocols.WebServiceHandler.CoreProcess
Request()</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
What am I doing wrong!
te service is set up as :
/// Make service accessible from the outside
[WebService (Namespace="http://172.17.8.26/Soap" )]
[SoapRpcService
(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
public class Service1 :
System.Web.Services.WebService
and the method is:
[ SoapRpcMethod(Action="standard",
RequestNamespace="VerifyStatus",
RequestElementName="standard",
ResponseNamespace="VerifyStatus",
ResponseElementName="standardResponse")]
// standard ping call with key passed for verifystatus
[WebMethod (Description="Validate SOAP server availability
and Message Key integrity")]
public messagekey standard(messagekey key)
{
messagekey kys = new keys();
//Make sure Embrasure is who is calling us
if(key.partnerKey.CompareTo("Embrasure") == 0)
{
// Validate the login and Embrasure
string[] ks = getkey(key.partnerKey, key.companyKey);
kys.partnerKey = ks[0];
kys.companyKey = ks[1];
}
return kys;
}
Why cant it see the namespace for the call!
HELP
Thanks
Dan
here is the stream going in
<SOAP-ENV:Envelope
xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xe="urn:embrasure"
xmlns:xe1=" urn:VerifyStatus"
xmlns:xe2="http://schemas.xmlsoap.org/soap/encoding/"<SOAP-ENV:Body>
<xe1:standard SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding
/" >
<xe1:key xsi:type="xe:messagekey">
<partnerkey
xsi:type="xsd:string">Embasure</partnerkey>
<companykey
xsi:type="xsd:string">PHTRopphile,disney</companykey>
</xe1:key>
</xe1:standard>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Here is the server response:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>System.Web.Services.Protocols.SoapException:
Server was unable to read request. --->
System.InvalidOperationException: There is an error in XML
document (11, 6). ---> System.InvalidOperationException:
<standard xmlns=' urn:VerifyStatus'> was not expected.
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializat
ionReader1.Read17_standard()
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize
(XmlReader xmlReader, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Deserialize
(XmlReader xmlReader)
at
System.Web.Services.Protocols.SoapServerProtocol.ReadParame
ters()
--- End of inner exception stack trace ---
at
System.Web.Services.Protocols.SoapServerProtocol.ReadParame
ters()
at
System.Web.Services.Protocols.WebServiceHandler.Invoke()
at
System.Web.Services.Protocols.WebServiceHandler.CoreProcess
Request()</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
What am I doing wrong!
te service is set up as :
/// Make service accessible from the outside
[WebService (Namespace="http://172.17.8.26/Soap" )]
[SoapRpcService
(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
public class Service1 :
System.Web.Services.WebService
and the method is:
[ SoapRpcMethod(Action="standard",
RequestNamespace="VerifyStatus",
RequestElementName="standard",
ResponseNamespace="VerifyStatus",
ResponseElementName="standardResponse")]
// standard ping call with key passed for verifystatus
[WebMethod (Description="Validate SOAP server availability
and Message Key integrity")]
public messagekey standard(messagekey key)
{
messagekey kys = new keys();
//Make sure Embrasure is who is calling us
if(key.partnerKey.CompareTo("Embrasure") == 0)
{
// Validate the login and Embrasure
string[] ks = getkey(key.partnerKey, key.companyKey);
kys.partnerKey = ks[0];
kys.companyKey = ks[1];
}
return kys;
}
Why cant it see the namespace for the call!
HELP
Thanks
Dan
-----Original Message-----
OK, I am having a problem getting the xml to format for
this soap message.
<SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xe="urn:mine"
xmlns:xe1=" urn:VerifyStatus"
xmlns:xe2="http://schemas.xmlsoap.org/soap/encoding/"<SOAP-ENV:Body>
<xe1:standard SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encodin g
/" >
<xe1:key xsi:type="xe:messagekey">
<partnerkey
xsi:type="xsd:string">someguy</partnerkey>
<companykey
xsi:type="xsd:string">blah,blah</companykey>
</xe1:key>
</xe1:standard>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Can anyone help.
here is the webmethod:
[WebMethod (Description="Validate SOAP
server availability and Message Key integrity")]
[TraceExtension()]
[SoapDocumentMethod
("http://172.17.89.26/standard",
RequestNamespace="http://172.17.89.26/standard",
ResponseNamespace="http://172.17.89.26/standardResponse",
Use=SoapBindingUse.Encoded)
]
public keys standard([XmlElement("key")] messagekey key)
{
keys kys = new keys();
//Make sure Embrasure is who is calling us
if(key.partnerKey.CompareTo("Embrasure") == 0)
{
// Validate the login and Embrasure
string[] ks = getkey(key.partnerKey, key.companyKey);
kys.partnerKey = ks[0];
kys.companyKey = ks[1];
}
return kys;
}
here is the messagekey class:
[XmlRoot("key")]
public class messagekey
{
public string partnerKey="";
public string companyKey = "";
public messagekey()
{
}
}
and the responding keys class
[XmlRoot("return")]
public class keys
{
public string partnerKey="";
public string companyKey = "";
[XmlElement("timestamp")]
public DateTime timestamp;
public keys()
{
timestamp=DateTime.Now;
}
}
<SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:xe="urn:mine"
xmlns:xe1=" urn:VerifyStatus"
xmlns:xe2="http://schemas.xmlsoap.org/soap/encoding/"<SOAP-ENV:Body>
<xe1:standard SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encodin g
/" >
<xe1:key xsi:type="xe:messagekey">
<partnerkey
xsi:type="xsd:string">someguy</partnerkey>
<companykey
xsi:type="xsd:string">blah,blah</companykey>
</xe1:key>
</xe1:standard>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
the response should look like this.
<SOAP-ENV:Envelope
xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"<SOAP-ENV:Body>
<ns1:standardResponse xmlns:ns1="urn:VerifyStatus"
SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encodin g
/">
<return xmlns:ns2="urn:mine"
xsi:type="ns2:messagekey">
<partnerkey xsi:type="xsd:string">PARTNER
KEY</partnerkey>
<companykey xsi:type="xsd:string">COMPANY
KEY</companykey>
<timestamp xsi:type="xsd:date">YYYY-MM-DD
HH24:MI:SS </timestamp>
</return>
</ns1:standardResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I cant get the response nor does the method see the
message object being passed in.
Does any one have any ideas. I dont want to hack teh XML
stream going out.
Thanks
Dan
.