[ http://issues.apache.org/jira/browse/AXIS-1827?page=comments#action_61474 ] Konstantin Kasatkin commented on AXIS-1827: -------------------------------------------
Of cource Jongjin, I can remove it, but I think it is not right way to fix the problem. It smells slightly of shamanism. Why without declaration it doesn't cause error? And one more thing, if I remove this tag I will have a few silent exceptions in the debug log (see below). I think developers team should review this issue and provide their explanation and a means how to get it round by right way. Davanum, what are your fillings about that? ------------------------------------------ CUT OF LOG ----------------------- 7551 [main] DEBUG org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(noService 10) - Exception: org.apache.axis.ConfigurationException: No service named AuthServiceSoap is available org.apache.axis.ConfigurationException: No service named AuthServiceSoap is available at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233) at org.apache.axis.AxisEngine.getService(AxisEngine.java:311) at org.apache.axis.MessageContext.setTargetService(MessageContext.java:755) at org.apache.axis.client.Call.invoke(Call.java:2660) at org.apache.axis.client.Call.invoke(Call.java:2413) at org.apache.axis.client.Call.invoke(Call.java:2336) at org.apache.axis.client.Call.invoke(Call.java:1793) at com.estylesoft.casau.service.AuthServiceSoapStub.getParameters(Unknown Source) at com.estylesoft.casau.client.CASAgentFactory.loadCache(CASAgentFactory.java:486) at com.estylesoft.casau.client.CASAgentFactory.resetCache(CASAgentFactory.java:285) at com.estylesoft.casau.client.CASAgentFactory.initialize(CASAgentFactory.java:259) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.estylesoft.casau.client.CASAgentProxy.invoke(CASAgentProxy.java:39) at $Proxy0.initialize(Unknown Source) at Test.main(Test.java:25) at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233) at org.apache.axis.AxisEngine.getService(AxisEngine.java:311) at org.apache.axis.MessageContext.setTargetService(MessageContext.java:755) at org.apache.axis.client.Call.invoke(Call.java:2660) at org.apache.axis.client.Call.invoke(Call.java:2413) at org.apache.axis.client.Call.invoke(Call.java:2336) at org.apache.axis.client.Call.invoke(Call.java:1793) at com.estylesoft.casau.service.AuthServiceSoapStub.getParameters(Unknown Source) at com.estylesoft.casau.client.CASAgentFactory.loadCache(CASAgentFactory.java:486) at com.estylesoft.casau.client.CASAgentFactory.resetCache(CASAgentFactory.java:285) at com.estylesoft.casau.client.CASAgentFactory.initialize(CASAgentFactory.java:259) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.estylesoft.casau.client.CASAgentProxy.invoke(CASAgentProxy.java:39) at $Proxy0.initialize(Unknown Source) at Test.main(Test.java:25) 7561 [main] DEBUG org.apache.axis.i18n.ProjectResourceBundle - org.apache.axis.i18n.resource::handleGetObject(noService 10) - Exception: org.apache.axis.ConfigurationException: No service named http://tempuri.org/GetParameters is available org.apache.axis.ConfigurationException: No service named http://tempuri.org/GetParameters is available at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233) at org.apache.axis.AxisEngine.getService(AxisEngine.java:311) at org.apache.axis.MessageContext.setTargetService(MessageContext.java:755) at org.apache.axis.transport.http.HTTPTransport.setupMessageContextImpl(HTTPTransport.java:89) at org.apache.axis.client.Transport.setupMessageContext(Transport.java:46) at org.apache.axis.client.Call.invoke(Call.java:2708) at org.apache.axis.client.Call.invoke(Call.java:2413) at org.apache.axis.client.Call.invoke(Call.java:2336) at org.apache.axis.client.Call.invoke(Call.java:1793) at com.estylesoft.casau.service.AuthServiceSoapStub.getParameters(Unknown Source) at com.estylesoft.casau.client.CASAgentFactory.loadCache(CASAgentFactory.java:486) at com.estylesoft.casau.client.CASAgentFactory.resetCache(CASAgentFactory.java:285) at com.estylesoft.casau.client.CASAgentFactory.initialize(CASAgentFactory.java:259) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.estylesoft.casau.client.CASAgentProxy.invoke(CASAgentProxy.java:39) at $Proxy0.initialize(Unknown Source) at Test.main(Test.java:25) at org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233) at org.apache.axis.AxisEngine.getService(AxisEngine.java:311) at org.apache.axis.MessageContext.setTargetService(MessageContext.java:755) at org.apache.axis.transport.http.HTTPTransport.setupMessageContextImpl(HTTPTransport.java:89) at org.apache.axis.client.Transport.setupMessageContext(Transport.java:46) at org.apache.axis.client.Call.invoke(Call.java:2708) at org.apache.axis.client.Call.invoke(Call.java:2413) at org.apache.axis.client.Call.invoke(Call.java:2336) at org.apache.axis.client.Call.invoke(Call.java:1793) at com.estylesoft.casau.service.AuthServiceSoapStub.getParameters(Unknown Source) at com.estylesoft.casau.client.CASAgentFactory.loadCache(CASAgentFactory.java:486) at com.estylesoft.casau.client.CASAgentFactory.resetCache(CASAgentFactory.java:285) at com.estylesoft.casau.client.CASAgentFactory.initialize(CASAgentFactory.java:259) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.estylesoft.casau.client.CASAgentProxy.invoke(CASAgentProxy.java:39) at $Proxy0.initialize(Unknown Source) at Test.main(Test.java:25) > Unnecessary empty-valued attribute "xmlns" in Envelope parameter values > ----------------------------------------------------------------------- > > Key: AXIS-1827 > URL: http://issues.apache.org/jira/browse/AXIS-1827 > Project: Axis > Type: Bug > Components: Serialization/Deserialization > Versions: 1.2 > Environment: Windows 2000 Pro SP4 JDK 1.4.2-05 > Reporter: Konstantin Kasatkin > Priority: Blocker > Attachments: AuthService.wsdl, example.zip > > There is a problem of interaction Axis WebService Client (as console > application) with Microsoft WebService Server (as .Net application) > Here WEBService method description is from MS side: > <?xml version="1.0" encoding="utf-8"?> > <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > <soap:Body> > <SetParameterValues xmlns="http://tempuri.org/"> > <strUser>string</strUser> > <strBusinessSystem>string</strBusinessSystem> > <strParameter>string</strParameter> > <strValues> > <string>string</string> > <string>string</string> > </strValues> > </SetParameterValues> > </soap:Body> > </soap:Envelope> > Here real Axis SOAP envelope is from Java applicaton: > <?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> > <SetParameterValues xmlns="http://tempuri.org/"> > <strUser>test</strUser> > <strBusinessSystem>SYS</strBusinessSystem> > <strParameter>100</strParameter> > <strValues> > <string xmlns="">123</string> > <string xmlns="">234</string> > </strValues> > </SetParameterValues> > </soapenv:Body> > </soapenv:Envelope> > As you can see in section <strValues> all of inner elements contain attribute > xmlns="". > This notation does not work in MS (It is very strange, but I don't know why). > MS ignores all such lines and returns empty collection. > If I'm removing empty "xmlns" attributes all works fine. > I've already found the point where you can place fix code. > CLASS: org.apache.axis.encoding.SerializationContext > CODE: > if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && > map.getPrefix().equals("xmlns")) && > !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && > map.getPrefix().equals("xml"))) > It need to be added one more check in the condition. Here modified condition > if (!(map.getNamespaceURI().equals(Constants.NS_URI_XMLNS) && > map.getPrefix().equals("xmlns")) && > !(map.getNamespaceURI().equals(Constants.NS_URI_XML) && > map.getPrefix().equals("xml")) && > !map.getNamespaceURI().equals("")) > Maybe I didn't take into account something, but after this change all have > worked fine. -- 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 - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira