Can we see the code used by the trailer.dll
http://tims.moveyourselftrailer.com.au:8000/scripts/trailer.dll/soap/ITrailer
It is possible that your Date fields would be declared as Date instead of Calendar
Also we would need to check the Hire.dll
http://tims.moveyourselftrailer.com.au:8000/scripts/Hire.dll/soap/IHire
Regards,
Martin Gainty
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relating to the official business of Laconia Data Systems (LDS) is proprietary to the company. It is confidential, legally privileged and protected by law. LDS does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of LDS.
The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way.
LDS can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference.
_____________GMT-5___________________
>From: [EMAIL PROTECTED]
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: SOAP RPC problems with complex types
>Date: Wed, 18 Sep 2002 16:14:50 +1000
>MIME-Version: 1.0
>Received: from apache.org ([63.251.56.142]) by mc4-f16.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 18 Sep 2002 03:23:49 -0700
>Received: (qmail 65268 invoked by uid 500); 18 Sep 2002 06:14:45 -0000
>Received: (qmail 65259 invoked from network); 18 Sep 2002 06:14:44 -0000
>Received: from mail.touchcorp.com (HELO tequila.touchcorp.com) (203.134.48.105) by daedalus.apache.org with SMTP; 18 Sep 2002 06:14:44 -0000
>Received: from no.name.available by tequila.touchcorp.com via smtpd (for daedalus.apache.org [63.251.56.142]) with SMTP; 18 Sep 2002 06:14:55 UT
>Received: from localhost (root@localhost)by bourbon.touchcorp.com (8.11.0/8.11.0) with ESMTP id g8I6EoU31605for <[EMAIL PROTECTED]>; Wed, 18 Sep 2002 16:14:51 +1000
>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>Precedence: bulk
>list-help:
>list-unsubscribe:
>list-post:
>Delivered-To: mailing list [EMAIL PROTECTED]
>X-OpenMail-Hops: 1
>Message-Id:
>X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
>Return-Path: [EMAIL PROTECTED]
>X-OriginalArrivalTime: 18 Sep 2002 10:23:50.0671 (UTC) FILETIME=[7B36A1F0:01C25EFD]
>
>Hi Folks,
>
>The long and short of it is that I'm having a terrible time trying to
>use either Apache SOAP or Axis with complex types.
>
>The following is a complete (short) program that works with one WSDL and
>not another for two services on the same server. I'm using the Axis
>tool WSDL2Java to generate all the classes I need for the complex data
>types, and they look fine as far as I can tell.
>
>The commented-out case works fine, the currently uncommented one throws
>this exception:
>
>Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
>msg=Unable to set 'StartTime' property: argument type
>mismatch.; targetException=java.lang.IllegalArgumentException: Unable to
>set 'StartTime' property: argument type mismatch.]
> at org.apache.soap.rpc.Call.invoke(Call.java:294)
> at com.touchcorp.net.soap.SoapTest.main(SoapTest.java:66)
>
>I downloaded the source code and added some debug statements only to
>find that for some unknown (to me) reason, the SOAP code is trying to
>set the java.util.Calendar StartTime property to a java.util.Date.
>
>Why? It's specified in my code as a Calendar, and in the WSDL as an
>"xs:dateTime" which is meant to map to a Calendar, isn't it?
>
>I have attached the relevant WSDL2Java-generated classes for the complex
>return type in case that's the problem. Please help! I'm starting to
>give up all hope of this working.
>
>Regards,
>
>Neil Brennan
>
>
>=============
>SoapTest.java
>=============
>
>// package
>package com.touchcorp.net.soap;
>
>// java imports
>import java.io.*;
>import java.net.*;
>import java.util.*;
>
>// other imports
>import org.apache.soap.*;
>import org.apache.soap.encoding.*;
>import org.apache.soap.encoding.soapenc.*;
>import org.apache.soap.rpc.*;
>import org.apache.soap.util.xml.*;
>
>public class SoapTest
>{
> public static void main(String[] args) throws Exception
> {
>/*
> // itrailer setup
> URL url = new
>URL("http://tims.moveyourselftrailer.com.au:8000/scripts/trailer.dll/soa
>p/ITrailer");
> String uri = "urn:uTrailerTypeInfo";
> String method = "getTrailerTypesOnSite";
> Class type = com.touchcorp.soap.itrailer.TTrailerTypeInfo.class;
> Vector parameters = new Vector();
> parameters.addElement(new Parameter("Depot", String.class,
>"TWEED", null));
>*/
>
> // ihire setup
> URL url = new
>URL("http://tims.moveyourselftrailer.com.au:8000/scripts/Hire.dll/soap/I
>Hire");
> String uri = "urn:uHireInfo";
> String method = "getHireFromCustomerLicence";
> Class type = com.touchcorp.soap.ihire.THireInfo.class;
> Vector parameters = new Vector();
> parameters.addElement(new Parameter("LicenceNumber", String.class,
>"2345678", null));
> parameters.addElement(new Parameter("LicenceState", String.class,
>"VIC", null));
> parameters.addElement(new Parameter("Depot", String.class,
>"TWEED", null));
>
> // get short version of type class name
> String typeName = type.getName();
> int index = typeName.lastIndexOf(".");
> if (index > 0)
> typeName = typeName.substring(index+1);
>
> // set up bean mappings
> SOAPMappingRegistry registry = new SOAPMappingRegistry();
> BeanSerializer serializer = new BeanSerializer();
> registry.mapTypes(Constants.NS_URI_SOAP_ENC, new QName(uri,
>typeName), type, serializer, serializer);
>
> // build the call
> Call call = new Call();
> call.setSOAPMappingRegistry(registry);
> call.setTargetObjectURI(uri);
> call.setMethodName(method);
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> call.setParams(parameters);
>
> // make the call
> Response response = call.invoke(url, "");
>
> // deal with response
> if (response.generatedFault())
> {
> Fault fault = response.getFault();
> throw new SOAPException(fault.getFaultCode(),
>fault.getFaultString());
> }
>
> // done
> Object result = response.getReturnValue().getValue();
> System.out.println("result: " + (new
>com.touchcorp.util.xml.XMLOutputter()).toString(result));
> }
>}
>
>
>=============
>THireInfo.java
>=============
>
>/**
> * THireInfo.java
> *
> * This file was auto-generated from WSDL
> * by the Apache Axis WSDL2Java emitter.
> */
>
>package com.touchcorp.soap.ihire;
>
>public class THireInfo implements java.io.Serializable {
> private int number;
> private java.lang.String sourceDepot;
> private java.lang.String destinationDepot;
> private java.util.Calendar startTime;
> private java.util.Calendar finishTime;
> private int timeLength;
> private java.lang.String trailerTypeCode;
> private java.lang.String trailerCode;
> private boolean applySackTruck;
> private java.lang.String sackTruckCode;
> private boolean applyContentsInsurance;
> private boolean leavingMetro;
> private boolean returned;
> private java.util.Calendar returnedTime;
> private int customerNumber;
> private double totalPrice;
> private com.touchcorp.soap.ihire.THireItemInfo[] hireItems;
>
> public THireInfo() {
> }
>
> public int getNumber() {
> return number;
> }
>
> public void setNumber(int number) {
> this.number = number;
> }
>
> public java.lang.String getSourceDepot() {
> return sourceDepot;
> }
>
> public void setSourceDepot(java.lang.String sourceDepot) {
> this.sourceDepot = sourceDepot;
> }
>
> public java.lang.String getDestinationDepot() {
> return destinationDepot;
> }
>
> public void setDestinationDepot(java.lang.String destinationDepot) {
> this.destinationDepot = destinationDepot;
> }
>
> public java.util.Calendar getStartTime() {
> return startTime;
> }
>
> public void setStartTime(java.util.Calendar startTime) {
> this.startTime = startTime;
> }
>
> public java.util.Calendar getFinishTime() {
> return finishTime;
> }
>
> public void setFinishTime(java.util.Calendar finishTime) {
> this.finishTime = finishTime;
> }
>
> public int getTimeLength() {
> return timeLength;
> }
>
> public void setTimeLength(int timeLength) {
> this.timeLength = timeLength;
> }
>
> public java.lang.String getTrailerTypeCode() {
> return trailerTypeCode;
> }
>
> public void setTrailerTypeCode(java.lang.String trailerTypeCode) {
> this.trailerTypeCode = trailerTypeCode;
> }
>
> public java.lang.String getTrailerCode() {
> return trailerCode;
> }
>
> public void setTrailerCode(java.lang.String trailerCode) {
> this.trailerCode = trailerCode;
> }
>
> public boolean isApplySackTruck() {
> return applySackTruck;
> }
>
> public void setApplySackTruck(boolean applySackTruck) {
> this.applySackTruck = applySackTruck;
> }
>
> public java.lang.String getSackTruckCode() {
> return sackTruckCode;
> }
>
> public void setSackTruckCode(java.lang.String sackTruckCode) {
> this.sackTruckCode = sackTruckCode;
> }
>
> public boolean isApplyContentsInsurance() {
> return applyContentsInsurance;
> }
>
> public void setApplyContentsInsurance(boolean
>applyContentsInsurance) {
> this.applyContentsInsurance = applyContentsInsurance;
> }
>
> public boolean isLeavingMetro() {
> return leavingMetro;
> }
>
> public void setLeavingMetro(boolean leavingMetro) {
> this.leavingMetro = leavingMetro;
> }
>
> public boolean isReturned() {
> return returned;
> }
>
> public void setReturned(boolean returned) {
> this.returned = returned;
> }
>
> public java.util.Calendar getReturnedTime() {
> return returnedTime;
> }
>
> public void setReturnedTime(java.util.Calendar returnedTime) {
> this.returnedTime = returnedTime;
> }
>
> public int getCustomerNumber() {
> return customerNumber;
> }
>
> public void setCustomerNumber(int customerNumber) {
> this.customerNumber = customerNumber;
> }
>
> public double getTotalPrice() {
> return totalPrice;
> }
>
> public void setTotalPrice(double totalPrice) {
> this.totalPrice = totalPrice;
> }
>
> public com.touchcorp.soap.ihire.THireItemInfo[] getHireItems() {
> return hireItems;
> }
>
> public void setHireItems(com.touchcorp.soap.ihire.THireItemInfo[]
>hireItems) {
> this.hireItems = hireItems;
> }
>
> private java.lang.Object __equalsCalc = null;
> public synchronized boolean equals(java.lang.Object obj) {
> if (!(obj instanceof THireInfo)) return false;
> THireInfo other = (THireInfo) obj;
> if (obj == null) return false;
> if (this == obj) return true;
> if (__equalsCalc != null) {
> return (__equalsCalc == obj);
> }
> __equalsCalc = obj;
> boolean _equals;
> _equals = true &&
> number == other.getNumber() &&
> ((sourceDepot==null && other.getSourceDepot()==null) ||
> (sourceDepot!=null &&
> sourceDepot.equals(other.getSourceDepot()))) &&
> ((destinationDepot==null &&
>other.getDestinationDepot()==null) ||
> (destinationDepot!=null &&
> destinationDepot.equals(other.getDestinationDepot()))) &&
> ((startTime==null && other.getStartTime()==null) ||
> (startTime!=null &&
> startTime.equals(other.getStartTime()))) &&
> ((finishTime==null && other.getFinishTime()==null) ||
> (finishTime!=null &&
> finishTime.equals(other.getFinishTime()))) &&
> timeLength == other.getTimeLength() &&
> ((trailerTypeCode==null && other.getTrailerTypeCode()==null)
>||
> (trailerTypeCode!=null &&
> trailerTypeCode.equals(other.getTrailerTypeCode()))) &&
> ((trailerCode==null && other.getTrailerCode()==null) ||
> (trailerCode!=null &&
> trailerCode.equals(other.getTrailerCode()))) &&
> applySackTruck == other.isApplySackTruck() &&
> ((sackTruckCode==null && other.getSackTruckCode()==null) ||
> (sackTruckCode!=null &&
> sackTruckCode.equals(other.getSackTruckCode()))) &&
> applyContentsInsurance == other.isApplyContentsInsurance()
>&&
> leavingMetro == other.isLeavingMetro() &&
> returned == other.isReturned() &&
> ((returnedTime==null && other.getReturnedTime()==null) ||
> (returnedTime!=null &&
> returnedTime.equals(other.getReturnedTime()))) &&
> customerNumber == other.getCustomerNumber() &&
> totalPrice == other.getTotalPrice() &&
> ((hireItems==null && other.getHireItems()==null) ||
> (hireItems!=null &&
> java.util.Arrays.equals(hireItems,
>other.getHireItems())));
> __equalsCalc = null;
> return _equals;
> }
>
> private boolean __hashCodeCalc = false;
> public synchronized int hashCode() {
> if (__hashCodeCalc) {
> return 0;
> }
> __hashCodeCalc = true;
> int _hashCode = 1;
> _hashCode += getNumber();
> if (getSourceDepot() != null) {
> _hashCode += getSourceDepot().hashCode();
> }
> if (getDestinationDepot() != null) {
> _hashCode += getDestinationDepot().hashCode();
> }
> if (getStartTime() != null) {
> _hashCode += getStartTime().hashCode();
> }
> if (getFinishTime() != null) {
> _hashCode += getFinishTime().hashCode();
> }
> _hashCode += getTimeLength();
> if (getTrailerTypeCode() != null) {
> _hashCode += getTrailerTypeCode().hashCode();
> }
> if (getTrailerCode() != null) {
> _hashCode += getTrailerCode().hashCode();
> }
> _hashCode += new Boolean(isApplySackTruck()).hashCode();
> if (getSackTruckCode() != null) {
> _hashCode += getSackTruckCode().hashCode();
> }
> _hashCode += new Boolean(isApplyContentsInsurance()).hashCode();
> _hashCode += new Boolean(isLeavingMetro()).hashCode();
> _hashCode += new Boolean(isReturned()).hashCode();
> if (getReturnedTime() != null) {
> _hashCode += getReturnedTime().hashCode();
> }
> _hashCode += getCustomerNumber();
> _hashCode += new Double(getTotalPrice()).hashCode();
> if (getHireItems() != null) {
> for (int i=0;
> i> i++) {
> java.lang.Object obj =
>java.lang.reflect.Array.get(getHireItems(), i);
> if (obj != null &&
> !obj.getClass().isArray()) {
> _hashCode += obj.hashCode();
> }
> }
> }
> __hashCodeCalc = false;
> return _hashCode;
> }
>
> // Type metadata
> private static org.apache.axis.description.TypeDesc typeDesc =
> new org.apache.axis.description.TypeDesc(THireInfo.class);
>
> static {
> org.apache.axis.description.FieldDesc field = new
>org.apache.axis.description.ElementDesc();
> field.setFieldName("number");
> field.setXmlName(new javax.xml.namespace.QName("", "Number"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("sourceDepot");
> field.setXmlName(new javax.xml.namespace.QName("",
>"SourceDepot"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("destinationDepot");
> field.setXmlName(new javax.xml.namespace.QName("",
>"DestinationDepot"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("startTime");
> field.setXmlName(new javax.xml.namespace.QName("",
>"StartTime"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("finishTime");
> field.setXmlName(new javax.xml.namespace.QName("",
>"FinishTime"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("timeLength");
> field.setXmlName(new javax.xml.namespace.QName("",
>"TimeLength"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("trailerTypeCode");
> field.setXmlName(new javax.xml.namespace.QName("",
>"TrailerTypeCode"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("trailerCode");
> field.setXmlName(new javax.xml.namespace.QName("",
>"TrailerCode"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("applySackTruck");
> field.setXmlName(new javax.xml.namespace.QName("",
>"ApplySackTruck"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("sackTruckCode");
> field.setXmlName(new javax.xml.namespace.QName("",
>"SackTruckCode"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("applyContentsInsurance");
> field.setXmlName(new javax.xml.namespace.QName("",
>"ApplyContentsInsurance"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("leavingMetro");
> field.setXmlName(new javax.xml.namespace.QName("",
>"LeavingMetro"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("returned");
> field.setXmlName(new javax.xml.namespace.QName("", "Returned"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("returnedTime");
> field.setXmlName(new javax.xml.namespace.QName("",
>"ReturnedTime"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("customerNumber");
> field.setXmlName(new javax.xml.namespace.QName("",
>"CustomerNumber"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("totalPrice");
> field.setXmlName(new javax.xml.namespace.QName("",
>"TotalPrice"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("hireItems");
> field.setXmlName(new javax.xml.namespace.QName("",
>"HireItems"));
> typeDesc.addFieldDesc(field);
> };
>
> /**
> * 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);
> }
>
>}
>
>
>================
>THireItemInfo.java
>================
>
>/**
> * THireItemInfo.java
> *
> * This file was auto-generated from WSDL
> * by the Apache Axis WSDL2Java emitter.
> */
>
>package com.touchcorp.soap.ihire;
>
>public class THireItemInfo implements java.io.Serializable {
> private java.lang.String item;
> private java.lang.String name;
> private double price;
>
> public THireItemInfo() {
> }
>
> public java.lang.String getItem() {
> return item;
> }
>
> public void setItem(java.lang.String item) {
> this.item = item;
> }
>
> public java.lang.String getName() {
> return name;
> }
>
> public void setName(java.lang.String name) {
> this.name = name;
> }
>
> public double getPrice() {
> return price;
> }
>
> public void setPrice(double price) {
> this.price = price;
> }
>
> private java.lang.Object __equalsCalc = null;
> public synchronized boolean equals(java.lang.Object obj) {
> if (!(obj instanceof THireItemInfo)) return false;
> THireItemInfo other = (THireItemInfo) obj;
> if (obj == null) return false;
> if (this == obj) return true;
> if (__equalsCalc != null) {
> return (__equalsCalc == obj);
> }
> __equalsCalc = obj;
> boolean _equals;
> _equals = true &&
> ((item==null && other.getItem()==null) ||
> (item!=null &&
> item.equals(other.getItem()))) &&
> ((name==null && other.getName()==null) ||
> (name!=null &&
> name.equals(other.getName()))) &&
> price == other.getPrice();
> __equalsCalc = null;
> return _equals;
> }
>
> private boolean __hashCodeCalc = false;
> public synchronized int hashCode() {
> if (__hashCodeCalc) {
> return 0;
> }
> __hashCodeCalc = true;
> int _hashCode = 1;
> if (getItem() != null) {
> _hashCode += getItem().hashCode();
> }
> if (getName() != null) {
> _hashCode += getName().hashCode();
> }
> _hashCode += new Double(getPrice()).hashCode();
> __hashCodeCalc = false;
> return _hashCode;
> }
>
> // Type metadata
> private static org.apache.axis.description.TypeDesc typeDesc =
> new org.apache.axis.description.TypeDesc(THireItemInfo.class);
>
> static {
> org.apache.axis.description.FieldDesc field = new
>org.apache.axis.description.ElementDesc();
> field.setFieldName("item");
> field.setXmlName(new javax.xml.namespace.QName("", "Item"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("name");
> field.setXmlName(new javax.xml.namespace.QName("", "Name"));
> typeDesc.addFieldDesc(field);
> field = new org.apache.axis.description.ElementDesc();
> field.setFieldName("price");
> field.setXmlName(new javax.xml.namespace.QName("", "Price"));
> typeDesc.addFieldDesc(field);
> };
>
> /**
> * 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);
> }
>
>}
>
Chat with friends online, try MSN Messenger:
Click Here
--
To unsubscribe, e-mail:
For additional commands, e-mail: