Hello,

After installing the now-final JBoss 3.2.2 with embedded Tomcat and redeploying Axis, I'm appearing to get cleaner error messages.

For now, I have a strange situation where the SOAP that is going on the wire is improperly formatted. It's not specifying the operation to call, only the parameters.

From SOAPMonitor, it looks like this:
<soapenv:Envelope....>
   <soapenv:Body>
      <x_GetOutstandingOrders xmlns="urn:LibraryDemo\srvcGeneral\srvcdoc">
         <PrderIdentification>0</PrderIdentification>
      </x_GetOutstandingOrders>
   </soapenc:Body>
</soapenv:Envelope>

I've attached the WSDL for the service, and I'm using the Axis-generated stubs from the WSDL. My test client is calling

ElectronicMarketStub marketStub = new ElectronicMarketStub(new URL(endpoint), null);
CollectionOfOrder coll = marketStub.getOutstandingOrders(new GetOutstandingOrders());


I believe that from the WSDL this should add an extra element in the SOAP Body that specifies the operation as <GetOutstandingOrders>, with the x_GetOutstandingOrders as a parameter.

I've debugged the call, and the MessageContext has the operationName set as "GetOutstandingOrders" all throughout, until it gets to the HTTPSender portion:
if (posting) {
header.append(HTTPConstants.HEADER_CONTENT_TYPE)
.append(": ")
.append(reqMessage.getContentType(msgContext.getSOAPConstants()))
.append("\r\n");
}


which then sets it to the SOAP you see above.

Can anyone please help with why the SOAP on the wire would look like it does above rather than how it should?

I've also attached the generated source for the relevant operation. Please ignore that there are \s in it, I've replaced these all with \\s.

Thanks for your time!

