473,748 Members | 6,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with dotNet & APACHE & Tomcat (System.InalidC astException)

Hello,

I'm trying to access a webservice which runs on our SOAP Server (Apache
Tomcat) with Windows 2000 Advanced Server. I simply added the webreference
local copy of wsdl file into dotNet Application using dotNet's "Add Web
Reference" option. I am trying to execute a function using pieces of code as
follows;

----------------------------------
WebReference.My Service kkAPI = new WebReference.My Service();
kkAPI.Url = "http://abc.sample.com: 8080/soap/servlet/rpcrouter"
try
{
string strResult = kkAPI.CloseHand le(dolXML);
MessageBox.Show (strResult);
}
catch (Exception dolError)
{
MessageBox.Show ( "Error Source : "+dolError.Sour ce+"\n"+
"Error Message : "+dolError.Mess age+"\n"+
"Inner Exception : "+dolError.Inne rException+"\n" +
"Target Site : "+dolError.Targ etSite+"\n");
}
------------------------------------

and dotNet raises an error as follows

------------------------------------
Error:
There is an error in XML document(6,47). System.InalidCa stException:
Cannot assign object of type System.Boolean to an object of type
System.String at Microsoft.Xml.S erialization.Ge neratedAssembly .
XmlSerializatio nReader1.Read3_ OpenSessionResp onse()
------------------------------------

while running a code in webReference that generated by dotNet as follows

------------------------------------
public string CloseHandle(str ing xml) {
object[] results = this.Invoke("Cl oseHandle", new object[] {xml});
return ((string)(resul ts[0]));
}
------------------------------------

this code sends an xml to soap server as follows;

------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:tns="urn: testAPI"
xmlns:types="ur n:testAPI/encodedTypes"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<tns:CloseHandl e>
<xml xsi:type="xsd:s tring">
&lt;request xmlns='urn:test API'&gt;
&lt;session id='15'/&gt;
&lt;/request&gt;
</xml>
</tns:CloseHandle >
</soap:Body>
</soap:Envelope>
------------------------------------

and soap server responses as follows;

------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:CloseHandl e
SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns1="urn: testAPI">

<return xsi:type="xsd:b oolean">true</return>
<xmlout xsi:type="xsd:s tring">
<?xml version=&quot;1 .0&quot; encoding=&quot; UTF-8&quot;?>
<response>
<session id=&quot;1&quot ;/>
</response>
</xmlout>
</ns1:CloseHandle >
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------------------------------------

how can i handle this problem?
i know message is growed to much. :) i am sorry!
Nov 21 '05 #1
1 2923
Did you figure this out yet? I'm having a similar problem going against a
Delphi web service. Looks like serialization issue maybe.

Jim
email me at: jg*******@minds pring.com is you know the answer.

Thanks

"citnamor" wrote:
Hello,

I'm trying to access a webservice which runs on our SOAP Server (Apache
Tomcat) with Windows 2000 Advanced Server. I simply added the webreference
local copy of wsdl file into dotNet Application using dotNet's "Add Web
Reference" option. I am trying to execute a function using pieces of code as
follows;

----------------------------------
WebReference.My Service kkAPI = new WebReference.My Service();
kkAPI.Url = "http://abc.sample.com: 8080/soap/servlet/rpcrouter"
try
{
string strResult = kkAPI.CloseHand le(dolXML);
MessageBox.Show (strResult);
}
catch (Exception dolError)
{
MessageBox.Show ( "Error Source : "+dolError.Sour ce+"\n"+
"Error Message : "+dolError.Mess age+"\n"+
"Inner Exception : "+dolError.Inne rException+"\n" +
"Target Site : "+dolError.Targ etSite+"\n");
}
------------------------------------

and dotNet raises an error as follows

------------------------------------
Error:
There is an error in XML document(6,47). System.InalidCa stException:
Cannot assign object of type System.Boolean to an object of type
System.String at Microsoft.Xml.S erialization.Ge neratedAssembly .
XmlSerializatio nReader1.Read3_ OpenSessionResp onse()
------------------------------------

while running a code in webReference that generated by dotNet as follows

------------------------------------
public string CloseHandle(str ing xml) {
object[] results = this.Invoke("Cl oseHandle", new object[] {xml});
return ((string)(resul ts[0]));
}
------------------------------------

this code sends an xml to soap server as follows;

