axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Recep Ayaz" <recepa...@gmail.com>
Subject Re: string attribute problem
Date Thu, 20 Apr 2006 08:29:01 GMT
Hi, Robert
 However i exceed that error.
 My web service working.I can its name on the axis list page also i axis
generate wsdl file for that service.
but in test step, i am sending a soap client but web service does not answer
to me.
I can see request soap message at SOAP  Monitor but the response not
exist.nothing.

for testing i am using altova xmlspy program.I send this soap request
message

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
        <m:TCS xmlns:m="http://www.recepayaz.com/MyApp"
StringParameter2="Deneme">
            <m:StringParameter>String</m:StringParameter>
        </m:TCS>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************************
and i the result :

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Body>
        <m:TCS xmlns:m="http://www.recepayaz.com/MyApp"
StringParameter2="Deneme">
            <m:StringParameter>String</m:StringParameter>
        </m:TCS>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************************
these are my java class:

/**
 * TextClass.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.3 Oct 05, 2005 (05:23:37 EDT) WSDL2Java emitter.
 */

package uygulama2;

public class TextClass  implements java.io.Serializable {
    private java.lang.String stringParameter;

    private java.lang.String stringParameter2;  // attribute

    public TextClass() {
    }

    public TextClass(
           java.lang.String stringParameter,
           java.lang.String stringParameter2) {
           this.stringParameter = stringParameter;
           this.stringParameter2 = stringParameter2;
    }


    /**
     * Gets the stringParameter value for this TextClass.
     *
     * @return stringParameter
     */
    public java.lang.String getStringParameter() {
        return stringParameter;
    }


    /**
     * Sets the stringParameter value for this TextClass.
     *
     * @param stringParameter
     */
    public void setStringParameter(java.lang.String stringParameter) {
        this.stringParameter = stringParameter;
    }


    /**
     * Gets the stringParameter2 value for this TextClass.
     *
     * @return stringParameter2
     */
    public java.lang.String getStringParameter2() {
        return stringParameter2;
    }


    /**
     * Sets the stringParameter2 value for this TextClass.
     *
     * @param stringParameter2
     */
    public void setStringParameter2(java.lang.String stringParameter2) {
        this.stringParameter2 = stringParameter2;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof TextClass)) return false;
        TextClass other = (TextClass) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            ((this.stringParameter==null && other.getStringParameter()==null)
||
             (this.stringParameter!=null &&
              this.stringParameter.equals(other.getStringParameter()))) &&
            ((this.stringParameter2==null && other.getStringParameter2()==null)
||
             (this.stringParameter2!=null &&
              this.stringParameter2.equals(other.getStringParameter2())));
        __equalsCalc = null;
        return _equals;
    }

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

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("",
">TextClass"));
        org.apache.axis.description.AttributeDesc attrField = new
org.apache.axis.description.AttributeDesc();
        attrField.setFieldName("stringParameter2");
        attrField.setXmlName(new javax.xml.namespace.QName("",
"StringParameter2"));
        attrField.setXmlType(new javax.xml.namespace.QName("
http://www.w3.org/2001/XMLSchema", "string"));
        typeDesc.addFieldDesc(attrField);
        org.apache.axis.description.ElementDesc elemField = new
org.apache.axis.description.ElementDesc();
        elemField.setFieldName("stringParameter");
        elemField.setXmlName(new javax.xml.namespace.QName("",
"StringParameter"));
        elemField.setXmlType(new javax.xml.namespace.QName("
http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        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);
    }

}
------------------------------------
package uygulama2;

public class UY2Class  {
  public UY2Class() {
  }

  public String uygulama2Method (TextClass TCS){
    String ss = TCS.getStringParameter()+"  "+TCS.getStringParameter2();
    System.out.println(ss);
    return ss;
  }
}
************************************************************************************
this is my wsdd file:

<deployment xmlns="http://xml.apache.org/axis/wsdd/"
  xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:Deneme="
http://www.recepayaz.com/MyApp">
    <service name="MyApp" provider="java:RPC" style="document"
use="literal">
        <namespace>http://www.recepayaz.com/MyApp</namespace>
        <parameter name="className" value="uygulama2.UY2Class"/>
        <parameter name="allowedMethods" value="*"/>
     <requestFlow>
     <handler type="soapmonitor"/>
     </requestFlow>
     <responseFlow>
       <handler type="soapmonitor"/>
    </responseFlow>
    </service>
    <beanMapping qname="MyApp:TextClass" languageSpecificType="java:
uygulama2.TextClass"/>
</deployment>

************************************************************************************
also this is my web service wsdl file ( axis generate )

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.recepayaz.com/MyApp"
xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="
http://www.recepayaz.com/MyApp" xmlns:intf="http://www.recepayaz.com/MyApp"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
 <wsdl:types>
  <schema elementFormDefault="qualified" targetNamespace="
http://www.recepayaz.com/MyApp" xmlns="http://www.w3.org/2001/XMLSchema">
   <complexType name="TextClass">
    <sequence>
     <element name="StringParameter" nillable="true" type="xsd:string"/>
    </sequence>
    <attribute name="StringParameter2" type="xsd:string"/>
   </complexType>
   <element name="TCS" type="impl:TextClass"/>
   <element name="uygulama2MethodReturn" type="xsd:string"/>
  </schema>
 </wsdl:types>

   <wsdl:message name="uygulama2MethodResponse">

      <wsdl:part element="impl:uygulama2MethodReturn"
name="uygulama2MethodReturn"/>

   </wsdl:message>

   <wsdl:message name="uygulama2MethodRequest">

      <wsdl:part element="impl:TCS" name="TCS"/>

   </wsdl:message>

   <wsdl:portType name="UY2Class">

      <wsdl:operation name="uygulama2Method" parameterOrder="TCS">

         <wsdl:input message="impl:uygulama2MethodRequest"
name="uygulama2MethodRequest"/>

         <wsdl:output message="impl:uygulama2MethodResponse"
name="uygulama2MethodResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="MyAppSoapBinding" type="impl:UY2Class">

      <wsdlsoap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="uygulama2Method">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="uygulama2MethodRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="uygulama2MethodResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="UY2ClassService">

      <wsdl:port binding="impl:MyAppSoapBinding" name="MyApp">

         <wsdlsoap:address location="
http://localhost:8080/axis/services/MyApp"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>
*********************************************************************

Please help me i am really stuck.

Thanks for interesting.
Have nice day

Recep Ayaz

Mime
View raw message