- This topic has 2 replies, 2 voices, and was last updated 17 years, 11 months ago by darbvin.
-
AuthorPosts
-
darbvinMemberI am trying to create a web service in MyEclipse using the top-down method. However, when I use the wizard to do so, I get a non-descript error saying “Could not create service”. I used XMLSpy to validate the WSDL, and I have another WSDL client that can parse it successfully as well, so I am not sure what I am missing.
I am a WSDL newbie, but when I tried to create the service bottom-up (actually preferred method), my client couldn’t parse the WSDL because it was missing a type attribute on the message parts. So, I have created this WSDL to the best of my knowledge in an attempt to work around it.
Many thanks in advance for your help!
DarcyMy WSDL contains:
<?xml version="1.0" encoding="UTF-8"?> <!-- edited with XMLSpy v2007 (http://www.altova.com) by Darcy Lewis (Milsoft) --> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://new.webservice.namespace" targetNamespace="http://new.webservice.namespace"> <wsdl:types> <xs:schema targetNamespace="http://new.webservice.namespace" elementFormDefault="qualified"> <xs:complexType name="ArrayOfArrayOfString"> <xs:complexContent mixed="false"> <xs:restriction base="soapenc:Array"> <xs:attribute wsdl:arrayType="xsd:string[][]" ref="soapenc:arrayType"/> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:schema> </wsdl:types> <wsdl:message name="getMatchesRequest"> <wsdl:part name="parameter" type="xs:string"/> </wsdl:message> <wsdl:message name="getMatchesResponse"> <wsdl:part name="parameter" type="tns:ArrayOfArrayOfString"/> </wsdl:message> <wsdl:portType name="CustomerLookupSoap"> <wsdl:operation name="getMatches" parameterOrder="parameter"> <wsdl:input message="tns:getMatchesRequest"/> <wsdl:output message="tns:getMatchesResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="CustomerLookupSoap" type="tns:CustomerLookupSoap"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="getMatches"> <soap:operation soapAction="http://darbvin4:8081/MVP/services/CustomerLookup/getMatches" style="document"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="CustomerLookupSoap"> <wsdl:port name="CustomerLookupPort" binding="tns:CustomerLookupSoap"> <soap:address location="http://darbvin4:8081/MVP/services/CustomerLookup"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
MyEclipse Installation Details:
*** Date: Mon Dec 04 14:26:35 CST 2006
*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.5.0_09*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 5.0 GA
Build id: 20060805-5.0-GA*** Eclipse details:
MyEclipse Enterprise WorkbenchVersion: 5.0.1 GA
Build id: 20060810-5.0.1-GAEclipse Graphical Editing Framework
Version: 3.2.0.v20060626
Build id: 20060627-0816Eclipse Platform
Version: 3.2.0.v20060609m-AgOexn6hlEUsvBO
Build id: M20060629-1905Eclipse RCP
Version: 3.2.0.v20060609m-SVDNgVrNoh-MeGG
Build id: M20060629-1905Eclipse Java Development Tools
Version: 3.2.0.v20060609m-F7snq1fxia-Z4XP
Build id: M20060629-1905Eclipse Plug-in Development Environment
Version: 3.2.0.v20060609m——6zXJJzJzJq
Build id: M20060629-1905Eclipse Project SDK
Version: 3.2.0.v20060609m-GNq6oQq-7es-Y81
Build id: M20060629-1905Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
C:\Program Files\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
1374_50
-product
com.genuitec.myeclipse.product.ide
-vm
C:\WINDOWS\system32\javaw.exeMyEclipse Log:
!SESSION 2006-12-04 14:25:44.252 ———————————————–
eclipse.buildId=M20060629-1905
java.version=1.5.0_09
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product com.genuitec.myeclipse.product.ide
Command-line arguments: -os win32 -ws win32 -arch x86 -product com.genuitec.myeclipse.product.ide!ENTRY org.eclipse.wst.internet.cache 1 0 2006-12-04 14:25:59.555
!MESSAGE wtp.autotest.noninteractive is set. Licenses dialogs will not be displayed.!ENTRY com.genuitec.eclipse.ws.xfire 4 0 2006-12-04 14:26:24.720
!MESSAGE Error generating services
!STACK 0
org.codehaus.xfire.gen.GenerationException: Error generating JAXB model.
at org.codehaus.xfire.gen.jaxb.JAXBSchemaSupport.initialize(JAXBSchemaSupport.java:102)
at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:115)
at com.genuitec.eclipse.ws.xfire.generator.WSGenJob.run(WSGenJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Brian FernandesModeratorDarcy,
Your WSDL file fails WS-I compliance checks BP2108 and BP2012. You can find out more about these here: http://www.ws-i.org/Testing/Tools/2005/06/AP10_BP11_SSBP10_TAD.htm
How are you generating / developing your client? WS-I compliant message parts actually require the element attribute and not the type attribute.
Might I suggest continuing with the bottom up approach, and hand tweaking the WSDL generated by XFire and using that instead? Again, I’m not entirely clear what the details on your client are, so I can’t say for sure. In your service bean (in the services.xml file) you can use the <wsdlURL> element to point to your WSDL file.
Hope this helps.
darbvinMemberI will give that a shot – many thanks again, Brian!
Darcy
-
AuthorPosts