Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > SOAP Webservice C# / Axis2

Reply
Thread Tools

SOAP Webservice C# / Axis2

 
 
Florian Grousset
Guest
Posts: n/a
 
      12-05-2006
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/"
xmlnssd="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/"
xmlnssi="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">
<soapperation soapAction="admin"/>
<input name="Test_admin">
<soap:body use="literal"/>
</input>
<output name="Test_adminResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="search">
<soapperation 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>




--
Florian Grousset
http://www.grousset.net
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Axis2 - org.apache.axis2.AxisFault: Transaction not active Michael Post Java 5 08-22-2009 09:33 PM
Axis2 1.4 How to modify soap envelope attributes? zigzagdna@yahoo.com Java 12 08-09-2008 06:14 AM
axis2 question about sending & recieveing SOAP Fault J Jensen Java 0 12-19-2007 06:33 PM
Apache Axis2 - create a client to access a SOAP service cdvr Java 2 04-10-2007 10:56 PM
developing webservices using axis2 and soap Eeswari Java 5 12-27-2006 09:23 AM



Advertisments