• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Request comes differently when deployed in weblogic server and when published in eclipse

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you notice the difference between the WSDL content generated in both the ways?. Also the default settings to generate the WSDL for the both the ways could be different.
 
venky chin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have generated the wsdl and deployed following the below steps,

1) generate WSDL using

java -classpath <CLASSPATH> org.apache.axis.wsdl.Java2WSDL -o Complex.wsdl -l <URL> -n urn:Company -p"Complex=urn:Company" Complex.CompanyInf

2) Generate the Server-side Wrapper Code and Stubs

java -classpath <CLASSPATH> org.apache.axis.wsdl.WSDL2Java -o . -d Session -s -p Complex.ws Complex.wsdl

3) Compiled the generated files

4) Build Jar files

5) Copied the jar file to WEB-INF/lib and WSDL file to WEB-INF/classes folder

6) restarted the weblogic stack

7) Deployed using below command,
java -classpath <CLASSPATH> org.apache.axis.client.AdminClient -l<SERVICES URL> deploy.wsdd

Note:deploy.wsdd is generated in step2

Not sure what was the WSDL file generated in eclipse.

Please suggest if there is any other way of generating wsdl file, so that its in correct format(similar to what i have seen in eclipse).
 
Ganesh Malaichamy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you facing any issue in consuming the web-service hosted in weblogic. Via Soap or Java Client.You coud do *.wsdl search in the eclipse path and find the difference between the wsdl.The name space prefixing will differ for tools generating the request
 
What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic