Q
Problem solve Get help with specific problems with your technologies, process and projects.

Calling .NET from Java client

I want to call a .NET Web service from my Java client developed in JWSDP during the building with ANT and I received the following error:
"error: modeler
error: model error: invalid entity name: "schema" (in namespace "https://www.w3.org/2001/XMLSchema")

What should I do to remove this error?
I can't definitively answer this question without taking a look at your WSDL file, but I'll take a guess. Are you, by chance, using the element anywhere other than as the top-level element in the schema definition? For example, does your schema contain an element definition that references a schema, e.g., ? I've seen .NET do this before, especially when you're exposing a .NET dataset through the WSDL interface. The dataset structure is generated automatically, so .NET includes a schema with the message. I imagine that JWSDP can't handle this type of schema construction (embedding a schema in a document).

I recommend that you change your .NET service interface. As an interoperability best practice, you should never expose a language-specific collection class, such as a .NET dataset or a Java hashmap through your WSDL interface. Instead you should flatten the collection into an array.

If you have no option to change the .NET service interface, then you will not be able to use the JWSDP tools to generate your client code. You could try modifying the element definition to type="anyType", and then write a custom deserializer that includes a schema processor that can parse the schema and interpret the contents of the dataset, or you can interface with the message using SAAJ. Or you might try using one of the other Java Web services platforms that specialize in .NET interoperability. I've had best luck using Systinet Server (formerly known as WASP) and webMethods Glue.

Dig Deeper on Topics Archive

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAWS

SearchCloudComputing

TheServerSide.com

Close