[jboss-user] [JBossWS] - Problem with wsdl, accessing a WebMethod in a statelessSessi

elster do-not-reply at jboss.com
Mon Aug 28 08:00:34 EDT 2006


Hello...dunno if this is the right board since i saw there is a JBOSS.NET board as well. I hope it will fit in here.


actually i'am using EJB 3.0 and trying to access a simple HelloWorld method from a C# Client. But it seems that the *.wsdl file which is generated by my annotations does'nt work properly. The created ws has some problems in the root elements...in my C# Client he thinks that my HelloWorld method is a class as well as the class himself and expect a object with the methodname as a parameter. strange.

Furthermore i have to tell you that i've tried to do the same with glassfish and it works. So i think there might be problems with the generated wsdl or some flag i did'nt set. Even though i dont believe that i'am the first who is trying to connect a c# client with a java-based middleware with jboss... ;)

afaik for a .NET environment i need to change the soapBinding to @SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL, parameterStyle=ParameterStyle.WRAPPED) . I changed the method names to uppercase because i think .net expect this. (glassfish is working with the same SOAPBinding setup)

my testing class: 



  | @Stateless
  | @WebService
  | @SOAPBinding(style=Style.DOCUMENT, use=Use.LITERAL, parameterStyle=ParameterStyle.WRAPPED)
  | public class CustomersSessionBean {
  |   public void addCustomer(Customer customer)  {
  |     System.out.println("test");
  |   }
  | 
  |   public Customer loadCustomer()  {
  |     System.out.println("test");
  |     return null;
  |   }
  | 
  |   @WebMethod(operationName="HelloWorld")
  |   @WebResult(name="Hello")
  |   public String HelloWorld(){
  |     return "Hello World";
  |   }
  | }

i've created the same class in .NET and let them generate a localhost webservice to compare both *.wsdl files. 


to watch the following *.wsdl files you need the IE...opera does'nt work with them unfortunatly (ff i dont know)


jboss generated wsdl: http://www.dowhilefalse.com/wsdl/jboss.wsdl
loc: 46

.NET generated wsdl: http://www.dowhilefalse.com/wsdl/dotnet.wsdl 
loc: 46
 
glassfish generated wsdl: http://www.dowhilefalse.com/wsdl/glassfish.wsdl
loc: 36  O_O

btw to write the wsdl's manually is no option! 



best thx and greetings from germany

D. Hesse


P.S. i apologize for my intermediate english skills. 




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967797#3967797

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967797



More information about the jboss-user mailing list