Hi,
I have created sample web service in eclipse and code is as given below,
package Complex;
import java.util.HashMap;
public class MainCompany {
public HashMap<
String, String> employeeTEST;
}
----------------------------------
package Complex;
import java.util.HashMap;
public class Company {
public int companyID;
public String companyName;
public String[ ] employeeNames;
public HashMap<String, String> employeeMarks;
public HashMap<String,MainCompany> StringArray;
public HashMap<String, String> getemployeeMarks(){
return this.employeeMarks;
}
public String getCompamyName(){
return this.companyName;
}
}
-----------------------------------------
package Complex;
import javax.jws.WebService;
@WebService(endpointInterface = "Complex.CompanyInf")
public class CompanyImpl implements CompanyInf{
@Override
public String getHelloWorldAsString(Company[] name) {
System.out.println(name[0].employeeMarks);
System.out.println(name[0].companyID);
System.out.println(name[0].companyName);
return "Hello World JAX-WS " + name;
}
}
------------------------------------------
package Complex;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
//Service Endpoint Interface2
@WebService
@SOAPBinding(style = Style.DOCUMENT)
public interface CompanyInf {
@WebMethod String getHelloWorldAsString(Company[] name);
}
-----------------------------------------
When i publish this in eclipse, i get the default request(which is generated in soapUI) as given below,
When i deploy the same code in weblogic using axis.jar methods(using axis.jar generated the wsdl and other methods and created jar file and deployed it in weblogic server), its giving the request as given below,
--------------------------------------------------
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Company" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Header/>
<soapenv:Body>
<urn:getHelloWorldAsString soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0 xsi:type="urn:ArrayOfCompany" soapenc:arrayType="urn:Company[]"/>
</urn:getHelloWorldAsString>
</soapenv:Body>
</soapenv:Envelope>
--------------------------------------------------
Can you please suggest, why this is coming differently in eclipse and when deployed in weblogic server.