You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Martini Roberto <ma...@cesbe.it> on 2004/02/16 17:48:03 UTC
java2wsdl problem with axis1.2 alfa
Hi everybody
...since 1 month I'm hanging on the following problem: I want to generate with Axis 1.1 a pure document/literal wsdl (starting from a Java Interface ) without any reference to SoapEncoding. For example, when, the interface refers to an array of Objects (ex: public User[] getUsers(); ) the wsdl will contain the following:
<complexType name="ArrayOf_User>
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:User[]" />
</restriction>
</complexContent>
</complexType>
To solve this problem, I decided to try Axis 1.2alfa, but when I run Java2Wsdl whit the same configuration used with axis 1.1 i get the following Exception:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Please register a typemapping/beanmapping for 'com.cadit.trf.wsstruct.entity.custom.AnagraficaPage'
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Please register a typemapping/beanmapping for 'com.cadit.trf.wsstruct.entity.custom.AnagraficaPage'
faultActor:
faultNode:
faultDetail:
Please register a typemapping/beanmapping for 'com.cadit.trf.wsstruct.entity.custom.AnagraficaPage'
at org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1871)
at org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1713)
at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1109)
at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1066)
at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:499)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:350)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:445)
at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:622)
at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:668)
Please register a typemapping/beanmapping for 'com.cadit.trf.wsstruct.entity.custom.AnagraficaPage'
at org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1871)
at org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1713)
at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1109)
at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1066)
at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:499)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:350)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:445)
at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:622)
at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:668)
To reproduce the problem, try to run java2wsdl (by axis1.2alfa) onto a class that refears to another one.
For example, try to generate the wsdl for the interface User as follow:
public interface User
{
public UserList listUsers();
}
public class UserList
{
private String[] users;
public String[] getUser()
{
return users;
}
public void setUser(String[] users)
{
this.users = users;
}
}
What is the problem? Am I missing something nedded by the new Axis version or ?
Is there a way to generate a wsdl without the usage of soap-encoding?
Thanks in advance
Martini Roberto
Re: java2wsdl problem with axis1.2 alfa
Posted by Tony Blair <hr...@yahoo.com>.
Roberto,
The java2WSDL and WSDL2java not always work as one expected. They always work molto bene with those interfaces that contain simple type such as String, int, float and so on.
The listUsers() interface seems simple, try to write the deploy.wsdd and the client code yourself and deploy the service. If you need any help I can help you with the wsdd and the client code.
Regards,
Tony.
Martini Roberto <ma...@cesbe.it> wrote:
Hi everybody
...since 1 month I'm hanging on the following problem: I want to generate with Axis 1.1 a pure document/literal wsdl (starting from a Java Interface ) without any reference to SoapEncoding. For example, when, the interface refers to an array of Objects (ex: public User[] getUsers(); ) the wsdl will contain the following:
#9;
#9;#9;
To solve this problem, I decided to try Axis 1.2alfa, but when I run Java2Wsdl whit the same configuration used with axis 1.1 i get the following Exception:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Please register a typemapping/beanmapping for 'com.cadit.trf.wsstruct.entity.custom.AnagraficaPage'
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: Please register a typemapping/beanmapping for 'com.cadit.trf.wsstruct.entity.custom.AnagraficaPage'
faultActor:
faultNode:
faultDetail:
Please register a typemapping/beanmapping for 'com.cadit.trf.wsstruct.entity.custom.AnagraficaPage'
at org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1871)
at org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1713)
at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1109)
at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1066)
at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:499)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:350)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:445)
at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:622)
at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:668)
Please register a typemapping/beanmapping for 'com.cadit.trf.wsstruct.entity.custom.AnagraficaPage'
at org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1871)
at org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1713)
at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1109)
at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1066)
at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:499)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:350)
at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:445)
at org.apache.axis.wsdl.Java2WSDL.run(Java2WSDL.java:622)
at org.apache.axis.wsdl.Java2WSDL.main(Java2WSDL.java:668)
To reproduce the problem, try to run java2wsdl (by axis1.2alfa) onto a class that refears to another one.
For example, try to generate the wsdl for the interface User as follow:
public interface User
{
public UserList listUsers();
}
public class UserList
{
private String[] users;
public String[] getUser()
{
return users;
}
public void setUser(String[] users)
{
this.users = users;
}
}
What is the problem? Am I missing something nedded by the new Axis version or ?
Is there a way to generate a wsdl without the usage of soap-encoding?
Thanks in advance
Martini Roberto
---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online