Title: Message
Java2WSDL set the -y parameter to WRAPPED
----- Original Message -----
Sent: Tuesday, February 22, 2005 11:59 AM
Subject: RE : Is this a serious bug in string parameter passing to AXIS 1.2RC2?

I dont know for auto-generated WSDL.  We are a Java/Axis server, my client is .NET, and we have a Java2WSDL WSDL file.  We avoid the auto-generated one.
 
Christian Faucher
-----Message d'origine-----
De : Hollywood [mailto:[EMAIL PROTECTED]
Envoy� : mardi, f�vrier 22, 2005 12:54
� : [email protected]
Objet : Re: Is this a serious bug in string parameter passing to AXIS 1.2RC2?

Since I had the same issue, and it wasn't responded too, I'll piggy back this one.  I noticed this same thing, so I switched to using WRAPPED.  However, when Axis auto-generates the WSDL, it inserts bogus characters (bogus characters being >) into the element names; which causes issues with other clients, especially .NET. 
 
Why does Axis do this when it auto-generates yet does not do this when using the Java2WSDL tool?  As a refrence, see my previous post entitled "Wrapped/Literal WSDL issue".
----- Original Message -----
Sent: Tuesday, February 22, 2005 11:39 AM
Subject: RE : Is this a serious bug in string parameter passing to AXIS 1.2RC2?

Hi,
 
You WSDL defines a "document" style WS.  Documen-style WS are made to receive a bean, with all the parameters in it e.g.
 
public class MyParamsBean {
    String str1;
    String str2;
}
and
    void yourMethod(MyParamsBean params);
 
If you wish to keep the parameters separated in your method, you should use the WRAPPED style:
    void yourMethod(String str1, String str2);
 
Hope it helps!

Christian Faucher


-----Message d'origine-----
De : thomas willomitzer [mailto:[EMAIL PROTECTED]]
Envoy� : mardi, f�vrier 22, 2005 12:35
� : [email protected]
Objet : Is this a serious bug in string parameter passing to AXIS 1.2RC2?


Hello!

I'm having problems with string parameters in AXIS 1.2RC2.
I created a simple WSDL to test parameter passing and AXIS doesn't process the parameters correctly on the Server side. Only the first parameter gets set to the value in the request, the 2nd and 3rd are set to null in the service method attached below.

I traced the call with tcpmon and everything looks alright (well...as far as I can tell) I assume I'm doing something wrong as this basic behavior is probably working correctly. I am trying to get this work for two days now and don't have any more ideas how to fix that.

Please have a look at my WSDL and the TCPMon Trace.
I generated the client and server with wsdl2java -s -t file.wsdl

Thanks a lot
Thomas

------------------ START Service Method ---------------
/**
 * PortTypeBindingImpl.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.  */

package com.company.www;

public class PortTypeBindingImpl implements com.company.www.PortType{
    public void testOperation(java.lang.String arg1, java.lang.String arg2, java.lang.String arg3) throws java.rmi.RemoteException {
        System.out.println("Hello");
    }

}
------------------ END Service Method ---------------


------------------ START WSDL ----------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
    name="ParamTest"
    targetNamespace="http://www.company.com"
    xmlns:comp="http://www.company.com"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://www.company.com"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:types> </wsdl:types>
    <wsdl:message name="testOperationResponse">   </wsdl:message>
    <wsdl:message name="testOperationRequest">
        <wsdl:part name="arg1" type="xsd:string"/>
        <wsdl:part name="arg2" type="xsd:string"/>
        <wsdl:part name="arg3" type="xsd:string"/>
    </wsdl:message>
    <wsdl:portType name="PortType">
        <wsdl:operation name="testOperation">
            <wsdl:input message="tns:testOperationRequest"/>
            <wsdl:output message="tns:testOperationResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="PortTypeBinding" type="tns:PortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="testOperation">
            <soap:operation
                soapAction="capeconnect:ServicePort:PortType#testOperation"
                style="document"/>
            <wsdl:input>
                <soap:body parts="arg3 arg1 arg2" use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="ServicePort">
        <wsdl:port binding="tns:PortTypeBinding" name="ServicePort">
            <soap:address location="http://willo/axis/services/ServicePort"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>
------------------ END WSDL ----------------


------------------ START SOAP REQUEST ----------------
POST /axis/services/ServicePort HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.2RC2
Host: 127.0.0.1:8080
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "capeconnect:ServicePort:PortType#testOperation"
Content-Length: 307

<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>
      <arg1 xmlns="">value1</arg1>
      <arg2 xmlns="">value2</arg2>
      <arg3 xmlns="">value3</arg3>
   </soapenv:Body></soapenv:Envelope>
------------------ END SOAP REQUEST ----------------

------------------ START SOAP REPLY ----------------
HTTP/1.0 200 OK
Server: Resin/3.0.8
Content-Type: text/xml; charset=utf-8
Date: Tue, 22 Feb 2005 17:28:47 GMT

<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>
      <arg1Response xmlns=""/>
   </soapenv:Body></soapenv:Envelope>
------------------ END SOAP REPLY----------------



"Ce message est confidentiel, � l'usage exclusif du destinataire ci-dessus et son contenu ne repr�sente en aucun cas un engagement de la part de AXA, sauf en cas de stipulation expresse et par �crit de la part de AXA. Toute publication, utilisation ou diffusion, m�me partielle, doit �tre autoris�e pr�alablement. Si vous n'�tes pas destinataire de ce message, merci d'en avertir imm�diatement l'exp�diteur."

"This e-mail message is confidential, for the exclusive use of the addressee and its contents shall not constitute a commitment by AXA, except as otherwise specifically provided in writing by AXA. Any unauthorized disclosure, use or dissemination, either whole or partial, is prohibited. If you are not the intended recipient of the message, please notify the sender immediately."

Reply via email to