------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:soapenc=" http://schemas.xmlsoap .org/soap/encoding/"
xmlns:tns="urn: testAPI"
xmlns:types="ur n:testAPI/encodedTypes"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<soap:Body soap:encodingSt yle="http://schemas.xmlsoap .org/soap/encoding/">
<tns:CloseHandl e>
<xml xsi:type="xsd:s tring">
<request xmlns='urn:test API'>
<session id='15'/>
</request>
</xml>
</tns:CloseHandle >
</soap:Body>
</soap:Envelope>
------------------------------------

and soap server responses as follows;

------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<ns1:CloseHandl e
SOAP-ENV:encodingSty le="http://schemas.xmlsoap .org/soap/encoding/"
xmlns:ns1="urn: testAPI">

<return xsi:type="xsd:b oolean">true</return>
<xmlout xsi:type="xsd:s tring">
<?xml version="1.0" encoding="UTF-8"?>
<response>
<session id="1"/>
</response>
</xmlout>
</ns1:CloseHandle >
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------------------------------------

how can i handle this problem?
i know message is growed to much. :) i am sorry!

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7406
by: SamMan | last post by:
We are getting new computers at work and I got the word today that pc-lan (network admins) do not want IIS installed on ANY machine. We are primarily a Java development house, so they will not balk about me installing Tomcat. Can I run PHP from Tomcat the same (or close to) as IIS? Thanks. --
11
4418
by: Wayne Wengert | last post by:
I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want to display a list of all tables in an Access database. I want to put that list of table names in a listbox so the user can select the table they want to use. How can I do this? -- ------------------------------------ Wayne Wengert wayne@wengert.org
3
2396
by: xenophon | last post by:
This following innocuous code: System.IO.DirectoryInfo fff = new System.IO.DirectoryInfo(); System.IO.FileInfo ppp = fff.GetFiles( Request.MapPath(".") ); for( int ccc=0 ; ccc < ppp.Length ; ccc++ ) { System.Web.HttpResponse.Response.Write( "<a href=\"" + Request.MapPath(".") + "/" + HttpUtility.HtmlEncode(ppp.Name) + "\">link</a>" );
16
4925
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by Microsoft must be installed on their servers. Now german Umlaute (ä, ü, ö) and quotes are returned incorrectly in SOAP fault responses. This can be easily verified: Implement the following in a web service method (just raises a SOAPException with a...
10
1848
by: sssk28 | last post by:
i have installed fedora core 6 and i am getting following error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception
1
2146
by: sethupnr | last post by:
when i'm using a simple JSP-mysql code it shows some HTTP status 500 error.But simple JSP program without databse is running , Please help how to solve this problem. I'm new to JSP. my configurations are... i installed j2sdk in C:\j2sdk1.4.2_16 then installed jakarte-tomcat in C:\Program Files\Apache Tomcat 4.0 folder copied mysql-connector-java-3.0.17-ga-bin.jar to C:\Program Files\Apache Tomcat 4.0\common\lib
11
7123
by: mjahabarsadiq | last post by:
Hi I have created a web application. I am using ant to build the war and deploy in tomcat. The war file is deployed under "TOMCATE_HOME/work/standalone/localhost/onlineres.war". I have my source files in "D:\Sadiq\Projects\Onlineres". The folder structure is as follows. 1) D:\Sadiq\Projects\Onlineres: This folder is having the context.xml, web.xml, build.xml and build.properties files.
10
12564
by: swethak | last post by:
Hi, i am first installing the tomcat 5.5 in my hosting server system and created the one folder(like test) in webapps and place all the jsp files.And also created the another folder(like test2) and place all related files in that. Now i give the url as http://localhost:8080/test/sample.jsp http://localhost:8080/test1/home.jsp Both are working fine.
3
3222
dmjpro
by: dmjpro | last post by:
Have a look at my problem. try{ //String tokenLocatorUrl = "http://erp.iitkgp.ernet.in:80/SSO_Token_Object_locator/resources/getSSOToken"; String tokenLocatorUrl = "http://10.29.33.96:80/SSO_Token_Object_locator/resources/getSSOToken"; String file = "/APP/tomcat/apache-tomcat-6.0.14/webapps/SSOAdministration/WEB-INF/persistance/sso/9C148798C559E03C4E3EF20E9CE02485.worker2.obj"; ...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9325
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.