Yes, I have a clue of what wsdl.exe is and i built a .NET proxy.
The only problem with my .NET proxy is that it can't transfer or get parameters from my java side application (not even primitive data types).
I receive the following error message:
java.lang.IllegalArgumentException: No Serializer found to serialize a 'org.apache.soap.rpc.Parameter' using encoding style 'null'
In any case, here are some of the files involved:
here is the proxy:
*********************************************
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.0.3705.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by wsdl, Version=1.0.3705.0.
//
using System.Diagnostics;
using System.Xml.Serialization;
using System;
using System.Web.Services.Protocols;
using System.ComponentModel;
using System.Web.Services;
/// <remarks/>
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="WebserviceEjbBinding", Namespace="http://hrmsh.wsdl/WebserviceEjbBinding/")]
public class WebserviceEjbService : System.Web.Services.Protocols.SoapHttpClientProtocol {
/// <remarks/>
public WebserviceEjbService() {
this.Url = "http://localhost:8080/WebFoo/servlet/rpcrouter";
}
/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://tempuri.org/hrmsh.WebserviceEjb", ResponseNamespace="http://tempuri.org/hrmsh.WebserviceEjb")]
[return: System.Xml.Serialization.SoapElementAttribute("result")]
public
string getStr() {
object[] results = this.Invoke("getStr", new object[0]);
return ((string)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BegingetStr(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("getStr", new object[0], callback, asyncState);
}
/// <remarks/>
public string EndgetStr(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
/// <remarks/>
[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://tempuri.org/hrmsh.WebserviceEjb", ResponseNamespace="http://tempuri.org/hrmsh.WebserviceEjb")]
[return: System.Xml.Serialization.SoapElementAttribute("result")]
public Err insertCategory(string primaryId) {
object[] results = this.Invoke("insertCategory", new object[] {
primaryId});
return ((Err)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BegininsertCategory(string primaryId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("insertCategory", new object[] {
primaryId}, callback, asyncState);
}
/// <remarks/>
public Err EndinsertCategory(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((Err)(results[0]));
}
}
/// <remarks/>
[System.Xml.Serialization.SoapTypeAttribute("Err", "http://hrmsh/")]
public class Err {
/// <remarks/>
public string localizedMessage;
/// <remarks/>
public string message;
/// <remarks/>
public int errNum;
/// <remarks/>
public string trace;
}
*********************************************
here is the original remote interface of my bean:
[These are the methods in my web service...]
*********************************************
package hrmsh;
import hrmsh.MyAccount;
import hrmsh.Err;
/**
* Remote interface for Enterprise Bean: WebserviceEjb
*/
public interface WebserviceEjb extends javax.ejb.EJBObject
{
public MyAccount getMyAccount() throws java.rmi.RemoteException;
public Err insertCategory(String primaryId)
throws Err, java.rmi.RemoteException;
public String getStr() throws java.rmi.RemoteException;
}
*********************************************
here are the comlex classes:
*********************************************
package hrmsh;
import java.io.Serializable;
/**
* @author yairog
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class Err extends Throwable implements Serializable
{
private String message;
private String trace;
private int ErrNum;
public Err()
{
}
public Err(String message,String trace,int errNum)
{
setMessage(message);
setTrace(trace);
setErrNum(errNum);
}
/**
* Returns the errNum.
* @return int
*/
public int getErrNum() {
return ErrNum;
}
/**
* Returns the message.
* @return String
*/
public String getMessage() {
return super.getMessage();
}
/**
* Returns the trace.
* @return String
*/
public String getTrace() {
return trace;
}
/**
* Sets the errNum.
* @param errNum The errNum to set
*/
public void setErrNum(int errNum) {
ErrNum = errNum;
}
/**
* Sets the message.
* @param message The message to set
*/
public void setMessage(String message) {
this.message = message;
}
/**
* Sets the trace.
* @param trace The trace to set
*/
public void setTrace(String trace) {
this.trace = trace;
}
}
package hrmsh;
import java.io.Serializable;
/**
* @author Utxhr45
*
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
public class MyAccount implements Serializable
{
private int id;
private int accountNo;
private int counterNo;
private int transactionId;
private String creditOrDebit;
private int reference;
private double baseAmount;
private double shekelAmount;
private String securityCode;
private int matchNo;
private int storno;
private long eventNo;
private String details;
private String name;
private double balance;
public MyAccount()
{
setId(1);
setAccountNo(1);
setCounterNo(1);
setTransactionId(1);
setCreditOrDebit("c");
setReference(111111111);
setBaseAmount(9009);
setBaseAmount(232323);
setSecurityCode("DOLAR");
}
/**
* Returns the accountNo.
* @return int
*/
public int getAccountNo()
{
return accountNo;
}
/**
* Returns the balance.
* @return double
*/
public double getBalance()
{
return balance;
}
/**
* Returns the baseAmount.
* @return double
*/
public double getBaseAmount()
{
return baseAmount;
}
/**
* Returns the businessDate.
* @return Date
*/
/**
* Returns the counterNo.
* @return int
*/
public int getCounterNo()
{
return counterNo;
}
/**
* Returns the creditOrDebit.
* @return String
*/
public String getCreditOrDebit()
{
return creditOrDebit;
}
/**
* Returns the details.
* @return String
*/
public String getDetails()
{
return details;
}
/**
* Returns the eventNo.
* @return long
*/
public long getEventNo()
{
return eventNo;
}
/**
* Returns the id.
* @return int
*/
public int getId()
{
return id;
}
/**
* Returns the matchNo.
* @return int
*/
public int getMatchNo()
{
return matchNo;
}
/**
* Returns the name.
* @return String
*/
public String getName()
{
return name;
}
/**
* Returns the reference.
* @return int
*/
public int getReference()
{
return reference;
}
/**
* Returns the securityCode.
* @return String
*/
public String getSecurityCode()
{
return securityCode;
}
/**
* Returns the shekelAmount.
* @return double
*/
public double getShekelAmount()
{
return shekelAmount;
}
/**
* Returns the storno.
* @return int
*/
public int getStorno()
{
return storno;
}
/**
* Returns the transactionId.
* @return int
*/
public int getTransactionId()
{
return transactionId;
}
/**
* Sets the accountNo.
* @param accountNo The accountNo to set
*/
public void setAccountNo(int accountNo)
{
this.accountNo = accountNo;
}
/**
* Sets the balance.
* @param balance The balance to set
*/
public void setBalance(double balance)
{
this.balance = balance;
}
/**
* Sets the baseAmount.
* @param baseAmount The baseAmount to set
*/
public void setBaseAmount(double baseAmount)
{
this.baseAmount = baseAmount;
}
/**
* Sets the counterNo.
* @param counterNo The counterNo to set
*/
public void setCounterNo(int counterNo)
{
this.counterNo = counterNo;
}
/**
* Sets the creditOrDebit.
* @param creditOrDebit The creditOrDebit to set
*/
public void setCreditOrDebit(String creditOrDebit)
{
this.creditOrDebit = creditOrDebit;
}
/**
* Sets the details.
* @param details The details to set
*/
public void setDetails(String details)
{
this.details = details;
}
/**
* Sets the eventNo.
* @param eventNo The eventNo to set
*/
public void setEventNo(long eventNo)
{
this.eventNo = eventNo;
}
/**
* Sets the id.
* @param id The id to set
*/
public void setId(int id)
{
this.id = id;
}
/**
* Sets the matchNo.
* @param matchNo The matchNo to set
*/
public void setMatchNo(int matchNo)
{
this.matchNo = matchNo;
}
/**
* Sets the name.
* @param name The name to set
*/
public void setName(String name)
{
this.name = name;
}
/**
* Sets the reference.
* @param reference The reference to set
*/
public void setReference(int reference)
{
this.reference = reference;
}
/**
* Sets the securityCode.
* @param securityCode The securityCode to set
*/
public void setSecurityCode(String securityCode)
{
this.securityCode = securityCode;
}
/**
* Sets the shekelAmount.
* @param shekelAmount The shekelAmount to set
*/
public void setShekelAmount(double shekelAmount)
{
this.shekelAmount = shekelAmount;
}
/**
* Sets the storno.
* @param storno The storno to set
*/
public void setStorno(int storno)
{
this.storno = storno;
}
/**
* Sets the transactionId.
* @param transactionId The transactionId to set
*/
public void setTransactionId(int transactionId)
{
this.transactionId = transactionId;
}
}
*********************************************
here are the generated xsd files:
*********************************************
<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="qualified"
elementFormDefault="unqualified" targetNamespace="http://hrmsh/"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://hrmsh/">
<complexType name="Err">
<all>
<element name="localizedMessage" nillable="true" type="string"/>
<element name="message" nillable="true" type="string"/>
<element name="errNum" type="int"/>
<element name="trace" nillable="true" type="string"/>
</all>
</complexType>
</schema>
<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="qualified"
elementFormDefault="unqualified" targetNamespace="http://hrmsh/"
xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://hrmsh/">
<complexType name="MyAccount">
<all>
<element name="details" nillable="true" type="string"/>
<element name="name" nillable="true" type="string"/>
<element name="id" type="int"/>
<element name="balance" type="double"/>
<element name="creditOrDebit" nillable="true" type="string"/>
<element name="reference" type="int"/>
<element name="accountNo" type="int"/>
<element name="counterNo" type="int"/>
<element name="shekelAmount" type="double"/>
<element name="matchNo" type="int"/>
<element name="securityCode" nillable="true" type="string"/>
<element name="eventNo" type="long"/>
<element name="transactionId" type="int"/>
<element name="storno" type="int"/>
<element name="baseAmount" type="double"/>
</all>
</complexType>
</schema>
*********************************************
[ February 18, 2003: Message edited by: Yair Ogen ]