Hi Guys,
I'm trying desperately to familiarize myself with Axis2 and I'm stuck on the
part in the process that requires me to first create a WSDL file for my
project. I've downloaded XMLSpy to create my WSDL file which is attached.
When I test it for validity in XMLSpy, it is fine. But WSDL2Java.jar
doesn't agree. This is the command I use:
C:\axis2-1.6.2\samples\pnskeywords>%AXIS2_HOME%\bin\WSDL2Java -uri
keyword.wsdl
-p com.personalnetsearch.plugin.keys.axis2 -d adb -s
This is the result:
Using AXIS2_HOME: C:\axis2-1.6.2
Using JAVA_HOME: C:\Program Files\Java\jdk1.7.0_05
Retrieving document at 'keyword.wsdl'.
log4j:WARN No appenders could be found for logger
(org.apache.axis2.description.
WSDL11ToAllAxisServicesBuilder).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException
: Error parsing WSDL
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:175)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault: More than one part for message
KeywordLis
tInput
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:411)
at
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA
llServices(WSDL11ToAllAxisServicesBuilder.java:107)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
ionEngine.java:169)
... 2 more
Caused by:
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessin
gException: More than one part for message KeywordListInput
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1294)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer
ence(WSDL11ToAxisServiceBuilder.java:1217)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi
ng(WSDL11ToAxisServiceBuilder.java:731)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
int(WSDL11ToAxisServiceBuilder.java:552)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo
ints(WSDL11ToAxisServiceBuilder.java:503)
at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi
ce(WSDL11ToAxisServiceBuilder.java:373)
... 4 more
I don't understand why it has a problem with my having two parts for message
KeywordListInput? That's what it is supposed to have. It is supposed to
take to int parameters, just like CategoryListInput. Could somebody please
explain what's wrong.
Alan Shiers
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2012 rel. 2 sp1 (http://www.altova.com) by Alan Shiers (Tactical Enterprises Ltd.) -->
<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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.personalnetsearch.com/axis2/KeywordService" targetNamespace="http://www.personalnetsearch.com/axis2/KeywordService">
<wsdl:types>
<xsi:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.personalnetsearch.com/axis2/KeywordService" elementFormDefault="qualified">
<xsi:element name="ListItem">
<xsi:complexType>
<xsi:sequence>
<xsi:element name="ItemID" type="soapenc:integer"/>
<xsi:element name="ItemName" type="soapenc:string"/>
</xsi:sequence>
</xsi:complexType>
</xsi:element>
<xsi:element name="ArrayOfListItem">
<xsi:complexType>
<xsi:sequence>
<xsi:element ref="tns:ListItem" minOccurs="0" maxOccurs="unbounded"/>
</xsi:sequence>
</xsi:complexType>
</xsi:element>
</xsi:schema>
</wsdl:types>
<wsdl:message name="IndustryListInput">
<wsdl:part name="languageID" type="xs:int"/>
</wsdl:message>
<wsdl:message name="IndustryListOutput">
<wsdl:part name="ListItemArray" element="tns:ArrayOfListItem"/>
</wsdl:message>
<wsdl:message name="CategoryListInput">
<wsdl:part name="languageID" type="xs:int"/>
<wsdl:part name="industryID" type="xs:int"/>
</wsdl:message>
<wsdl:message name="CategoryListOutput">
<wsdl:part name="ListItemArray" element="tns:ArrayOfListItem"/>
</wsdl:message>
<wsdl:message name="KeywordListInput">
<wsdl:part name="languageID" type="xs:int"/>
<wsdl:part name="categoryID" type="xs:int"/>
</wsdl:message>
<wsdl:message name="KeywordListOutput">
<wsdl:part name="keywordsList" type="xs:string"/>
</wsdl:message>
<wsdl:portType name="IndustryListRequest">
<wsdl:operation name="getIndustryList">
<wsdl:input message="tns:IndustryListInput"/>
<wsdl:output message="tns:IndustryListOutput"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="CategoryListRequest">
<wsdl:operation name="getCategoryList">
<wsdl:input message="tns:CategoryListInput"/>
<wsdl:output message="tns:CategoryListOutput"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="KeywordListRequest">
<wsdl:operation name="getKeywordList">
<wsdl:input message="tns:KeywordListInput"/>
<wsdl:output message="tns:KeywordListOutput"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="IndustryListBinding" type="tns:IndustryListRequest">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getIndustryList">
<soap:operation soapAction="urn:#getIndustryList"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CategoryListBinding" type="tns:CategoryListRequest">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getCategoryList">
<soap:operation soapAction="urn:#getCategoryList"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="KeywordListBinding" type="tns:KeywordListRequest">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getKeywordList">
<soap:operation soapAction="urn:#getKeywordList"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Axis2KeywordService">
<wsdl:port name="IndustryListPort" binding="tns:IndustryListBinding">
<soap:address location="http://www.personalnetsearch.com/axis2/KeywordService"/>
</wsdl:port>
<wsdl:port name="CategoryListPort" binding="tns:CategoryListBinding">
<soap:address location="http://www.personalnetsearch.com/axis2/KeywordService"/>
</wsdl:port>
<wsdl:port name="KeywordListPort" binding="tns:KeywordListBinding">
<soap:address location="http://www.personalnetsearch.com/axis2/KeywordService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]