Hi all

I'm trying to access a remote web service. I've done wsdl2java on the wsdl ile to generate the stubs

I'm now trying to call a method which takes 3 parameters (EndUserIdentifier a, EndUserIdentifier, b String c)

I'm trying to make the params a and b of type EndUserIdentifier, so i've done this

EndUserIdentifier a = "tel:+44123456789;vnd.bt.cli-presentation=available";
EndUserIdentifier b = "tel:+44123456789;vnd.bt.cli-presentation=available";

But i get the error cannot convert from string to EndUserIdentifier

Is anyone able to help me please to solve this problem

I've inc. EndUserIdentifier .java

Here's the wsdl i've used to dowsdl2java

http://uddi.bt.com/WSDL/parlayx/thirdpartycallservice/rpc-lit/parlayx_third_party_calling_service.wsdl

Here's my code

String c = 9f;

ThirdPartyCallServiceLocator locator = new ThirdPartyCallServiceLocator();
ThirdPartyCallBindingStub stub = (ThirdPartyCallBindingStub)locator.getPort(ThirdPartyCallPort.class);

stub.setUsername("username");
stub.setPassword("password");

String result = stub.makeACall(a, b, c);

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk
/**
rd
* EndUserIdentifier.java
*
* This file was auto-generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/

package org.csapi.www.schema.parlayx.common.v1_0;

public class EndUserIdentifier implements java.io.Serializable
{
   private org.apache.axis.types.URI value;

   public EndUserIdentifier()
        {
   }

   public org.apache.axis.types.URI getValue()
        {
       return value;
   }

   public void setValue(org.apache.axis.types.URI value)
        {
       this.value = value;
   }

   private java.lang.Object __equalsCalc = null;

   public synchronized boolean equals(java.lang.Object obj)
        {
       if (!(obj instanceof EndUserIdentifier)) return false;
       EndUserIdentifier other = (EndUserIdentifier) obj;
       if (obj == null) return false;
       if (this == obj) return true;
       if (__equalsCalc != null)
                {
           return (__equalsCalc == obj);
       }
       __equalsCalc = obj;
       boolean _equals;
       _equals = true &&
           ((this.value==null && other.getValue()==null) ||
            (this.value!=null &&
             this.value.equals(other.getValue())));
       __equalsCalc = null;
       return _equals;
   }

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

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

   static {
typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.csapi.org/schema/parlayx/common/v1_0";, "EndUserIdentifier")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
       elemField.setFieldName("value");
       elemField.setXmlName(new javax.xml.namespace.QName("", "value"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema";, "anyURI"));
       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