See responses inline ... On 1/31/07, Gurpreet Singh Dhanoa, HCL-Industry Solutions <[EMAIL PROTECTED]> wrote:
Probably you can see this WSDL as well.
The getPerson WSDL has the same problems as the getContent WSDL. ------------------------------
*From:* Gurpreet Singh Dhanoa, HCL-Industry Solutions *Sent:* Tuesday, January 30, 2007 10:38 PM *To:* 'Anne Thomas Manes'; 'axis-user@ws.apache.org' *Subject:* RE: Help with Message Style Web services Anne, Answers to your questions - Why you selected message style? Message style is used by the architects considering interoperability issues in mind. They want to receive the XML and send back the XML and do not want to deal with the SOAP engine serialization. It provide the web service more freedom and we do not jump into the issues of mapping the complex types across platforms
Message style doesn't necessarily make interoperability better (and, as you've experienced, it can often make interoperability more challenging because it doesn't generate an explicit contract for you). Message style is an application programming style that only affects the way your particular part of the communication (in this case "service") processes the message. Keep in mind that just because your piece (the service) uses message style, that doesn't force the client to use the equivalent to message style. The client may prefer to deserialize the XML into objects -- as is the case with anyone using .NET. If you want to ensure better interoperability, then the most important thing you must do is define a schema for the message body and use that for the basis of your development. (i.e., Schema-first approach). In all cases, your WSDL should specify the schema of the messages it expects to exchange. For best interoperability with SOAP, you should make sure the WSDL conforms to the "wrapped" document/literal convention. By the way -- if you really just want to exchange XML messages, and you don't want to exploit any of the capabilities that the SOAP envelope or Axis provides, then you'd probably do better just using "plain old XML" (POX) over HTTP. - Does the message have a defined message structure, or was your goal to
enable the exchange of any content? It is pure message based and we are not passing any content (attachments) in the web service. We have defined unqualified schemas for request and response and negotiate on those schemas while sending the request and response.
I wasn't asking about attachments, I was asking about the contents of the SOAP envelope. Your WSDL does not define the message structure (schema). It defines two elements: getContent and getContentReturn, both defined as xsd:anyType. (i.e, no information about the expected structure of these two messages.) Negotiating the schemas out-of-band makes the interaction much more difficult. If your service expects to exchange a message with a defined schema, then you should explicitly specify the schema in the WSDL. (By "explicitly specify" I mean either define the schema inline, import it, or include it into the <wsdl:types> section.) The only reason to ever define xsd:anyType in your WSDL is if you intend the service to accept any information -- e.g., perhaps you're designing a generic dispatcher: it receives a message, determines the type of content and dispatches it to the appropriate processor. But for any kind of predetermined process, you should never use xsd:anyType. (Some people use xsd:any or xsd:anyType to enable extensibility, but it's a bad idea. Just say "no".) - Did you write a WSDL with a defined schema for the message structure?
I generated the WSDL from the Apache Axis by appending ?WSDL to the web service URL. I have attached the WSDL with this email. Unfortunately .Net client cannot understand this WSDL and they want to change the WSDL manually and include the schema definition in it.
When using the message style, it's your responsibility to write your own WSDL (or edit the one generated by Axis) so that it contains the schema of the request and response messages. Since you've given Axis no information about the message content, you can't assume that Axis can generate the schema for you. The .NET users' request is completely reasonable. You should edit the WSDL and include a schema that defines the structure of the getContent and getContentReturn messages. Then you should redeploy the service using the <wsdlFile> option in the WSDD to point to your revised WSDL file. Aslo, to enable interoperability with .NET, you must ensure that your schema specifies elementFormDefault="qualified". - What are the challenges that .NET clients are facing?
.Net Client chaged the WSDL file "whatever.wsdl" and after that they are able to invoke the web service. I turned on the Tcp trace and can see a valid request and response getting exchanged. The problem is that when ever .Net gets back a response it is not able to return the object back to the .Net program. I am confused and thinking it might be a problem with the namespaces or structure of the XML document which is getting passed in the response of the web service. My understanding is that .Net is trying to de-serialize the response by matching the response XML with the schema in WSDL but not able to do so.
.NET always assumes that the schema has been defined with elementFormDefault="qualified", even if you explicitly specify "unqualified" (this is a bug in .NET, but the rest of us have to live with it). You indicated that you have "unqualified" schemas that define the message structure, so I assume this is why your .NET clients can't interpret the messages. If you want to support .NET clients, you should change your schemas to elementFormDefault="qualified". Do you see any problem in the WSDL? How is it normally done when we use
message style web services and have .Net Client.
See instructions above. Appreciate your response.
------------------------------ *From:* Anne Thomas Manes [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, January 30, 2007 11:58 AM *To:* Gurpreet Singh Dhanoa, HCL-Industry Solutions *Subject:* Re: Help with Message Style Web services Please ask your questions on the Axis forum. Please include answers to the following questions: - Why you selected message style? - Does the message have a defined message structure, or was your goal to enable the exchange of any content? - Did you write a WSDL with a defined schema for the message structure? - What are the challenges that .NET clients are facing? Anne On 1/30/07, *Gurpreet Singh Dhanoa, HCL-Industry Solutions* < [EMAIL PROTECTED]> wrote: Hi Anne, I got your email id from the Axis forum. I have published some web services on message style basis for our customer. I have got a .net client which is facing problems while de-serializing the response back. Do you know of any way or know any reference where this Axis message style web services are in use? I will appreciate your response! Regards -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.8/649 - Release Date: 1/23/2007 8:40 PM DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.8/649 - Release Date: 1/23/2007 8:40 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.17/661 - Release Date: 1/30/2007 11:30 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.432 / Virus Database: 268.17.17/661 - Release Date: 1/30/2007 11:30 PM