473,320 Members | 2,097 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

SOAP Webservice C# / Axis2

Hi,

I'm trying to code a simple C# SOAP client wich query an Axis2 Java SOAP
Server.
Server side code has been generated from a WSDL file.
SOAP requests and responses must both contain a simple String array (not
very diffucult I think !).

What I've done :
1. WSDL file writing (see at the bottom of this post)
2. Generate Java server code with Axis2 tools and deploy it in tomcat
j2ee application server.
3. In visual Studio 2005, add the web ressource using the WSDL url. It
rightly build all my objects.
4. write a simple C# client to to a request/response but when I launch
it it crashes on the client side.

I've tried to use a simple query in the SOAP query (keeping the String
array in the response) and it works !

Are complex objects like String[] allowed in the requests ?

Here is the client error and my WSDL file...
Any help would be appreciated.
-------------
ERROR :
-------------
Exception:
à
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message,
WebResponse response, Stream responseStream, Boolean asyncCall)
à System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName,
Object[] parameters)
à ExaleadOEMClient_CSharp.madpc016.ExaleadService.ad min(adminElement
adminElement)
dans C:\test\xxxxxx\Web References\madpc016\Reference.cs:ligne 116
à ExaleadOEMClient_CSharp.Program.exaleadAdmin() dans
C:\xxxxxx\Program.cs:ligne 51

-------------
WSDL :
-------------
<?xml version="1.0" encoding="UTF-8"?>

<definitions
name="TestService"
targetNamespace="http://test"
xmlns:tns="http://test"
xmlns:ns2="http://test/types"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

<types>
<schema targetNamespace="http://test/types"
xmlns:tns="http://test/types"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>

<element name="adminElement">
<complexType>
<sequence>
<element name="adminRequestArray" type="xsd:string"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>

<element name="returnAdminElement">
<complexType>
<sequence>
<element name="adminResponseArray" type="xsd:string"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>

</schema>
</types>

<message name="Test_admin">
<part name="parameters" element="ns2:adminElement"/>
</message>
<message name="Test_adminResponse">
<part name="result" element="ns2:returnAdminElement"/>
</message>

<portType name="Test">
<operation name="admin">
<input message="tns:Test_admin" name="Test_admin"/>
<output message="tns:Test_adminResponse" name="Test_adminResponse"/>
</operation>
</portType>

<binding name="TestBinding" type="tns:Test">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name="admin">
<soap:operation soapAction="admin"/>
<input name="Test_admin">
<soap:body use="literal"/>
</input>
<output name="Test_adminResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="search">
<soap:operation soapAction="search"/>
<input name="Test_search">
<soap:body use="literal"/>
</input>
<output name="Test_searchResponse">
<soap:body use="literal"/>
</output>
</operation>
</binding>

<service name="TestService">
<port name="TestPort" binding="tns:TestBinding">
<soap:address
location="http://localhost:8080/axis2/services/TestService"/>
</port>
</service>
</definitions>

Dec 5 '06 #1
1 12230
"Florian Grousset" <fl*****@grousset.comwrote in message
news:el***********@ng1.exabot.com...
Hi,

I'm trying to code a simple C# SOAP client wich query an Axis2 Java SOAP
Server.
Server side code has been generated from a WSDL file.
SOAP requests and responses must both contain a simple String array (not
very diffucult I think !).

What I've done :
1. WSDL file writing (see at the bottom of this post)
2. Generate Java server code with Axis2 tools and deploy it in tomcat
j2ee application server.
3. In visual Studio 2005, add the web ressource using the WSDL url. It
rightly build all my objects.
4. write a simple C# client to to a request/response but when I launch it
it crashes on the client side.

I've tried to use a simple query in the SOAP query (keeping the String
array in the response) and it works !

Are complex objects like String[] allowed in the requests ?

Here is the client error and my WSDL file...
Any help would be appreciated.
-------------
ERROR :
-------------
Exception:
à
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message,
WebResponse response, Stream responseStream, Boolean asyncCall)
à System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName,
Object[] parameters)
à ExaleadOEMClient_CSharp.madpc016.ExaleadService.ad min(adminElement
adminElement)
dans C:\test\xxxxxx\Web References\madpc016\Reference.cs:ligne 116
à ExaleadOEMClient_CSharp.Program.exaleadAdmin() dans
C:\xxxxxx\Program.cs:ligne 51
I can't read your exception. I see the stack trace, but no
exception.Message.

John
Dec 6 '06 #2

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

Similar topics

0
by: Oliver Hirschi | last post by:
Hi, I am really confused. I try to call a soap-method on a server with one parameter and I like to get the return-parameter of this method, but I get ever the following exception by invoking the...
0
by: Hans Kesting | last post by:
Hi, I'm trying to create a client for some webservice. BUT I have only limited information: * no WSDL available ("expected Q1-06") (it seems to be written in Java) * I don't have access (yet)...
0
by: Nalla | last post by:
Hi, I have a requirement to call webservices from my old C++ application.So first I tried with Vc++.net as follows.....There are 2 approach Dotnet frame work and soaptoolkit 3.0 I am not able to...
6
by: A.M-SG | last post by:
Hi, We are developing a SmartClient application and we are planning to expose business objects layer to SmartClient application by using ASP.NET SOAP web services.
1
by: George Homorozeanu | last post by:
Hi, I programmed a WebService that has a function that takes an untyped DataSet as parameter and fills the data in a database. The WebService is programmed under .Net. Some guys are doing the...
6
by: Peter van der veen | last post by:
Hi I have the following problem. I'm calling a webservice from within a VB.net 2005 Windows program. For this i got a WSDL file and loaded that in VB. Until now i just call the webservice and...
15
by: =?Utf-8?B?ZG91Zw==?= | last post by:
I hadn't had a class yet and I had some MS help on this to set up, but I wrote a .Net WS that creates a proxy class response using SOAP. Works fine. And in kind of a good way, the IDE has hidden...
4
by: wbsurfver | last post by:
I have been trying to figure out apache/rampart soap security. We have a soap server in java and the client is PHP. I just read this article which concerns me because it seems to imply rampart/java...
2
by: ksheerasagar17 | last post by:
Hello All, Scenario: Sending an image through webservice as byte array to an Java webservice. The Problem1: The webservice method image property expects (data type) SByte rather than Byte...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.