[ http://issues.apache.org/jira/browse/AXIS-1935?page=comments#action_64165 ] Davanum Srinivas commented on AXIS-1935: ----------------------------------------
Reviewing Eric's patch at: http://marc.theaimsgroup.com/?l=axis-user&m=109646648222389&w=2 The reason is because Axis defaults to elementFormDefault=unqualified: http://www.zvon.org/xxl/XMLSchemaTutorial/Output/ser_elementFormDefault_st2.html and does not remember to check the elementFormDefault of the schema: http://www.zvon.org/xxl/XMLSchemaTutorial/Output/ser_elementFormDefault_st3.html So in the generated code for example currently looks like this: static { typeDesc.setXmlType(new javax.xml.namespace.QName("http://some.company.com/ws", "NamedValueSet")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("namedValues"); elemField.setXmlName(new javax.xml.namespace.QName("http://some.company.com/ws", "namedValues")); elemField.setXmlType(new javax.xml.namespace.QName("http://some.company.com/ws", "NamedValue")); elemField.setNillable(true); elemField.setItemQName(new javax.xml.namespace.QName("", "item")); typeDesc.addFieldDesc(elemField); } Note the elemField.setItemQName has empty "" namespace. we need to fix this. this is the source of the problem (Eric's patch fixes the symptom) thanks, dims > .NET does not like xmlns="" > --------------------------- > > Key: AXIS-1935 > URL: http://issues.apache.org/jira/browse/AXIS-1935 > Project: Axis > Type: Bug > Environment: Axis 1.2RC3 nightly > Reporter: Tim K > > Using wrapped/literal mode, .NET doesn't seem to like this: > <item xmlns=""> > <?xml version="1.0" encoding="UTF-8"?> > <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> > <login xmlns="http://some.company.com/ws"> > <username>abc</username> > <password>def</password> > <options> > <name>dummy1</name> > <value xsi:type="xsd:string">dummy_val1</value> > </options> > <options> > <name>dummy2</name> > <value xsi:type="ns1:ArrayOfNamedValue" > xmlns:ns1="http://some.company.com/ws"> > <item xmlns=""> > <ns1:name>dummy2-1</ns1:name> > <ns1:value xsi:type="xsd:string">val2-1</ns1:value> > </item> > <item xmlns=""> > <ns1:name>dummy2-2</ns1:name> > <ns1:value xsi:type="xsd:int">314</ns1:value> > </item> > </value> > </options> > </login> > </soapenv:Body> > </soapenv:Envelope> > There's a patch for it that I applied to the CVS myself, would you be > able to fix it? I don't think that xmlns="" is valid. > Here's the patch that I applied (I'm not sure where it comes from) > ---- > Modify org.apache.axis.encoding.SerializationContext.serializeActual() > method. > Existing: > // ----------------- > // NOTE: I have seen doc/lit tests that use > // the type name as the element name in multi-ref cases > // (for example <soapenc:Array ... >) > // In such cases the xsi:type is not passed along. > // ----------------- > // The multiref QName is our own fake name. > // It may be beneficial to set the name to the > // type name, but I didn't see any improvements > // in the interop tests. > //if (name.equals(multirefQName) && type != null) > // name = type; > ser.serialize(elemQName, attributes, value, this); > return; > New: > // ----------------- > // NOTE: I have seen doc/lit tests that use > // the type name as the element name in multi-ref cases > // (for example <soapenc:Array ... >) > // In such cases the xsi:type is not passed along. > // ----------------- > // The multiref QName is our own fake name. > // It may be beneficial to set the name to the > // type name, but I didn't see any improvements > // in the interop tests. > //if (name.equals(multirefQName) && type != null) > // name = type; > if (elemQName.getNamespaceURI().equals("")){ > elemQName = new > QName(this.nsStack.getNamespaceURI(""),elemQNa > me.getLocalPart()); > } > ser.serialize(elemQName, attributes, value, this); > return; > ---- > According to Dims the WSDL should be using elementFormDefault="unqualified" > but I'm not sure that makes a difference on the server, the server should no > longer send xmlns="" > If indeed the WSDL is not correct, then Java2WSDL should be fixed, that's > what I'm using to generated the WSDL from the Java server side classes. > Please see this bug for more: http://issues.apache.org/jira/browse/AXIS-1926 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
