[ http://issues.apache.org/jira/browse/AXIS2-1201?page=comments#action_12441650 ] Thilina Gunarathne commented on AXIS2-1201: -------------------------------------------
I tried to recreate the issue... What I understood is that Vikas is trying to deploy the SimpleService.java as a POJO... For me it worked well and the namespaces appeared correctly.. Please correct me if this issue is related to some other scenerio... One other thing that's fuzzy to me is the following comment in the WSDL... <!--WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)--> > Difference in name space in the response when a method is invoked with Array > of Java Bean Vs Just Java Bean > ----------------------------------------------------------------------------------------------------------- > > Key: AXIS2-1201 > URL: http://issues.apache.org/jira/browse/AXIS2-1201 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Components: rpc > Environment: OS: Windows Xp > Axis2 nightly of Sep-18-2006 > Reporter: vikas charak > Priority: Blocker > > I have a class with two methods as follows > public class SimpleService { > public Contact[] getAddress(String inputPara) { > Contact info = new Contact(); > info.setFirstName("myFirstName1"); > info.setLastName("myLastName1"); > Contact info2 = new Contact(); > info2.setFirstName("myFirstName2"); > info2.setLastName("myLastName2"); > Contact[] infos = new Contact[2]; > infos[0]=info; > infos[1]=info2; > > return infos; > } > public Contact getContact(String inputPara) { > Contact info = new Contact(); > Contact info = new Contact(); > info.setFirstName("myFirstName1"); > info.setLastName("myLastName1"); > return info; > } > > > } > When method Contact[] getAddress is invoked I get following respose : > HTTP/1.1 200 OK > Server: Apache-Coyote/1.1 > X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA > date=200605151000)/Tomcat-5.5 > Set-Cookie: JSESSIONID=A760355AE667603DE765E48C06065324; Path=/ > Content-Type: text/xml;charset=UTF-8 > Transfer-Encoding: chunked > Date: Wed, 20 Sep 2006 12:36:21 GMT > <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header > /><soapenv:Body><ns:getAddressResponse xmlns:ns="http://org.apache.axis2/xsd"> > <ns:return> > <ns:firstName>myFirstName1</ns:firstName> > <ns:lastName>myLastName1</ns:lastName> > <ns:return><ns:firstName>myFirstName2</ns:firstName> > <ns:lastName>myLastName2</ns:lastName> > </ns:return></ns:getAddressResponse></soapenv:Body></soapenv:Envelope> > Now, > When I invoke public Contact getContact, I see following response > HTTP/1.1 200 OK > Server: Apache-Coyote/1.1 > X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA > date=200605151000)/Tomcat-5.5 > Set-Cookie: JSESSIONID=E99870C0D6847ADF559B12EE7866A957; Path=/ > Content-Type: text/xml;charset=UTF-8 > Transfer-Encoding: chunked > Date: Wed, 20 Sep 2006 12:47:06 GMT > <?xml version='1.0' encoding='UTF-8'?> > <soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header > /><soapenv:Body> > <ns:getContactResponse > xmlns:ns="http://SimpleService.simpleservice.webservice.wammis.com/types"> > <ns:return><ns:firstName>MyFirstName1</ns:firstName> > <ns:lastName>MyLastName1</ns:lastName> > </ns:getContactResponse></soapenv:Body></soapenv:Envelope> > Now here is the issue: > When a method with Array of Beans is invoked I get <ns:getAddressResponse > xmlns:ns="http://org.apache.axis2/xsd"> > where without Array it is <ns:getContactResponse > xmlns:ns="http://SimpleService.simpleservice.webservice.wammis.com/types">. > I feel in both the cases xmlns:ns should be > "http://SimpleService.simpleservice.webservice.wammis.com/types". Because > this is what I have in my WSDl and my external non-java client is looking for > this. > See below my WSDL > <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions > targetNamespace="http://SimpleService.simpleservice.webservice.wammis.com/types" > xmlns:impl="http://SimpleService.simpleservice.webservice.wammis.com/types" > xmlns:intf="http://SimpleService.simpleservice.webservice.wammis.com/types" > xmlns:apachesoap="http://xml.apache.org/xml-soap" > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> > <!--WSDL created by Apache Axis version: 1.4 > Built on Apr 22, 2006 (06:55:48 PDT)--> > <wsdl:types> > <schema xmlns="http://www.w3.org/2001/XMLSchema" > targetNamespace="http://SimpleService.simpleservice.webservice.wammis.com/types" > elementFormDefault="qualified"> > <element name="inputPara" type="xsd:string"/> > <complexType name="Contact"> > <sequence> > <element name="firstName" nillable="true" type="xsd:string"/> > <element name="lastName" nillable="true" type="xsd:string"/> > <element name="name" nillable="true" type="xsd:string"/> > </sequence> > </complexType> > <complexType name="ArrayOfContact"> > <sequence> > <element name="item" type="impl:Contact" minOccurs="0" > maxOccurs="unbounded"/> > </sequence> > </complexType> > <element name="getAddressReturn"> > <complexType> > <sequence> > <element name="item" type="impl:Contact" minOccurs="0" > maxOccurs="unbounded"/> > </sequence> > </complexType> > </element> > <element name="inputPara1" type="xsd:string"/> > <element name="getContactReturn" type="impl:Contact"/> > </schema> > </wsdl:types> > <wsdl:message name="getAddressRequest"> > <wsdl:part name="inputPara" element="impl:inputPara"/> > </wsdl:message> > <wsdl:message name="getAddressResponse"> > <wsdl:part name="getAddressReturn" element="impl:getAddressReturn"/> > </wsdl:message> > <wsdl:message name="getContactRequest"> > <wsdl:part name="inputPara" element="impl:inputPara1"/> > </wsdl:message> > <wsdl:message name="getContactResponse"> > <wsdl:part name="getContactReturn" element="impl:getContactReturn"/> > </wsdl:message> > <wsdl:portType name="SimpleService"> > <wsdl:operation name="getAddress" parameterOrder="inputPara"> > <wsdl:input name="getAddressRequest" > message="impl:getAddressRequest"/> > <wsdl:output name="getAddressResponse" > message="impl:getAddressResponse"/> > </wsdl:operation> > <wsdl:operation name="getContact" parameterOrder="inputPara"> > <wsdl:input name="getContactRequest" > message="impl:getContactRequest"/> > <wsdl:output name="getContactResponse" > message="impl:getContactResponse"/> > </wsdl:operation> > </wsdl:portType> > <wsdl:binding name="SimpleServiceSoapBinding" type="impl:SimpleService"> > <wsdlsoap:binding style="document" > transport="http://schemas.xmlsoap.org/soap/http"/> > <wsdl:operation name="getAddress"> > <wsdlsoap:operation soapAction="getAddress"/> > <wsdl:input name="getAddressRequest"> > <wsdlsoap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getAddressResponse"> > <wsdlsoap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > <wsdl:operation name="getContact"> > <wsdlsoap:operation soapAction="getContact"/> > <wsdl:input name="getContactRequest"> > <wsdlsoap:body use="literal"/> > </wsdl:input> > <wsdl:output name="getContactResponse"> > <wsdlsoap:body use="literal"/> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > <wsdl:service name="SimpleService"> > <wsdl:port name="SimpleService" binding="impl:SimpleServiceSoapBinding"> > <wsdlsoap:address > location="http://localhost:9090/axis2/services/SimpleService"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]