Hello,
I have a c# client program that sends a userID and Password to a
webservice that validates the user. The client is sucessfully sending
the Client context and the webservice is receiving it and processing
it, but I don't get back the ReturnCode saying wether it was OK or
not. Here is a snippet from the client code and the code generated by
the wsdl file.
Client Code that is sending the Client Context and receiving the
results.
TDMSOAPProxyService webService = new TDMSOAPProxyService();
ClientContext clientContext = new ClientContext();
clientContext.tdmUserId = logonId;
clientContext.tdmPassword = password;
TDMBASE64SOAPResult results = webService.logon(clientContext , args);
Error = results.errors;
Results = results.result;
ReturnCode = results.returnCode;
Here is the code generated from the WSDL
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="TdmSoapCli", ResponseNamespace="TdmSoapCli")]
[return: System.Xml.Serialization.SoapElementAttribute("logonReturn")]
public TDMBASE64SOAPResult logon(ClientContext ctx, string[]
args) {
object[] results = this.Invoke("logon", new object[] {
ctx,
args});
return ((TDMBASE64SOAPResult)(results[0]));
}
/// <remarks/>
public System.IAsyncResult Beginlogon(ClientContext ctx,
string[] args, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("logon", new object[] {
ctx,
args}, callback, asyncState);
}
/// <remarks/>
public TDMBASE64SOAPResult Endlogon(System.IAsyncResult
asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((TDMBASE64SOAPResult)(results[0]));
}
}
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("ClientContext",
"TdmSoapCli")]
public class ClientContext {
/// <remarks/>
public string tdmPassword;
/// <remarks/>
public string vault;
/// <remarks/>
public string tdmUserId;
}
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("BASE64Attachment",
"TdmSoapCli")]
public class BASE64Attachment {
/// <remarks/>
[System.Xml.Serialization.SoapElementAttribute(DataType="base64Binary")]
public System.Byte[] attachment;
/// <remarks/>
public string fileName;
}
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("TDMBASE64SOAPResult",
"TdmSoapCli")]
public class TDMBASE64SOAPResult {
/// <remarks/>
public string[] result;
/// <remarks/>
public int returnCode;
/// <remarks/>
public BASE64Attachment attachment;
/// <remarks/>
public string[] errors;
Dino Chiesa [Microsoft] - 28 Jul 2004 06:45 GMT
suspect a namespace disagreement.
use a trace tool to look at the data flowing back and forth.
eg proxytrace (google for it, it's free).
-D
> Hello,
>
[quoted text clipped - 68 lines]
>
> /// <remarks/>
[System.Xml.Serialization.SoapElementAttribute(DataType="base64Binary")]
> public System.Byte[] attachment;
>
[quoted text clipped - 18 lines]
> /// <remarks/>
> public string[] errors;
Eric Swaney - 28 Jul 2004 12:33 GMT
Thanks, I used proxytrace and this is what I received back from the
webservice.
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
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">
<soapenv:Body>
<ns1:logonResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="TdmSoapCli">
<ns1:logonReturn xsi:type="ns1:TDMBASE64SOAPResult">
<ns1:result xsi:type="soapenc:Array"
soapenc:arrayType="xsd:string[2]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>ORA-01017: invalid username/password; logon denied</item>
<item> </item>
</ns1:result>
<ns1:returnCode xsi:type="xsd:int">255</ns1:returnCode>
<ns1:attachment xsi:type="ns1:BASE64Attachment" xsi:nil="true"/>
<ns1:errors xsi:type="soapenc:Array"
soapenc:arrayType="xsd:string[3]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>Process returned error exitcode: 255</item>
<item>ORA-01017: invalid username/password; logon denied</item>
<item> </item>
</ns1:errors>
</ns1:logonReturn>
</ns1:logonResponse>
</soapenv:Body>
</soapenv:Envelope>
This is the code that was generated by the WDSL
[System.Web.Services.Protocols.SoapRpcMethodAttribute("",
RequestNamespace="TdmSoapCli", ResponseNamespace="TdmSoapCli")]
[return:
System.Xml.Serialization.SoapElementAttribute("logonReturn")]
public TDMBASE64SOAPResult logon(ClientContext ctx, string[]
args) {
object[] results = this.Invoke("logon", new object[] {
ctx,
args});
return ((TDMBASE64SOAPResult)(results[0]));
}
[System.Xml.Serialization.SoapTypeAttribute("TDMBASE64SOAPResult",
"TdmSoapCli")]
public class TDMBASE64SOAPResult {
/// <remarks/>
public string[] result;
/// <remarks/>
public int returnCode;
/// <remarks/>
public BASE64Attachment attachment;
/// <remarks/>
public string[] errors;
}
Dino Chiesa [Microsoft] - 28 Jul 2004 21:36 GMT
Ok, I don't see anything here.
One path forward might be to create a Java client, trace the SOAP, and
compare that with what you are getting on the .NET side.
----
Any chance you could convert the Java server to be doc/literal rather than
rpc/encoded?
doc/lit is what is recommended by WS-I for interoperable web services. SOAP
section-5 encoding is no longer recommended by anyone.
-D
> Thanks, I used proxytrace and this is what I received back from the
> webservice.
[quoted text clipped - 55 lines]
> public string[] errors;
> }