This does not seem to be a bug. Your schema definition needs to have the
elementFormDefault attribute with a value of "qualified". The default value
(if unspecified) is "unqualified" which results in your locally declared
elements to be in no namespace.
Modify your schema like:
<schema elementFormDefault="qualified" ......>
See if the behavior changes as a result of this?
- Junaid
"Matthew
Sgarlata"
<[EMAIL PROTECTED] To
cognition.com> <[EMAIL PROTECTED]>
cc
03/12/2004 03:25
PM Subject
Possible bug: empty namespaces for
attributes using doc-literal
Please respond to
[EMAIL PROTECTED]
he.org
I may have found a bug with Axis' treatment of doc-literal encoding in Axis
1.2 alpha. My basic steps were:
1) Create a WSDL file with complexTypes defined using XML Schema
2) Run wsdl2java to generate my WSDD, skeletons, etc.
The classes generated by WSDL2Java that correspond to my complexTypes in my
schema seem to have the namespaces specified incorrectly in the typeDesc
initialization code (the namespaces are blank instead of using my
namespace). For an example, see line 212 of Capability.java. This causes
Axis' SOAP response to contain a blank namespace for my attributes, like
this:
<?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>
<capability xmlns="urn:jroc:services:0:1:schema:CapabilityService">
<controlNum xmlns="">104-41022207</controlNum>
<title xmlns="">testing</title>
<description xsi:nil="true" xmlns=""/>
<capabilityNum xsi:nil="true" xmlns=""/>
<dataCreatedDate xmlns="">2004-03-08T19:13:00.000Z</dataCreatedDate>
<poc xsi:type="ns1:Person"
xmlns:ns1="urn:jroc:services:0:1:schema:CapabilityService" xmlns="">
<emailAddress>[EMAIL PROTECTED]</emailAddress>
<firstName>Matt</firstName>
<middleName>Joseph</middleName>
<lastName>Sgarlata</lastName>
<phoneNumber xsi:nil="true"/>
</poc>
</capability>
</soapenv:Body>
</soapenv:Envelope>
The xmlns should be "urn:jroc:services:0:1:schema:CapabilityService" not ""
for all attributes (including the poc attribute).
Does anyone know if I'm doing something wrong or if this really is a bug?
If it's a bug, I might be able to prepare and submit a patch. To verify if
this is a bug, I attached my WSDL, my Axis-generated Capability and Person
objects (that correspond to the <capability> and <poc> elements), my
mapping
file, and my Axis-generated WSDD file.
Matt
(See attached file: deploy.wsdd)(See attached file: Capability.java)(See
attached file: Person.java)(See attached file: capability.wsdl)(See
attached file: capability-mapping.txt)
deploy.wsdd
Description: Binary data
Capability.java
Description: Binary data
Person.java
Description: Binary data
capability.wsdl
Description: Binary data
capability-mapping.txt
Description: Binary data