<?xml version="1.0" encoding="utf-8" ?>
<definitions targetNamespace="urn:LibraryDemo\srvcGeneral\srvcdoc" xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:ns="urn:LibraryDemo\srvcGeneral\srvcdoc">
	<types>
		<schema targetNamespace="urn:LibraryDemo\srvcGeneral\srvcdoc" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema"; xmlns:ns="urn:LibraryDemo\srvcGeneral\srvcdoc" xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
			<complexType name="CollectionOfOrder">
				<sequence>
					<element name="Order" minOccurs="0" maxOccurs="unbounded" type="ns:Order"/>
				</sequence>
			</complexType>
			<complexType name="Market">
				<sequence>
					<element name="settings" minOccurs="1" maxOccurs="1" type="ns:TradingSettings"/>
					<element name="segments" minOccurs="1" maxOccurs="1" type="ns:CollectionOfSegment"/>
				</sequence>
			</complexType>
			<complexType name="CollectionOfSegment">
				<sequence>
					<element name="Segment" minOccurs="0" maxOccurs="unbounded" type="ns:Segment"/>
				</sequence>
			</complexType>
			<complexType name="TradingSettings">
				<sequence>
					<element name="stateCycleSpec" minOccurs="0" maxOccurs="1" type="xsd:string"/>
					<element name="stopTradingRange" minOccurs="0" maxOccurs="1" type="xsd:double"/>
					<element name="priceIncrement" minOccurs="1" maxOccurs="1" type="xsd:double"/>
				</sequence>
			</complexType>
			<complexType name="Segment">
				<sequence>
					<element name="name" minOccurs="1" maxOccurs="1" type="xsd:string"/>
					<element name="settings" minOccurs="1" maxOccurs="1" type="ns:TradingSettings"/>
					<element name="securities" minOccurs="1" maxOccurs="1" type="ns:CollectionOfSecurity"/>
					<element name="market" minOccurs="1" maxOccurs="1" type="ns:Market"/>
				</sequence>
			</complexType>
			<complexType name="CollectionOfSecurity">
				<sequence>
					<element name="Security" minOccurs="0" maxOccurs="unbounded" type="ns:Security"/>
				</sequence>
			</complexType>
			<complexType name="Security">
				<sequence>
					<element name="name" minOccurs="1" maxOccurs="1" type="xsd:string"/>
					<element name="settings" minOccurs="1" maxOccurs="1" type="ns:TradingSettings"/>
					<element name="segment" minOccurs="1" maxOccurs="1" type="ns:Segment"/>
				</sequence>
			</complexType>
			<complexType name="OrderStatus">
				<sequence>
					<element name="matchingShares" minOccurs="1" maxOccurs="1" type="xsd:int"/>
					<element name="order" minOccurs="1" maxOccurs="1" type="ns:Order"/>
					<element name="matchingPrice" minOccurs="1" maxOccurs="1" type="xsd:double"/>
					<element name="identification" minOccurs="1" maxOccurs="1" type="xsd:string"/>
					<element name="matchingParty" minOccurs="1" maxOccurs="1" type="ns:Party"/>
					<element name="status" minOccurs="1" maxOccurs="1" type="xsd:string"/>
				</sequence>
			</complexType>
			<complexType name="Order">
				<sequence>
					<element name="numberOfShares" minOccurs="1" maxOccurs="1" type="xsd:int"/>
					<element name="nominalPrice" minOccurs="0" maxOccurs="1" type="xsd:double"/>
					<element name="party" minOccurs="1" maxOccurs="1" type="ns:Party"/>
					<element name="instrument" minOccurs="1" maxOccurs="1" type="xsd:string"/>
				</sequence>
			</complexType>
			<complexType name="Party">
				<sequence>
					<element name="name" minOccurs="1" maxOccurs="1" type="xsd:string"/>
					<element name="identification" minOccurs="1" maxOccurs="1" type="xsd:string"/>
				</sequence>
			</complexType>
			<element name="x_GetOutstandingOrders" type="ns:GetOutstandingOrders"/>
			<complexType name="GetOutstandingOrders">
				<sequence>
					<element name="PrderIdentification" minOccurs="1" maxOccurs="1" type="xsd:int"/>
				</sequence>
			</complexType>
			<element name="x_GetOutstandingOrdersResponse" type="ns:CollectionOfOrder"/>
			<element name="x_CreateMarket" type="ns:CreateMarket"/>
			<complexType name="CreateMarket">
				<sequence>
					<element name="Market" minOccurs="1" maxOccurs="1" type="ns:Market"/>
				</sequence>
			</complexType>
			<element name="x_CreateMarketResponse" type="xsd:boolean"/>
			<element name="x_GetOrderStatus" type="ns:GetOrderStatus"/>
			<complexType name="GetOrderStatus">
				<sequence>
					<element name="OrderIdentification" minOccurs="1" maxOccurs="1" type="xsd:int"/>
				</sequence>
			</complexType>
			<element name="x_GetOrderStatusResponse" type="ns:OrderStatus"/>
			<element name="x_AddSellOrder" type="ns:AddSellOrder"/>
			<complexType name="AddSellOrder">
				<sequence>
					<element name="Order" minOccurs="1" maxOccurs="1" type="ns:Order"/>
				</sequence>
			</complexType>
			<element name="x_AddSellOrderResponse" type="ns:OrderStatus"/>
			<element name="x_AddBuyOrder" type="ns:AddBuyOrder"/>
			<complexType name="AddBuyOrder">
				<sequence>
					<element name="Order" minOccurs="1" maxOccurs="1" type="ns:Order"/>
				</sequence>
			</complexType>
			<element name="x_AddBuyOrderResponse" type="ns:OrderStatus"/>
		</schema>
	</types>
	<message name="GetOutstandingOrders">
		<part name="parameter" element="ns:x_GetOutstandingOrders"/>
	</message>
	<message name="GetOutstandingOrdersResponse">
		<part name="return" element="ns:x_GetOutstandingOrdersResponse"/>
	</message>
	<message name="CreateMarket">
		<part name="parameter" element="ns:x_CreateMarket"/>
	</message>
	<message name="CreateMarketResponse">
		<part name="return" element="ns:x_CreateMarketResponse"/>
	</message>
	<message name="GetOrderStatus">
		<part name="parameter" element="ns:x_GetOrderStatus"/>
	</message>
	<message name="GetOrderStatusResponse">
		<part name="return" element="ns:x_GetOrderStatusResponse"/>
	</message>
	<message name="AddSellOrder">
		<part name="parameter" element="ns:x_AddSellOrder"/>
	</message>
	<message name="AddSellOrderResponse">
		<part name="return" element="ns:x_AddSellOrderResponse"/>
	</message>
	<message name="AddBuyOrder">
		<part name="parameter" element="ns:x_AddBuyOrder"/>
	</message>
	<message name="AddBuyOrderResponse">
		<part name="return" element="ns:x_AddBuyOrderResponse"/>
	</message>
	<portType name="ElectronicMarket">
		<operation name="GetOutstandingOrders">
			<documentation>It returns all the orders placed by a party that didn't match any other.</documentation>
			<input message="ns:GetOutstandingOrders"/>
			<output message="ns:GetOutstandingOrdersResponse"/>
		</operation>
		<operation name="CreateMarket">
			<documentation>It creates a market with segments, securities and parties</documentation>
			<input message="ns:CreateMarket"/>
			<output message="ns:CreateMarketResponse"/>
		</operation>
		<operation name="GetOrderStatus">
			<documentation>It returns the status of an order posted before</documentation>
			<input message="ns:GetOrderStatus"/>
			<output message="ns:GetOrderStatusResponse"/>
		</operation>
		<operation name="AddSellOrder">
			<documentation>It adds an order for selling the instrument spedified by anOrder</documentation>
			<input message="ns:AddSellOrder"/>
			<output message="ns:AddSellOrderResponse"/>
		</operation>
		<operation name="AddBuyOrder">
			<documentation>It adds an order for buying the instrument spedified by anOrder</documentation>
			<input message="ns:AddBuyOrder"/>
			<output message="ns:AddBuyOrderResponse"/>
		</operation>
	</portType>
	<binding name="ElectronicMarket" type="ns:ElectronicMarket">
		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<operation name="GetOutstandingOrders" selector="getOutstandingOrders:">
			<soap:operation soapAction=""/>
			<input>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</input>
			<output>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</output>
		</operation>
		<operation name="CreateMarket" selector="createMarket:">
			<soap:operation soapAction=""/>
			<input>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</input>
			<output>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</output>
		</operation>
		<operation name="GetOrderStatus" selector="getOrderStatus:">
			<soap:operation soapAction=""/>
			<input>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</input>
			<output>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</output>
		</operation>
		<operation name="AddSellOrder" selector="addSellOrder:">
			<soap:operation soapAction=""/>
			<input>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</input>
			<output>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</output>
		</operation>
		<operation name="AddBuyOrder" selector="addBuyOrder:">
			<soap:operation soapAction=""/>
			<input>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</input>
			<output>
				<soap:body use="literal" namespace="urn:LibraryDemo\srvcGeneral\srvcdoc"/>
			</output>
		</operation>
	</binding>
</definitions>
/**
 * GetOutstandingOrders.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package edu.uiuc.cs427.soap;

public class GetOutstandingOrders  implements java.io.Serializable {
    private int prderIdentification;

    public GetOutstandingOrders() {
    }

    public int getPrderIdentification() {
        return prderIdentification;
    }

    public void setPrderIdentification(int prderIdentification) {
        this.prderIdentification = prderIdentification;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof GetOutstandingOrders)) return false;
        GetOutstandingOrders other = (GetOutstandingOrders) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            this.prderIdentification == other.getPrderIdentification();
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        _hashCode += getPrderIdentification();
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(GetOutstandingOrders.class);

    static {
        typeDesc.setXmlType(new 
javax.xml.namespace.QName("urn:LibraryDemo\srvcGeneral\srvcdoc", 
"GetOutstandingOrders"));
        org.apache.axis.description.ElementDesc elemField = new 
org.apache.axis.description.ElementDesc();
        elemField.setFieldName("prderIdentification");
        elemField.setXmlName(new 
javax.xml.namespace.QName("urn:LibraryDemo\srvcGeneral\srvcdoc", 
"PrderIdentification"));
        elemField.setXmlType(new 
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema";, "int"));
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}

Reply via email to