RE: Nullable primitives from Java webservice received as null in .

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Steven,

We use the WSDL tool to generate the webservice proxy, and out of the box,
it's generating the nullable types (int? in this case). So there aren't any
issues when dealing with actual nulls when they occur.

I've talked with our Java server guys and apparently we're stuck with
RCP/encoded, as we have quite complex and large object graphs in the data
that we send, including bidirectional relationships (ie parent <=> child).
The size of the SOAP messages are already a performance issue for us
(surprise surprise), so any extra data in the messages would unfortunately
only make it worse, even if we did manage to avoid the bidirectional
relationships.

As for publishing the service, unfortunately I don't think that can happen.
I work at a bank, so I'm a long way behind a firewall and don't have the
privileges to make any services public.

Thanks for your help so far. It's looking like our best/only option is to
creata small wrapper classes around the nullable primitives that we use, and
provide implicit conversions on the .Net side. It could be worse.

Niall

"Steven Cheng[MSFT]" wrote:

Hello Niall,

Yes, there does existing some existing thread discussing on the similar
issues in the newsgroup. I remember the issue you refered is related to a
custmo value object's boolean member, and we haven' been able to get
progress in that thread. For your scenario, I've got that you're just
sending some primitive values as web method's parameters. I think your
analysis below is reasonable

================
It seems to me that the .Net client is seeing "xsd:int" as the type and
treating it as a primitive, and therefore not following the references.
================

Actually, such problems mostly occurs when the webservice is defined as
"Rpc/Encoded" format instead of "Document/Literal", rpc/encoded style SOAP
message is likely causing interop issues since the client ans server are
difficult to followup a consistent SOAP message format(through XSD schema).
Since you're using .net 2.0(WSE 3.0), have you tried manually modify the
.net client proxy code and change the parameter object's type to Nullable
types in .net 2.0? This can help wrapper a primitive type in .net as a
reference type(without using a wrapper class).

#Nullable Class
http://msdn2.microsoft.com/en-us/library/fs5xdbk8.aspx

Also, I'm wondering whether it is convenient that you provide me a publich
accessible service endpoint address (demonstrate your current java
service). If so, I'd like to perform some local tests against it.

Please let me know if you have any other concerns.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights
.



Relevant Pages

  • RE: Disabling Keep-Alive
    ... As for the webservice proxy, if you're using ASP.NET web site application ... webrequest object, you can try converting the webrequest to HttpWebRequest ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • I encounter the same error, but my data does not have the benefit of record tags.
    ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ... where an initial response from the community or a Microsoft Support ... I am having trouble creating one input flat file. ...
    (microsoft.public.biztalk.general)
  • RE: POPUp - VB.Net
    ... how does your timer interact with the threads in your ... Private Sub Button1_Click(ByVal sender As System.Object, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.general)
  • Re: System Error (1003) - 0x000000CB
    ... MCSE, CCEA, Microsoft MVP - Terminal Server ... A call to Microsoft Support seems appropriate. ... Computer: TERMSERVER1 ...
    (microsoft.public.windows.terminal_services)
  • Re: How do I Sleep for a specified amount of time and relinquish c
    ... Finally, the Windows thread scheduling is not a trivial topic, it is ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework)