Chris, Take a look here. You might find the reason...(http://cvs.apache.org/viewcvs.cgi/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaStubWriter.java)
Thanks, dims --- "Peake, Chris" <[EMAIL PROTECTED]> wrote: > I've done a little more research and I see where the problem is 'starting'. > > In the generated code, in the generate *Stub.java source file. > The 'method' call uses the 'type' name for the parameter name to the method and then >the QName > gets generated with same name. > // as in below, 'Pattern' is the name used for the > public localhost.ValueStressTypes.ValueNeugentConsultResult > consult(localhost.ValueStressTypes.Pattern[] pattern) throws >java.rmi.RemoteException { > apache.axis.client.Call _call = createCall(); > > // I change to 'consultData' for the QName and now data is correct on wire > > // Soap envelope appears as I expect it to. > _call.addParameter(new javax.xml.namespace.QName("urn:ValueStressTypes.localhost", > "consultData"), new javax.xml.namespace.QName("urn:ValueStressTypes.localhost", >"Pattern"), > localhost.ValueStressTypes.Pattern[].class, javax.xml.rpc.ParameterMode.IN); > > // this is the default generated one. It uses the 'type' name for the parm QName. > //generated one _call.addParameter(new > javax.xml.namespace.QName("urn:ValueStressTypes.localhost", "Pattern"), new > javax.xml.namespace.QName("urn:ValueStressTypes.localhost", "Pattern"), > localhost.ValueStressTypes.Pattern[].class, javax.xml.rpc.ParameterMode.IN) > > This has changed in not too distant past. > I'm not sure exactly when though. > . > . > fyi, > > chris > > > > -----Original Message----- > From: Peake, Chris > Sent: Monday, October 28, 2002 11:02 AM > To: [EMAIL PROTECTED] > Subject: WSDL2Java sending incorrect data. > > > > // posted this to user group with no response. > // time is short for us to release is reason posting directly to you guys. > > Now using RC1 Axis. > Below describes the problem. > This has changed post beta2. > .NET still works (which is usually not the case) > // we generate the WSDL ourselves > > // this is the WSDL (or a portion of it) > // Notice that the 'sequence' element name is 'consultData' and the TYPE is >'Pattern'. > // The generated Java code 'used' to produce an element for the 'consult' method >whose parameter > WAS <consultData> > // .NET is 'still' doing this as well. > // Which used to work for generated Axis Java clients > // and still works for .NET clients. > // But now, Axis generated Java clients are producing soap messages using the 'type' > (i.e. > Pattern) for the element name instead of 'consultData' > > // like it should be doing. > // why was this changed? > // do you consider this correct? > //examples follow > > // WSDL - no changes in this. > <?xml version="1.0" encoding="UTF-8" ?> > - <definitions name="ValueStress" targetNamespace=" >http://localhost:8080/WSB/soap/ValueStress" > xmlns=" http://schemas.xmlsoap.org/wsdl/" xmlns:intf=" > http://localhost:8080/WSB/soap/ValueStress" xmlns:soap=" >http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:types="urn:ValueStressTypes.localhost" xmlns:xsd=" >http://www.w3.org/2001/XMLSchema"> > > - <types> > - <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" > targetNamespace="urn:ValueStressTypes.localhost"> > > - <xsd:element name="consult"> > - <xsd:complexType> > - <xsd:sequence> > <xsd:element maxOccurs="unbounded" minOccurs="1" name="consultData" >type="types:Pattern" /> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > - <xsd:complexType name="Pattern"> > - <xsd:sequence> > <xsd:element maxOccurs="1" minOccurs="0" name="myOID" type="xsd:string" /> > <xsd:element maxOccurs="unbounded" minOccurs="1" name="fields" >type="types:PatternField" /> > </xsd:sequence> > </xsd:complexType> > - <xsd:complexType name="PatternField"> > - <xsd:sequence> > > // from RC1 we 'NOW' get the following. Notice the element name is NOW 'Pattern' >which is the > TYPE itself. > // this is SOAP message sent from generated code from beta 2. > // notice the the method name is <consult> element. This is good. > // Also, notice the 'data' element is <consultData>. This is good to. > // this was the 'name' attribute on the WSDL for this element. > // But this changed in later Axis code. > > t message form to: FORM_SOAPENVELOPE (currentMessage is now <SOAP-ENV:Envelope x > mlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=" http://www. > w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> > <SOAP-ENV:Body> > <consult xmlns=" http://localhost:8080/WSB/soap/ValueStress"> > <ns1:consultData xmlns:ns1="urn:ValueStressTypes.localhost"> > <ns1:fields> > <ns1:value> > <ns1:doubleValue xsi:nil="true"/> > <ns1:stringValue> > <ns1:value>record1</ns1:value> > > > // below is the NEW soap messag being sent by the Axis generated java clients > // notice the element name is now <Pattern> instead of <consultData> even though the >WSDL > definition is the same. > // this is causing our failure. > > 343313 [HttpProcessor[8080][5]] DEBUG org.apache.axis.SOAPPart - > setCurrentForm(<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> > <consult xmlns="urn:ValueStressTypes.localhost"> > <Pattern> > <fields> > <label>label</label> > <value> > <stringValue> > <value>record1</value> > </stringValue> > </value> > </fields> > > Thanks, > chris > > > ===== Davanum Srinivas - http://xml.apache.org/~dims/ __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/