473,791 Members | 3,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# generated .NET stubs break on a null return of a complex object

I have a SOAP written in Java, and being served by Apache Axis - using the
wrapped mode. I then used VS 2003 to generate C# client stubs.

I have many complex types that are returned - and these work fine for the
most part.

The current problem I have (Which appears to be a bug with .NET - but I
can't seem to find a place to report .NET bugs without paying money) is that
when I call a method that returns an array of one of my own complex object
types - and the resulting array is empty - .NET throws a very nasty
SOAPException that actually has nothing to do with the problem.
When I make this same call with my java client - here is the SOAP message
that is sent to the server:

<soapenv:Envelo pe 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 >
<lookupConceptC odesByDesignati on xmlns="urn://hl7.org/CTSVAPI">
<codeSystem_id> ne=uri:iso:2.16 .840.1.113883.6 .2/PROC,ra=HL7</codeSystem_id>
<matchText>Appe ndix</matchText>
<matchAlgorithm _code>StartsWit hIgnoreCase</matchAlgorithm_ code>
<language_cod e xsi:nil="true" />
<activeConcepts Only>false</activeConceptsO nly>
<timeout>1500 0</timeout>
<sizeLimit>50 </sizeLimit>
</lookupConceptCo desByDesignatio n>
</soapenv:Body>
</soapenv:Envelop e>
And here is the response:

<soapenv:Envelo pe 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 >
<lookupConceptC odesByDesignati onResponse xmlns="urn://hl7.org/CTSVAPI" />
</soapenv:Body>
</soapenv:Envelop e>
As you can see, the response object is basically empty - because there were
no results. The java code actually returned an empty array - and this is the
SOAP message that was generated.
When .NET receives this message - rather than giving me a null or empty
array of ConceptId objects, as it should - it throws this exception:

System.Web.Serv ices.Protocols. SoapException: Tried to invoke method public
org.hl7.CTSVAPI .ConceptId[]
org.hl7.CTSVAPI .sql.refImpl.Br owserOperations Impl.lookupConc eptCodesByDesig nation(java.lan g.String,java.l ang.String,java .lang.String,ja va.lang.String, boolean,int,int )
throws
org.hl7.CTSVAPI .BadlyFormedMat chText,org.hl7. CTSVAPI.Unknown CodeSystem,org. hl7.CTSVAPI.Unk nownLanguageCod e,org.hl7.CTSVA PI.UnexpectedEr ror,org.hl7.CTS VAPI.TimeoutErr or,org.hl7.CTSV API.UnknownMatc hAlgorithm
with arguments
java.lang.Strin g,java.lang.Str ing,java.lang.S tring,java.lang .String,java.la ng.Boolean,java .lang.Integer,n ull.
The arguments do not match the signature.; nested exception is:
java.lang.Illeg alArgumentExcep tion
at
System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.ReadRes ponse(SoapClien tMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String
methodName, Object[] parameters)
at
CTS_Demo.browse r.BrowserOperat ionsService.loo kupConceptCodes ByDesignation(S tring
codeSystem_id, String matchText, String matchAlgorithm_ code, String
language_code, Boolean activeConceptsO nly, Int32 timeout, Int32 sizeLimit) in
c:\visual studio projects\ctsdem otool\cts demo\web
references\brow ser\reference.c s:line 168
at CTS_Demo.CTSDem o.search(String text) in c:\visual studio
projects\ctsdem otool\cts demo\ctsdemo.cs :line 86
Which as you can see, makes no sense whatsoever.
I can provide more information as necessary - but I'm basically just trying
to figure out how to report this error to the .NET developers.
Nov 23 '05 #1
0 1750

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

Similar topics

5
1355
by: jmd | last post by:
hello. i am trying VC++ 7.1 (with vsnet 2003). my example : class Complex { public: Complex ( float re_ = 0.0, float im_ = 0.0 ) : re(re_), im(im_) {} float Re () { return ( re ); } float Re ( float re_ ) { return ( re = re_ ); }
6
2653
by: hb | last post by:
Hi, I have a page bill.aspx and its code-behind bill.aspx.cs. On bill.aspx I have: === Select a month: <asp:dropdownlist runat="server" id="lstDate" autopostback="True" /> <br> <asp:table runat="server" id="tabBill" /> <br>
0
1083
by: linkan56 | last post by:
I'm using stubs to unit test an existing system. I use the stubs not only as an empty shell for the real implementations, but also to control and check the behaviour of units. I have included test classes and stubs in a one project and are linking in files containing units from other projects, where also the real implementations of the stubs reside. When I link in the files containing the units I get namespace conflicts between the stubs...
13
2506
by: Karch | last post by:
I find myself doing things like this all the time: if ( SomeObject != null && SomeObject.AnotherObject != null && SomeObject.AnotherObject.YetAnother != null && SomeObject.AnotherObject.YetAnother.HelpMePlease != null) { // Do Something }
1
1356
by: Peter Michaux | last post by:
Hi, I saw Brendan Eich in an online conference video say that in JavaScript 2 that they will lexically bind the "this" keyword of inner functions. He said that currently the execution-time resolution of "this" is considered a bug by some. I often take advantage of the fact that "this" is resolved during execution. Is JavaScript 2 going to break all my (our?) code? For example, one time, to save typing and download time, I automated
12
2817
by: webinfinite | last post by:
I am starting a new thread for this topic since previous problem has been solved. I have code like this: #include <stdio.h> int main(){
27
2567
by: brad | last post by:
Does anyone else feel that unittesting is too much work? Not in general, just the official unittest module for small to medium sized projects? It seems easier to write some quick methods that are used when needed rather than building a program with integrated unittesting. I see the value of it (the official unittest that is)... especially when there's a lot of source code. But this... if len(x) != y: sys.exit('...')
3
1567
by: mario semo | last post by:
Hello, What does the C++ Norm says about the lifetime of compiler generated temporary variables? #include <stdio.h> class BaseRef { //--------------------------------------------------------------------------
9
3300
by: =?Utf-8?B?ai5hLiBoYXJyaW1hbg==?= | last post by:
Hi, I have a schema that has an optional element, fieldTag4000Field. If the element is omitted from the XML request, when it is deserialized, it will be null when I check it - which is fine. What happens when the element is supplied as <fieldTag4000Field/(empty), it does not equate to null. I want to be able handle this at the deserialization level rahter than in my edits later.
0
9517
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10207
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
10156
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
9997
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9030
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...
0
5435
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
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
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.