axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Fernandez <informaticu007-...@yahoo.es>
Subject RE: axis2 -- duplicate elements in wsdl when multiple methods throw same Exception/faults
Date Thu, 28 Jun 2007 22:36:27 GMT
Hi Shiv,

The wsdl duplicating faults is a known issue. Please look at: https://issues.apache.org/jira/browse/AXIS2-2325.

Regards,

Jorge Fernández

Shiv <shivi@yahoo.com> escribió: In the pojo example (under axis2 samples), I added
a new class AddressException that extends AxisFault, and modified AddressBookService.java
so that both the methods thow AddressBookException. 
   
  public void addEntry(Entry entry) throws AddressException
   
  public Entry[] findEntry(String name) throws AddressException
   
  The AddressException.java is a simple class that just extends AxisFault.
   
  public  class AddressException extends AxisFault
   
   
  The wsdl generated from the above implementation has duplicate element AddressExceptionFault
(I used ant generate.service)
   
  Running the client program (adb version also gives problems). If the 'throws' is removed
from the methods, the wsdl looks ok and the client program runs fine. Our product code has
'throws AxisFault' in every method and this worked fine with axis 1.4. Axis 2 has broken all
of this. Even having an exception class that derives from java.lang.Exception does not help
(it also results in duplicate elements in wsdl).
   
  ant adb.client -D=http://localhost:8804/axis2/services/AddressBookService?wsdl
    
  C:\axis\axis2-1.2\samples\pojo>ant adb.client -D=http://localhost:8804/axis2/ser
vices/AddressBookService?wsdl
Buildfile: build.xml
  check-parameters:
  print-usage:
  adb.client:
  clean:
   [delete] Deleting directory C:\axis\axis2-1.2\samples\pojo\build
   [delete] DEPRECATED - Use of the implicit FileSet is deprecated.  Use a neste
d fileset element instead.
  prepare:
    [mkdir] Created dir: C:\axis\axis2-1.2\samples\pojo\build
    [mkdir] Created dir: C:\axis\axis2-1.2\samples\pojo\build\classes
    [mkdir] Created dir: C:\axis\axis2-1.2\samples\pojo\build\lib
    [mkdir] Created dir: C:\axis\axis2-1.2\samples\pojo\build\classes\META-INF
  adb.client.codegen-stub:
     [java] Jun 28, 2007 2:58:43 PM  org.apache.axis2.wsdl.codegen.writer.ClassWr
iter createOutFile
     [java] INFO: The src\sample\addressbook\stub\AddEntryFaultException.java fi
le cannot be overwritten.
     [java] Jun 28, 2007 2:58:44 PM org.apache.axis2.wsdl.codegen.writer.ClassWr
iter createOutFile
     [java] INFO: The src\sample\addressbook\stub\AddEntryFaultException.java fi
le cannot be overwritten.
  adb.client.compile:
    [javac] Compiling 8 source files to C:\axis\axis2-1.2\samples\pojo\build\cla
sses
  adb.client.jar:
      [jar] Building jar: C:\axis\axis2-1.2\samples\pojo\build\lib\adb-client.ja
r
  adb.client.run:
     [java] org.apache.axis2.AxisFault: Message Receiver not found for AxisOpera
tion: addEntry
     [java]     at  org.apache.axis2.util.Utils.getInboundFaultFromMessageContext
(Utils.java:434)
     [java]     at org.apache.axis2.description.RobustOutOnlyAxisOperation$Robus
tOutOnlyOperationClient.send(RobustOutOnlyAxisOperation.java:108)
     [java]     at org.apache.axis2.description.OutInAxisOperationClient.execute
(OutInAxisOperation.java:294)
     [java]     at sample.addressbook.stub.AddressBookServiceAddressBookServiceS
OAP11Port_httpStub.addEntry(Unknown Source)
     [java]     at sample.addressbook.adbclient.AddressBookADBClient.main(Unknow
n Source)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
     [java]     at java.lang.reflect.Method.invoke(Method.java:324)
     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.jav
a:193)
     [java]     at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava
.java:130)
     [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:705)
     [java]     at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:177)
       [java]     at  org.apache.tools.ant.taskdefs.Java.execute(Java.java:83)
     [java]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
     [java]     at org.apache.tools.ant.Task.perform(Task.java:364)
     [java]     at org.apache.tools.ant.Target.execute(Target.java:341)
     [java]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
     [java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
       [java]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
     [java]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.j
ava:106)
     [java]     at  org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
     [java]     at org.apache.tools.ant.Task.perform(Task.java:364)
     [java]     at org.apache.tools.ant.Target.execute(Target.java:341)
     [java]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
     [java]     at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
       [java]     at org.apache.tools.ant.Project.executeTargets(Project.java:1062
)
     [java]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
     [java]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
     [java]     at  org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
     [java]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
  BUILD SUCCESSFUL
Total time: 13 seconds
C:\axis\axis2-1.2\samples\pojo>
   
   
   
        

---------------------------------
Pinpoint customers who are looking for what you sell.   ---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org

 		
---------------------------------

LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
Mime
View raw message