• 0

JAXB wsimport generating nonsense from WSDL


Question

In an ASP.NET I have a SVC.

 

One of the Operating Contracts takes in a list of Foo Objects. Foo has all public members, some strings, and some other objects. All public, with [DataMember] declaration and [DataContract] with namespace of my service.

 

To communicate with this SVC from JAVA I ran "wsimport.exe ?wsdl" which generates three folders with compiled classes which I jar and put into my JAVA workspace.

 

The issue is, the WCF Service never receives any data elements (of class Foo) from JAVA code. That is, I set the inner elements of class Foo from JAVA code, and call the web service - but they don't get passed along.

 

So I marshalled out what was being sent from JAVA,

<Foo>
<ns4:string xmlns:ns4="http://schemas.microsoft.com/2003/10/Serialization/">Blah</ns4:string>
<ns4:string xmlns:ns4="http://schemas.microsoft.com/2003/10/Serialization/">Blaaaah</ns4:string>
<ns4:string xmlns:ns4="http://schemas.microsoft.com/2003/10/Serialization/">Bloop</ns4:string>
</Foo>

I am pretty sure this shoud look like this, (This is the only idea I have why the service it is not seeing the strings passed from java code)

<Foo>
<Comment>Blah</Comment>
<Description>Blaaaah</Description>
<Misc>Bloop</Misc>
</Foo>

I am using the generated Factory classes.

Obviously no issues creating a .NET client using svcutil.
I tried various settings in wsimport. No luck.

 

Anyone has an idea? Obviously I can manually serialize these or remove the complex types (both equally painful).

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.