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 "Kraus, David" <dk...@MicroStrategy.com> on 2008/02/12 19:33:58 UTC

Service interface with "throws Exception" generates "There are no parts for fault message" message, when passed through java2wsdl/wsl2java.

I have seen that issue Axis-2672 deals with the same or similar issue.

 

I am using Axis2 1.2. Is there a fix being worked on for this problem?
If so, which release will it be in? Also, are there any workarounds?

 

Details below:

 

First I use Java2WSDL to create WSDL from a java interface (the same
problem occurs whether I use a class or an interface):

 

java2wsdl.bat -cn com.microstrategy.webservices.WsfDemo -cp . -of
WsfDemo.wsdl

 

...where WsfDemo source is:

 

package com.microstrategy.webservices;

 

import com.microstrategy.webservices.MWSProjectSessionInfo;

import com.microstrategy.webservices.MWSConnectInfo;

 

public interface WsfDemo {

 

    public MWSProjectSessionInfo ConnectToProject(MWSConnectInfo cInfo)
throws Exception;

 

    public void logout(String sessionState)throws Exception;

}

 

... the generated WSDL is attached...

 

Next, I turn around and run WSDL2Java on the generated WSDL.

 

wsdl2java.bat -uri WsfDemo.wsdl -s -ss -sd -u -uw -d adb -g 

 

..which generates the error...

 

Using AXIS2_HOME:   D:\axis2-1.2

Using JAVA_HOME:    C:\Program Files\Java\jdk1.6.0_02

Feb 12, 2008 10:04:27 AM
org.apache.axis2.description.WSDL11ToAxisServiceBuilder

 addQNameReference

SEVERE: There are no parts for fault message :
{http://webservices.microstrategy

.com}Exception

Feb 12, 2008 10:04:27 AM
org.apache.axis2.description.WSDL11ToAxisServiceBuilder

 populateService

SEVERE:
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingEx

ception: There are no parts for fault message :
{http://webservices.microstrateg

y.com}Exception

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException

: Error parsing WSDL

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat

ionEngine.java:137)

        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)

        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)

Caused by: org.apache.axis2.AxisFault: There are no parts for fault
message : {h

ttp://webservices.microstrategy.com}Exception

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi

ce(WSDL11ToAxisServiceBuilder.java:298)

        at
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA

llServices(WSDL11ToAllAxisServicesBuilder.java:100)

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat

ionEngine.java:131)

        ... 2 more

Caused by:
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessin

gException: There are no parts for fault message :
{http://webservices.microstra

tegy.com}Exception

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer

ence(WSDL11ToAxisServiceBuilder.java:920)

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi

ng(WSDL11ToAxisServiceBuilder.java:533)

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo

int(WSDL11ToAxisServiceBuilder.java:374)

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo

ints(WSDL11ToAxisServiceBuilder.java:334)

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi

ce(WSDL11ToAxisServiceBuilder.java:288)

        ... 4 more

 

Thanks, Dave


RE: Service interface with "throws Exception" generates "There are no parts for fault message" message, when passed through java2wsdl/wsl2java.

Posted by "Kraus, David" <dk...@MicroStrategy.com>.
I tried the same scenario with Axis2 1.3. In this release, WSDL2Java
actually produces source with no error. The service APIs, which throw
java.lang.Exception, are generated to throw ExceptionException0, which
extends java.lang.Exception. It seems that this shouldn't be necessary
to create the extra subclass, but I assume that this is occurring
because there still is a problem with java2wsdl's handling of
java.lang.Exception.

 

Thanks, Dave

 

________________________________

From: Kraus, David [mailto:dkraus@MicroStrategy.com] 
Sent: Tuesday, February 12, 2008 10:34 AM
To: axis-user@ws.apache.org
Subject: Service interface with "throws Exception" generates "There are
no parts for fault message" message, when passed through
java2wsdl/wsl2java.

 

I have seen that issue Axis-2672 deals with the same or similar issue.

 

I am using Axis2 1.2. Is there a fix being worked on for this problem?
If so, which release will it be in? Also, are there any workarounds?

 

Details below:

 

First I use Java2WSDL to create WSDL from a java interface (the same
problem occurs whether I use a class or an interface):

 

java2wsdl.bat -cn com.microstrategy.webservices.WsfDemo -cp . -of
WsfDemo.wsdl

 

...where WsfDemo source is:

 

package com.microstrategy.webservices;

 

import com.microstrategy.webservices.MWSProjectSessionInfo;

import com.microstrategy.webservices.MWSConnectInfo;

 

public interface WsfDemo {

 

    public MWSProjectSessionInfo ConnectToProject(MWSConnectInfo cInfo)
throws Exception;

 

    public void logout(String sessionState)throws Exception;

}

 

... the generated WSDL is attached...

 

Next, I turn around and run WSDL2Java on the generated WSDL.

 

wsdl2java.bat -uri WsfDemo.wsdl -s -ss -sd -u -uw -d adb -g 

 

..which generates the error...

 

Using AXIS2_HOME:   D:\axis2-1.2

Using JAVA_HOME:    C:\Program Files\Java\jdk1.6.0_02

Feb 12, 2008 10:04:27 AM
org.apache.axis2.description.WSDL11ToAxisServiceBuilder

 addQNameReference

SEVERE: There are no parts for fault message :
{http://webservices.microstrategy

.com}Exception

Feb 12, 2008 10:04:27 AM
org.apache.axis2.description.WSDL11ToAxisServiceBuilder

 populateService

SEVERE:
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingEx

ception: There are no parts for fault message :
{http://webservices.microstrateg

y.com}Exception

Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException

: Error parsing WSDL

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat

ionEngine.java:137)

        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)

        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)

Caused by: org.apache.axis2.AxisFault: There are no parts for fault
message : {h

ttp://webservices.microstrategy.com}Exception

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi

ce(WSDL11ToAxisServiceBuilder.java:298)

        at
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateA

llServices(WSDL11ToAllAxisServicesBuilder.java:100)

        at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat

ionEngine.java:131)

        ... 2 more

Caused by:
org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessin

gException: There are no parts for fault message :
{http://webservices.microstra

tegy.com}Exception

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addQNameRefer

ence(WSDL11ToAxisServiceBuilder.java:920)

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBindi

ng(WSDL11ToAxisServiceBuilder.java:533)

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo

int(WSDL11ToAxisServiceBuilder.java:374)

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpo

ints(WSDL11ToAxisServiceBuilder.java:334)

        at
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateServi

ce(WSDL11ToAxisServiceBuilder.java:288)

        ... 4 more

 

Thanks, Dave