Not Receiving Results from Java Webservice

E

Eric

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;
 
D

Dino Chiesa [Microsoft]

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
 
E

Eric Swaney

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;
}
 
D

Dino Chiesa [Microsoft]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top