You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by James Howe <jw...@allencreek.com> on 2003/06/09 15:59:00 UTC

XML error with generated WSDL

I'm having problems with the WSDL information generated for a service I 
have deployed on my web server.  I'm using Axis-1_1RC2 with Resin 2.1.6.  
My wsdd file looks like this:

<deployment 	xmlns="http://xml.apache.org/axis/wsdd/" 
	xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <service name="MyService" provider="java:RPC">
  <parameter name="className" value="com.foo.bar.MyService"/>
  <parameter name="allowedMethods" value="*"/>
 </service>
</deployment>

When I get the WSDL file by using ?WSDL, my XML parser chokes on the second 
line.  The first couple of lines in the generated WSDL file are:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions 
	targetNamespace="http://localhost:8188/services/MyService" 	xmlns:="" 
	xmlns:impl="http://localhost:8188/services/MyService" 
	xmlns:intf="http://localhost:8188/services/MyService" 
	xmlns:apachesoap="http://xml.apache.org/xml-soap" 
	xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
	xmlns="http://schemas.xmlsoap.org/wsdl/" 
	xmlns:="http://www.w3.org/2000/xmlns/">

The parser complains about a duplicate attribute.  The problem seems to be 
that the wsdl:definitions tag has the following attributes defined:

	xmlns:=""

and
	xmlns:="http://www.w3.org/2000/xmlns/"

which seems like a strange syntax to begin with.  Seems like there should 
be some namespace name following the "xmlns:" portion of the attribute.  I 
can get the parser to stop complaining if I remove the first occurrence.  
I'm new to Axis so I wouldn't be surprised if I've made some mistake.  If 
so, can someone tell me how to fix it.  Otherwise, it looks like some sort 
of bug in Axis.

Thanks.

-- 
James Howe