Hi,
I am trying to build a web services that takes in a document and returns a
zip file as soap attachment. Generating Java stubs and skeletons works fine
using the wsdltojava tool. However after deploying the service when I try
to generate the wsdl (using
http://localhost:8080/axis/services/Pip2A1Bootstrap?wsdl), it throws the
following exception:
Fault - WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL
Document -'.: The value of the attribute
"prefix="xmlns",localpart="tns2",rawname="xmlns:tns2"" is invalid. Prefixed
namespace bindings may not be empty.: org.xml.sax.SAXParseException: The
value of the attribute
"prefix="xmlns",localpart="tns2",rawname="xmlns:tns2"" is invalid. Prefixed
namespace bindings may not be empty. at
org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at
com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source) at
com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source) at
org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:269) at
org.apache.axis.providers.java.JavaProvider.generateWSDL(JavaProvider.java:478)
at
org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:72)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156) at
org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:143) at
org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:368)
at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:491) at
org.apache.axis.transport.http.AxisServlet.processWsdlRequest(AxisServlet.java:434)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:286)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
........
Also when I look at the client request, it is missing the default namespace
in the input document inside the soap body. It looks as follows:
POST /axis/services/Pip2A1Bootstrap HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1beta
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 427
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<DataRequest xmlns="">
<ParamList>
<Parameter>
<Name>PriceListId</Name>
<Value>GLU</Value>
</Parameter>
</ParamList>
</DataRequest>
</soapenv:Body>
</soapenv:Envelope>
The WSDL file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://www.temp.com/ics_xml/bondi/services/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:typens="http://www.temp.com/ics_xml/bondi/types/"
xmlns:tns="http://www.temp.com/ics_xml/bondi/services/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
<xsd:schema targetNamespace="http://www.temp.com/ics_xml/bondi/types/"
xmlns="http://www.temp.com/ics_xml/bondi/types/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Parameter">
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="Value" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ParamList">
<xsd:sequence>
<xsd:element name="Parameter" type="Parameter" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="DataRequest">
<xsd:sequence>
<xsd:element name="ParamList" type="ParamList" minOccurs="1"
maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</types>
<wsdl:message name="downloadRequest">
<wsdl:part name="DataRequest" type="typens:DataRequest"/>
</wsdl:message>
<wsdl:message name="downloadResponse">
<wsdl:part name="downloadReturn" type="apachesoap:DataHandler"/>
</wsdl:message>
<wsdl:portType name="ICSDownload">
<wsdl:operation name="download" parameterOrder="DataRequest">
<wsdl:input message="tns:downloadRequest" name="downloadRequest"/>
<wsdl:output message="tns:downloadResponse" name="downloadResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ICSDownloadSoapBinding" type="tns:ICSDownload">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="download">
<soap:operation soapAction="" />
<wsdl:input name="downloadRequest">
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.temp.com/ics_xml/bondi/services/" use="literal"/>
</wsdl:input>
<wsdl:output name="downloadResponse">
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://www.temp.com/ics_xml/bondi/services/" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Pip2A1BootstrapService">
<wsdl:port binding="tns:ICSDownloadSoapBinding" name="Pip2A1Bootstrap">
<soap:address
location="http://localhost:8080/axis/services/Pip2A1BootstrapService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I have spent lot of cycles trying to figure out the problem including
searching the mailing list. I would greatly appreciate if you can examine
the wsdl and point out the problem.
Thanks.
Juzer Kothambawala
Global Commerce Technology Group
AIM: juzersk
Phone: (408) 525-0814
Email: [EMAIL PROTECTED]
- Messages, Handlers, and Architecture Brian Fliege
- RE: Messages, Handlers, and Architecture Juzer Kothambawala
- RE: Messages, Handlers, and Architecture Keith Hatton
- RE: Messages, Handlers, and Architecture Tom Samplonius
