- This topic has 5 replies, 3 voices, and was last updated 15 years, 4 months ago by support-joy.
-
AuthorPosts
-
Nafees SharifMemberHi,
I just posted a message in this same forum yesterday about a WSDL given to me by an external party for which i have to generate client. I have a similar (but different) issue here with another client’s WSDL file. The offending WSDL is:
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.companyX.com/companyA" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.companyX.com/companyA" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://www.companyX.com/companyA"> <s:element name="Submit"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="detailedInquiryRequestXml" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="SubmitResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="SubmitResult" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="string" nillable="true" type="s:string" /> </s:schema> </wsdl:types> <wsdl:message name="SubmitSoapIn"> <wsdl:part name="parameters" element="tns:Submit" /> </wsdl:message> <wsdl:message name="SubmitSoapOut"> <wsdl:part name="parameters" element="tns:SubmitResponse" /> </wsdl:message> <wsdl:message name="SubmitHttpGetIn"> <wsdl:part name="detailedInquiryRequestXml" type="s:string" /> </wsdl:message> <wsdl:message name="SubmitHttpGetOut"> <wsdl:part name="Body" element="tns:string" /> </wsdl:message> <wsdl:message name="SubmitHttpPostIn"> <wsdl:part name="detailedInquiryRequestXml" type="s:string" /> </wsdl:message> <wsdl:message name="SubmitHttpPostOut"> <wsdl:part name="Body" element="tns:string" /> </wsdl:message> <wsdl:portType name="SummaryInquirySoap"> <wsdl:operation name="Submit"> <wsdl:input message="tns:SubmitSoapIn" /> <wsdl:output message="tns:SubmitSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:portType name="SummaryInquiryHttpGet"> <wsdl:operation name="Submit"> <wsdl:input message="tns:SubmitHttpGetIn" /> <wsdl:output message="tns:SubmitHttpGetOut" /> </wsdl:operation> </wsdl:portType> <wsdl:portType name="SummaryInquiryHttpPost"> <wsdl:operation name="Submit"> <wsdl:input message="tns:SubmitHttpPostIn" /> <wsdl:output message="tns:SubmitHttpPostOut" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="SummaryInquirySoap" type="tns:SummaryInquirySoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Submit"> <soap:operation soapAction="http://www.companyX.com/companyA/Submit" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="SummaryInquirySoap12" type="tns:SummaryInquirySoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Submit"> <soap12:operation soapAction="http://www.companyX.com/companyA/Submit" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="SummaryInquiryHttpGet" type="tns:SummaryInquiryHttpGet"> <http:binding verb="GET" /> <wsdl:operation name="Submit"> <http:operation location="/Submit" /> <wsdl:input> <http:urlEncoded /> </wsdl:input> <wsdl:output> <mime:mimeXml part="Body" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="SummaryInquiryHttpPost" type="tns:SummaryInquiryHttpPost"> <http:binding verb="POST" /> <wsdl:operation name="Submit"> <http:operation location="/Submit" /> <wsdl:input> <mime:content type="application/x-www-form-urlencoded" part="Body" /> </wsdl:input> <wsdl:output> <mime:mimeXml part="Body" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="SummaryInquiry"> <wsdl:port name="SummaryInquirySoap" binding="tns:SummaryInquirySoap"> <soap:address location="http://188.185.142.209/companyA/SummaryInquiry.asmx" /> </wsdl:port> <wsdl:port name="SummaryInquirySoap12" binding="tns:SummaryInquirySoap12"> <soap12:address location="http://188.185.142.209/companyA/SummaryInquiry.asmx" /> </wsdl:port> <wsdl:port name="SummaryInquiryHttpGet" binding="tns:SummaryInquiryHttpGet"> <http:address location="http://188.185.142.209/companyA/SummaryInquiry.asmx" /> </wsdl:port> <wsdl:port name="SummaryInquiryHttpPost" binding="tns:SummaryInquiryHttpPost"> <http:address location="http://188.185.142.209/companyA/SummaryInquiry.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
… and the “warning” that i receive in the WSDL file is:
WS-I: (AP2901) A description uses neither the WSDL MIME Binding as described in WSDL 1.1 Section 5 nor WSDL SOAP binding as described in WSDL 1.1 Section 3 on each of the wsdl:input or wsdl:output elements of a wsdl:binding.
which occurs on line 78, in the following snippet:
<wsdl:binding name="SummaryInquirySoap12" type="tns:SummaryInquirySoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="Submit"> <soap12:operation soapAction="http://www.dq.com.lb/Waseel/Submit" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding>
… and when i generate my client side artifacts from this WSDL, i receive the following “warning” message:
WS-I: (BP2402) The wsdl:binding element does not use a soapbind:binding element as defined is section "3 SOAP Binding." of the WSDL 1.1 specification.
If, i ignore the above warnings and click “Finish” to generate the artifacts, it gives me the following five “warning” prompts:
SOAP port "SummayInquirySoap12": uses a non-standard SOAP 1.2 binding. port "SummaryInquiryHttpGet" is not a SOAP port, it has no soap:address port "SummaryInquiryHttpGet": not a standard SOAP port. The generated articats may not work with JAXWS runtime. port "SummaryInquiryHttpPost" is not a SOAP port, it has not soap:address port "SummaryInquiryHttpPost": not a standard SOAP port. The generated articats may not work with JAXWS runtime.
If i ignore these, the following is what get created:
|-ObjectFactory.java |-package-info.java |-Submit.java |-SubmitResponse.java |-SummaryInquiry.java |-SummaryInquiryHttpGet.java |-SummaryInquiryHttpPost.java |-SummaryInquirySoap.java
… and i use the following code to invoke the web service:
SummaryInquiry myStub=new SummaryInquiry(); SummaryInquirySoap myPort=myStub.getSummaryInquirySoap(); myPort.submit(whatever);
Apparaently, this client also used .NET web services to generate artifacts on his side and (i think) that’s what is causing validation errors in his WSDL on MyEclipse when i try to generate client side stubs for me. This is happening may be because .NET doesnt adhere to WS-I very strictly. However, like the previous issue ([URL]https://www.genuitec.com/forums/topic/attributeâ-partâ-must-appear-on-mime-content/[/URL]), this WSDL was working fine with me when i was working with JAX-RPC (without Eclipse, and was using Ant scripts, wsdeploy and wscompile). It is a bit unnatural for me to ask the external agent to change his WSDL because i am upgrading from JAX-RPC to JAX-WS.
My question is, should i go ahead and ask the external agent to make his WSDL WS-I compliant? Or can i safely ignore all the “warning”s in this process and try continuing? I know that warnings are warnings and not errors, but here i am getting a lot of them, all in one process. Secondly the warning message related to “validation _error_” is a little hard for me to digest and to continue ignoring it sounds not-good to me.
I am using MyEclipse 7.5 with tomcat6/jboss5 using JDK6. My workspace uses 1.6 as compliance level. My project uses Java EE5.0, Jax-WS 2.1 libraries along with other jars needed for application.
Thanks in advacne and best regards,
–mnsharif
support-joyMembermnsharif,
I will escalate this issue to our dev team member. Sorry for the inconvinience.
Nafees SharifMemberThanks for your time joy. I am looking forward to more input on this.
Thanks once again.–mnsharif
Brian FernandesModeratormsharif,
WS-I is primarily an “interoperability” standard allowing web services developed using one particular framework / stack to be used or consumed by other frameworks with the least possible pain. So what is happening here is just that, you are running into a few issues because your client is not WS-I compliant.
Given the fact that you are generating the web service client and not the web service itself, I would feel that most of the WS-I errors are not important and can be ignored. It would always be useful to have your client make his WSDL WS-I compliant, but that is often not viable in many instances. I have replied to your other queries here: https://www.genuitec.com/forums/topic/attributeâ-partâ-must-appear-on-mime-content/#post-301519
Thank you for your patience, do let us know if you require further clarification.
Nafees SharifMemberHi Brian,
Like the other thread, your explanation has helped in clearing a few confusions. Thanks for you time really.
I just came across http://www.ws-i.org/deliverables/Default.aspx and am sharing for anyone whose search might hit this thread 🙂
–mnsharif
support-joyMemberThank you for sharing your findings with us.
-
AuthorPosts