Skip to main content

2003 Micorsoft Visual C# .Net interop problem

6 replies [Last post]
jfdenise
Offline
Joined: 2004-12-20

I am writing a WS using latest jaxws-ri.
I access it using .Net and JAXWS client.

The wsdl contains a elementFormDefault="qualified"

Using JAXWS client, everything works fine.

Using .Net client, the first local element namespace prefixed is not recognized.

If I add form="qualified" attribute to the element, everything works fine.

Who is right?
It seems to me a .Net problem. The elementFormDefault="qualified" should be inherited by all elements.

Any ideas?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kohlert
Offline
Joined: 2003-06-16

Yes, I believe you are correct. .Net is known for not handling elementformDefault very well.

jsweeney
Offline
Joined: 2005-05-06

Is this why the MSOffice Research Pane is failing to recognize my JAXRPC service's Registration response?

I've tried a sample Google Research service which works and I notice differences in the way namespace prefixes are used. Looking at the response, the Google SOAP Envelope and Body tags start off this way:


xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">


while my Envelope and Body tags start this way:


xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="urn:Microsoft.Search">


Could the use of the ns0 prefix in my service response be the problem?

Thanks!

Jim Sweeney

jfdenise
Offline
Joined: 2004-12-20

Your XML instances seem both valid to me.
What is the schema this piece of XML?
The current problem is at the schema level.

jsweeney
Offline
Joined: 2005-05-06

Yes both Response instances look valid, but the MSWord Research pane accepts the 1st and rejects the 2nd. Here is the wsdl defining an Office Research service (filtered with only the Registration operation/messages displayed):








































jsweeney
Offline
Joined: 2005-05-06

Ok, I have narrowed the problem down to the ns0 namespace alias on the RegistrationResponse and RegistrationResult tags. MSWord does not like that these names are prefixed with the alias. Is there any way to modify the WSDL or other jax-rpc inputs so that the Envelope tag declares the default namespace as xmlns="urn:Microsoft.Search" instead of declaring the alias xmlns:ns0="urn:Microsoft.Search" when my jax-rpc service writes the response?

Thanks!

kohlert
Offline
Joined: 2003-06-16

Not, easily. You could write a handler to transform the message.