Quote:
Originally Posted by ArthurKnight
Hi,
Can you post a code fragment? Maybe it helps.
Regards
|
Quote:
The following errors occurred when this message was submitted:
1.
To be able to post links or images your post count must be 10 or greater. You currently have 3 posts.
Please remove links from your message, then you will be able to submit your post.
|
Event handler routine....
SessionID = getSession();
LogOnmessage = SomeSysLogon( SessionID, username, password, 6 );
private String getSession()
{
String Session = new String("Session ID=");
SoapObject stamp= new SoapObject(" URL ","GenerateSession");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.bodyOut = stamp;
envelope.dotNet = true;
envelope.encodingStyle = SoapSerializationEnvelope.XSD;
HttpTransport transport = new HttpTransport("OUR URL HERE ");
try
{
transport.call(" URL ",envelope);
}
catch( Exception e )
{
add(new RichTextField("Call Exception:" + e.toString(), Field.NON_FOCUSABLE));
}
try
{
Object obj = envelope.getResponse();
Session = obj.toString();
}
catch( Exception e )
{
add(new RichTextField("get response Exception:" + e.toString(), Field.NON_FOCUSABLE));
}
return Session;
}
private String SomeSysLogon( String SessionID, String UserName, String Password, int SystemID )
{
String Message = new String( "" );
SoapObject stamp= new SoapObject("OUR URL HERE","LogonUser");
stamp.newInstance();
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
Integer i = new Integer( SystemID );
stamp.addProperty("Username", UserName);
stamp.addProperty("Password", Password);
stamp.addProperty("SystemID", i);
stamp.addProperty("SessionID", SessionID);
envelope.setOutputSoapObject(stamp);
envelope.bodyOut = stamp;
envelope.dotNet = true;
envelope.encodingStyle = SoapSerializationEnvelope.XSD;
HttpTransport transport = new HttpTransport(" OUR URL HERE");
try
{
transport.call(" URL ",envelope);
}
catch( Exception e )
{
add(new RichTextField("Call Exception:" + e.toString(), Field.NON_FOCUSABLE));
}
try
{
// Object obj = envelope.getResult();
// Object obj = envelope.getResponse();
// String temp = obj.toString();
String temp = new String();
temp = temp + ", body: " + envelope.bodyIn + " ... " + envelope.bodyOut + " : " +
envelope.getResponse();
// Message = "Login." + obj.toString();
Message = temp;
}
catch( Exception e )
{
add(new RichTextField("get response Exception:" + e.toString(), Field.NON_FOCUSABLE));
}
return Message;
}
Here
envelope.getResponse(); gives me anyType{}.....
Quote:
Originally Posted by goulamass
Hum your Web service is in?? .Net?? Java??...
Because some times there is comptability problem
Post the call you make and the wsdl of your web service if you want we look at.
|
Various web services called by this application, .NET (C#) and PERL on Linux.. Note the
envelope.dotNet = true; ...
The WSDL is larger than can be posted here.
Cheers,
RR.