You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2004/02/17 20:21:20 UTC

DO NOT REPLY [Bug 27011] New: - Response elements contain blank namespace

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27011>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27011

Response elements contain blank namespace

           Summary: Response elements contain blank namespace
           Product: Axis
           Version: 1.2 Alpha
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Samples
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: seth@oculan.com


Additional platform info:
Tomcat 5.0.18
Sun J2SDK 1.4.0_O2

I'm attempting to run a simple SOAP query from within Microsoft InfoPath using
the "Version" service included with the Axis samples. This service simply prints
out the current Axis version on the server in a string field.

Here's the WSDD for the service:

<service name="Version" style="document">
 <parameter name="allowedMethods" value="getVersion"/>
 <parameter name="className" value="org.apache.axis.Version"/>
 <namespace>http://axis.apache.org</namespace>
</service>

I've got this WSDD in the server-config.wsdd for my webapp. When visiting the
?wsdl URL for the service, I get the following WSDL:

<wsdl:definitions targetNamespace="http://axis.apache.org">
<!--
WSDL created by Apache Axis version: 1.2alpha
Built on Dec 01, 2003 (04:33:24 EST)
-->
<wsdl:types>
 <schema elementFormDefault="qualified" targetNamespace="http://axis.apache.org">
   <element name="getVersionReturn" type="xsd:string"/>
 </schema>
</wsdl:types>
<wsdl:message name="getVersionRequest">
</wsdl:message>
<wsdl:message name="getVersionResponse">
 <wsdl:part element="impl:getVersionReturn" name="getVersionReturn"/>
</wsdl:message>
<wsdl:portType name="Version">
 <wsdl:operation name="getVersion">
  <wsdl:input message="impl:getVersionRequest" name="getVersionRequest"/>
  <wsdl:output message="impl:getVersionResponse" name="getVersionResponse"/>
 </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="VersionSoapBinding" type="impl:Version">
 <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
 <wsdl:operation name="getVersion">
  <wsdlsoap:operation soapAction=""/>
  <wsdl:input name="getVersionRequest">
   <wsdlsoap:body namespace="http://axis.apache.org" use="literal"/>
  </wsdl:input>
  <wsdl:output name="getVersionResponse">
   <wsdlsoap:body namespace="http://axis.apache.org" use="literal"/>
  </wsdl:output>
 </wsdl:operation>
</wsdl:binding>
<wsdl:service name="VersionService">
 <wsdl:port binding="impl:VersionSoapBinding" name="Version">
  <wsdlsoap:address location="http://192.168.3.113/webservices/Version"/>
 </wsdl:port>
</wsdl:service>
</wsdl:definitions>

In InfoPath, I can set up a new form to query this service. However, when
performing the query, the namespace returned for the value is blank. Here is a
copy of the XML portion of the packet returned by Axis (as sniffed by tcpdump):

0x00c0   0d0a 3c3f 786d 6c20 7665 7273 696f 6e3d        ..<?xml.version=
0x00d0   2231 2e30 2220 656e 636f 6469 6e67 3d22        "1.0".encoding="
0x00e0   5554 462d 3822 3f3e 0a3c 736f 6170 656e        UTF-8"?>.<soapen
0x00f0   763a 456e 7665 6c6f 7065 2078 6d6c 6e73        v:Envelope.xmlns
0x0100   3a73 6f61 7065 6e76 3d22 6874 7470 3a2f        :soapenv="http:/
0x0110   2f73 6368 656d 6173 2e78 6d6c 736f 6170        /schemas.xmlsoap
0x0120   2e6f 7267 2f73 6f61 702f 656e 7665 6c6f        .org/soap/envelo
0x0130   7065 2f22 2078 6d6c 6e73 3a78 7364 3d22        pe/".xmlns:xsd="
0x0140   6874 7470 3a2f 2f77 7777 2e77 332e 6f72        http://www.w3.or
0x0150   672f 3230 3031 2f58 4d4c 5363 6865 6d61        g/2001/XMLSchema
0x0160   2220 786d 6c6e 733a 7873 693d 2268 7474        ".xmlns:xsi="htt
0x0170   703a 2f2f 7777 772e 7733 2e6f 7267 2f32        p://www.w3.org/2
0x0180   3030 312f 584d 4c53 6368 656d 612d 696e        001/XMLSchema-in
0x0190   7374 616e 6365 223e 0a20 3c73 6f61 7065        stance">..<soape
0x01a0   6e76 3a42 6f64 793e 0a20 203c 6765 7456        nv:Body>...<getV
0x01b0   6572 7369 6f6e 5265 7475 726e 2078 6d6c        ersionReturn.xml
0x01c0   6e73 3d22 223e 4170 6163 6865 2041 7869        ns="">Apache.Axi
0x01d0   7320 7665 7273 696f 6e3a 2031 2e32 616c        s.version:.1.2al
0x01e0   7068 610a 4275 696c 7420 6f6e 2044 6563        pha.Built.on.Dec
0x01f0   2030 312c 2032 3030 3320 2830 343a 3333        .01,.2003.(04:33
0x0200   3a32 3420 4553 5429 3c2f 6765 7456 6572        :24.EST)</getVer
0x0210   7369 6f6e 5265 7475 726e 3e0a 203c 2f73        sionReturn>..</s
0x0220   6f61 7065 6e76 3a42 6f64 793e 0a3c 2f73        oapenv:Body>.</s
0x0230   6f61 7065 6e76 3a45 6e76 656c 6f70 653e        oapenv:Envelope>

Note the '<getVersionReturn xmlns="">' portion of that data; the namespace is
being set to "" instead of the expected Java-package-style
"http://axis.apache.org" that was set in the WSDD. InfoPath issues an error
message when this happens that reads like this:

Element 'getVersionReturn' is unexpected according to content model of parent
element {blahblahblah-something-auto-generated-by-InfoPath}
Expecting: {http://axis.apache.org}getVersionReturn.

Looks like it's complaining about the missing namespace. This prevents the SOAP
call from working at all.

This behavior is identical in releases 1.1 and 1.2alpha. Haven't tried building
a more recent CVS drop yet.