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 "Baker, Michael R (Gp98)" <Mi...@erac.com> on 2003/06/04 20:57:35 UTC

XSI type still added when PROP_SEND_XSI is false

Hi.  I am trying to get a very simple Axis client (both the client and
server are using Axis version 1.0) to work and I am having problems with the
XML that it is creating.  I have searched the mail archives on this topic,
but I can't find the answer.  I am using an object that was created by
WSDL2JAVA.  When I look at the XML that is sent, it looks like this:

<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>
  <ARMS_PingRQ xsi:type="ns1:ARMS_PingRQ"
xmlns:ns1="http://enterprise.com/newAuthorizationRequest">
   <echoStringIn>Let me know if this works</echoStringIn>
  </ARMS_PingRQ>
 </soapenv:Body>
</soapenv:Envelope>

The error that I get is a "No such operation 'ARMS_PingRQ'".  If I manually
remove the 'xsi:type="ns1:ARMS_PingRQ"' and send this request, the service
works fine.  I have used the
call.getService().getEngine().setOption(AxisEngine.PROP_SEND_XSI, new
Boolean(false)) to stop this from sending the XSI types, but for some reason
this is still being added.  Can someone possibly shed some light on why the
XSI type is being added?  I saw in a previous thread that sometimes the XSI
has to be there for the SOAP spec, but if that was case for this then I
would think that this would work and the one that works now would fail.
Thanks a lot.

Michael

p.s. 
Here is the WSDL that the server is using (and was used to generate the
objects):
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="CreateRes"
targetNamespace="http://localhost.com/newAuthorizationRequest"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://localhost.com/newAuthorizationRequest">
<types>
<xs:schema targetNamespace="http://localhost.com/newAuthorizationRequest"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified"
attributeFormDefault="unqualified">
	<xs:element name="ARMS_PingRQ">
	    <xs:complexType>
	    	<xs:sequence>
	    		<xs:element minOccurs="0" name="echoStringIn"
type="xs:string"/>
	    	 </xs:sequence>
	    </xs:complexType>
	  </xs:element>
	<xs:element name="ARMS_PingRS">
	    <xs:complexType>
	    	<xs:sequence>
	    		<xs:element minOccurs="0" name="echoStringOut"
type="xs:string"/>
	    	 </xs:sequence>
	    </xs:complexType>
	  </xs:element>
</xs:schema>
  </types>
 <message name="pingMessageInput">
     <part element="tns:ARMS_PingRQ" name="parameters" />
   </message>
   <message name="pingMessageOutput">
     <part element="tns:ARMS_PingRS" name="parameters" />
   </message>
  <portType name="ArmswebServiceType">
      <operation name="ping">
            <input message="tns:pingMessageInput" />
            <output message="tns:pingMessageOutput" />
      </operation>
  </portType>
  <binding name="ArmswebServiceBinding" type="tns:ArmswebServiceType">
    <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
	    <operation name="vehRes">
    <operation name="ping">
          <soap:operation soapAction="ping" />
          <input><soap:body use="literal" /></input>
          <output><soap:body use="literal" /></output>
    </operation>
     </binding>
  <service name="ArmswebService">
    <port binding="tns:ArmswebServiceBinding" name="ArmswebServicePort">
        <soap:address
location="http://www.localhost.com/armsweb/services/ArmswebServicePort"/>
    </port>
  </service>
</definitions>