Axis response has no namespace prefix

Discussions

XML & Web services: Axis response has no namespace prefix

  1. Axis response has no namespace prefix (2 messages)

    Hello Java gurus !

    I'm facing the following issue: I would like to change the default namespace of the SOAP responses that axis generates.

    To explain a little bit, I currently have that:
    ------------------------------------------------

    <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>
      <SearchResponse xmlns="http://www.mynamespace.com/abc">
       <session-id>ybedb076715b80f62b1ff0bd9a058e774</session-id>
       <flight-results>
    .....


    And I want that instead:
    ------------------------
    <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>
      <SearchResponse xmlns:ns1="http://www.mynamespace.com/abc">
       <ns1:session-id>ybedb076715b80f62b1ff0bd9a058e774</ns1:session-id>
       <ns1:flight-results>
    .....


    Here is the server-deploy.wsdd I use:
    -------------------------------------

    <?xml version="1.0" encoding="UTF-8"?>
    <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
     <globalConfiguration>
      <parameter name="sendMultiRefs" value="true"/>
      <parameter name="disablePrettyXML" value="true"/>
      <parameter name="adminPassword" value="admin"/>
      <parameter name="attachments.Directory" value="C:\Java\Tomcat 4.1\webapps\axis\WEB-INF\attachments"/>
      <parameter name="dotNetSoapEncFix" value="true"/>
      <parameter name="enableNamespacePrefixOptimization" value="false"/>
      <parameter name="sendXMLDeclaration" value="true"/>
      <parameter name="sendXsiTypes" value="true"/>
      <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
     </globalConfiguration>
     <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
     <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
     <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
     <service name="AdminService" provider="java:MSG">
      <parameter name="allowedMethods" value="AdminService"/>
      <parameter name="enableRemoteAdmin" value="false"/>
      <parameter name="className" value="org.apache.axis.utils.Admin"/>
      <namespace>http://xml.apache.org/axis/wsdd/>
     </service>
     <service name="eTravelWSPort" provider="java:RPC" style="document" use="literal" xmlns:ns="http://www.mynamesapace.com/blabla">
      <namespace>http://xml.apache.org/axis/wsdd/>
      <operation name="searchOperation" qname="SearchOperation" returnQName="ns:SearchResponse" returnType="ns:SearchResponseType" soapAction="">
       <parameter qname="ns:SearchRequest" type="ns:SearchRequestType"/>
       <fault class="com.blabla.lcc.generated.ErrorType" qname="ns:Error" type="ns:ErrorType"/>
      </operation>
      <operation name="bookOperation" qname="BookOperation" returnQName="ns:BookingResponse" returnType="ns:BookingResponseType" soapAction="">
       <parameter qname="ns:BookingRequest" type="ns:BookingRequestType"/>
       <fault class="com.blabla.lcc.generated.ErrorType" qname="ns:Error" type="ns:ErrorType"/>
      </operation>
      <parameter name="allowedMethods" value="bookOperation searchOperation"/>
      <parameter name="wsdlPortType" value="eTravelPort"/>
      <parameter name="className" value="com.blabla.lcc.generated.ETravelMsgBindingImpl"/>
      <parameter name="wsdlServicePort" value="eTravelWSPort"/>
      <parameter name="wsdlTargetNamespace" value="http://www.mynamespace.com/abc"/>
      <parameter name="wsdlServiceElement" value="eTravelWS"/>
      <typeMapping ...........
     </service>
     <transport name="http">
      <requestFlow>
       <handler type="URLMapper"/>
       <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
      </requestFlow>
      <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
      <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
      <parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
      <parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
      <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
      <parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
     </transport>
     <transport name="local">
      <responseFlow>
       <handler type="LocalResponder"/>
      </responseFlow>
     </transport>
    </deployment>

    I've already tried to change the wsdlTargetNamespace element but without success...

    Does anybody already faced this problem and would have any clues ?

    Thanks
    Julien
  2. I am very interested on this topic as I have the same problem. I got a vague hint from a colleague that that problem could be in JBoss. He mentioned that they found the same problem (i.e. enableNamespacePrefixOptimization flag being ignored) before and the problem was not in Axis but in Tomcat.
  3. AXIS NO namespace prefix in SOAP RESPONSE[ Go to top ]

    AXIS NO namespace prefix in SOAP RESPONSE I have the following wsdl below which I can deploy on apache tomcat using axis 1.3 The SOAP responses have no prefix!?!? I receive the fololwing response. <!--?xml version="1.0" encoding="UTF-8"?--> ****************************************** But I would like the following prefixes in the response (see below) - can anyone help please? This is very important to me and would be very grateful for any assistance. regards Graeme - graeme_kitchen at yahoo dot com <!--?xml version="1.0" encoding="utf-8"?--> ********************************** WSDL <!--?xml version="1.0" encoding="utf-8"?--> <!-- <xsd:import namespace="r" schemaLocation="http://www.w3.org/1999/02/22-rdf-syntax-ns#"></xsd:import>--> Returns an antelect XML/RDF document with a list of all available Models Performs authentication on a specified antelect Model. Returns the business (type) schema of the current antelect model. For a list of objects whose ids match <b>objid</b> and/or whose attributes/properties match <b>sourcefilter</b>, return these objects and optionally related objects based on <b>horizon</b> and <b>targetfilter</b>. Output defaults to the list of objects but additional required output can be defined by <b>outputfilter</b>.