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 François Thillen <fr...@gmx.net> on 2012/10/13 14:22:48 UTC

wsdl throw declaration and .Net

Dear Axis2 team

 

I am using your java2wsdl plugin to convert classes from java to wsdl to
.Net classes. In most cases is works very good but with the following I have
a big problem.

 

When a method has a throw declaration like

 

void createWithId(String id, ConnectorDescription connectorDescription)
throws ConnectorValidationFailedException;

 

then the corresponding part in the WSDL is the following:

 

        <wsdl:operation name="createWithId">

            <wsdl:input message="ns:createWithIdRequest"
wsaw:Action="urn:createWithId"/>

            <wsdl:output message="ns:null"
wsaw:Action="urn:createWithIdResponse"/>

            <wsdl:fault
message="ns:ConnectorManagerConnectorValidationFailedException"
name="ConnectorManagerConnectorValidationFailedException" 

 
wsaw:Action="urn:createWithIdConnectorManagerConnectorValidationFailedExcept
ion"/>

        </wsdl:operation>

 

When I use wsdl.exe (A similar behavior with svcutil) to convert it, I get
the following error message:

 

Microsoft (R) Web Services Description Language Utility

[Microsoft (R) .NET Framework, Version 4.0.30319.1]

Copyright (C) Microsoft Corporation. All rights reserved.

Error: Element message named null from namespace
http://api.core.openengsb.org is missing.

 

If you would like more help, please type "wsdl /?".

 

I figured out, that wsdl.exe search for the type ns:null and couldn’t find
it. I used the 1.7.0-SNAPSHOT version.

 

Do you have an idea, how this problem can be solved?

 

Thank you very much

 

Best regards

François Thillen

 


RE: AW: wsdl throw declaration and .Net

Posted by Martin Gainty <mg...@hotmail.com>.
Francois
each input message expects a request
each output message expects a response

so since you already have a request try replacing 
ns:null
with 
ns:createWithIdResponse

Bon Chance,
Martin 
______________________________________________ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


From: frenz2@gmx.net
To: java-user@axis.apache.org
Subject: AW: wsdl throw declaration and .Net
Date: Sun, 14 Oct 2012 12:58:57 +0200

Dear Martin I replaced the ns:null with ns:createWithIdRequest and the generated cs file is not completely correct. It converts it to void createWithId(ref string args0, ref ConnectorDescription args1);However, it works with ref as well.  Just to be sure, the ns:null is an java2wsdl problem and not on the .Net side? 
Thank you Best regardsFrançois Von: Martin Gainty [mailto:mgainty@hotmail.com] 
Gesendet: Sonndeg 14 Oktober 2012 02:47
An: java-user@axis.apache.org
Betreff: RE: wsdl throw declaration and .Net Francois

my example:
<wsdl:definitions xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
                  xmlns:ns0="http://axisversion.sample/xsd"

i reference an element getVersionResponse from the ns0 namespace (which is pointing to http://axisversion.sample/xsd schema)
<wsdl:portType name="VersionPortType">
    <wsdl:operation name="getVersion">
      <wsdl:input message="ns0:getVersionRequest" wsaw:Action="urn:getVersion"/>
      <wsdl:output message="ns0:getVersionResponse" wsaw:Action="urn:getVersionResponse"/>

if i try
     <wsdl:output message="ns0:null" wsaw:Action="urn:getVersionResponse"/>
since 'null' element is not defined in http://axisversion.sample/xsd
this reference to null element would produce an exception

can you replace ns:null with
ns:createWithIdRequest

BTW: I tried contacting
http://api.core.openengsb.org
and I cannot reach that site
you might want to ask the admin where the xsd schema is actually located and assign that to xmlns:ns

<wsdl:definitions 
xmlns:ns=Site_Which_contains_Your_Xsd_Goes_Here

Bon chance,
Martin 
______________________________________________ 
Note de déni et de confidentialitéCe message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.

From: frenz2@gmx.net
To: java-user@axis.apache.org
Subject: wsdl throw declaration and .Net
Date: Sat, 13 Oct 2012 14:22:48 +0200Dear Axis2 team I am using your java2wsdl plugin to convert classes from java to wsdl to .Net classes. In most cases is works very good but with the following I have a big problem. When a method has a throw declaration like void createWithId(String id, ConnectorDescription connectorDescription) throws ConnectorValidationFailedException; then the corresponding part in the WSDL is the following:         <wsdl:operation name="createWithId">            <wsdl:input message="ns:createWithIdRequest" wsaw:Action="urn:createWithId"/>            <wsdl:output message="ns:null" wsaw:Action="urn:createWithIdResponse"/>            <wsdl:fault message="ns:ConnectorManagerConnectorValidationFailedException" name="ConnectorManagerConnectorValidationFailedException"                                 wsaw:Action="urn:createWithIdConnectorManagerConnectorValidationFailedException"/>        </wsdl:operation> When I use wsdl.exe (A similar behavior with svcutil) to convert it, I get the following error message: Microsoft (R) Web Services Description Language Utility[Microsoft (R) .NET Framework, Version 4.0.30319.1]Copyright (C) Microsoft Corporation. All rights reserved.Error: Element message named null from namespace http://api.core.openengsb.org is missing. If you would like more help, please type "wsdl /?". I figured out, that wsdl.exe search for the type ns:null and couldn’t find it. I used the 1.7.0-SNAPSHOT version. Do you have an idea, how this problem can be solved? Thank you very much Best regardsFrançois Thillen  		 	   		  

AW: wsdl throw declaration and .Net

Posted by François Thillen <fr...@gmx.net>.
Dear Martin

 

I replaced the ns:null with ns:createWithIdRequest and the generated cs file
is not completely correct.

 

It converts it to void createWithId(ref string args0, ref
ConnectorDescription args1);

However, it works with ref as well. 

 

Just to be sure, the ns:null is an java2wsdl problem and not on the .Net
side? 


Thank you

 

Best regards

François

 

Von: Martin Gainty [mailto:mgainty@hotmail.com] 
Gesendet: Sonndeg 14 Oktober 2012 02:47
An: java-user@axis.apache.org
Betreff: RE: wsdl throw declaration and .Net

 

Francois

my example:
<wsdl:definitions xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
                  xmlns:ns0="http://axisversion.sample/xsd"

i reference an element getVersionResponse from the ns0 namespace (which is
pointing to http://axisversion.sample/xsd schema)
<wsdl:portType name="VersionPortType">
    <wsdl:operation name="getVersion">
      <wsdl:input message="ns0:getVersionRequest"
wsaw:Action="urn:getVersion"/>
      <wsdl:output message="ns0:getVersionResponse"
wsaw:Action="urn:getVersionResponse"/>

if i try
     <wsdl:output message="ns0:null" wsaw:Action="urn:getVersionResponse"/>
since 'null' element is not defined in http://axisversion.sample/xsd
this reference to null element would produce an exception

can you replace ns:null with
ns:createWithIdRequest

BTW: I tried contacting
http://api.core.openengsb.org
and I cannot reach that site
you might want to ask the admin where the xsd schema is actually located and
assign that to xmlns:ns

<wsdl:definitions 
xmlns:ns=Site_Which_contains_Your_Xsd_Goes_Here

Bon chance,
Martin 
______________________________________________ 
Note de déni et de confidentialité

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
de ceci est interdite. Ce message sert à l'information seulement et n'aura
pas n'importe quel effet légalement obligatoire. Étant donné que les email
peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité pour le contenu fourni.





  _____  

From: frenz2@gmx.net
To: java-user@axis.apache.org
Subject: wsdl throw declaration and .Net
Date: Sat, 13 Oct 2012 14:22:48 +0200

Dear Axis2 team

 

I am using your java2wsdl plugin to convert classes from java to wsdl to
.Net classes. In most cases is works very good but with the following I have
a big problem.

 

When a method has a throw declaration like

 

void createWithId(String id, ConnectorDescription connectorDescription)
throws ConnectorValidationFailedException;

 

then the corresponding part in the WSDL is the following:

 

        <wsdl:operation name="createWithId">

            <wsdl:input message="ns:createWithIdRequest"
wsaw:Action="urn:createWithId"/>

            <wsdl:output message="ns:null"
wsaw:Action="urn:createWithIdResponse"/>

            <wsdl:fault
message="ns:ConnectorManagerConnectorValidationFailedException"
name="ConnectorManagerConnectorValidationFailedException" 

 
wsaw:Action="urn:createWithIdConnectorManagerConnectorValidationFailedExcept
ion"/>

        </wsdl:operation>

 

When I use wsdl.exe (A similar behavior with svcutil) to convert it, I get
the following error message:

 

Microsoft (R) Web Services Description Language Utility

[Microsoft (R) .NET Framework, Version 4.0.30319.1]

Copyright (C) Microsoft Corporation. All rights reserved.

Error: Element message named null from namespace
http://api.core.openengsb.org is missing.

 

If you would like more help, please type "wsdl /?".

 

I figured out, that wsdl.exe search for the type ns:null and couldn’t find
it. I used the 1.7.0-SNAPSHOT version.

 

Do you have an idea, how this problem can be solved?

 

Thank you very much

 

Best regards

François Thillen

 


RE: wsdl throw declaration and .Net

Posted by Martin Gainty <mg...@hotmail.com>.
Francois

my example:
<wsdl:definitions xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
                  xmlns:ns0="http://axisversion.sample/xsd"

i reference an element getVersionResponse from the ns0 namespace (which is pointing to http://axisversion.sample/xsd schema)
<wsdl:portType name="VersionPortType">
    <wsdl:operation name="getVersion">
      <wsdl:input message="ns0:getVersionRequest" wsaw:Action="urn:getVersion"/>
      <wsdl:output message="ns0:getVersionResponse" wsaw:Action="urn:getVersionResponse"/>

if i try
     <wsdl:output message="ns0:null" wsaw:Action="urn:getVersionResponse"/>
since 'null' element is not defined in http://axisversion.sample/xsd
this reference to null element would produce an exception

can you replace ns:null with
ns:createWithIdRequest

BTW: I tried contacting
http://api.core.openengsb.org
and I cannot reach that site
you might want to ask the admin where the xsd schema is actually located and assign that to xmlns:ns

<wsdl:definitions 
xmlns:ns=Site_Which_contains_Your_Xsd_Goes_Here

Bon chance,
Martin 
______________________________________________ 
Note de déni et de confidentialité
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


From: frenz2@gmx.net
To: java-user@axis.apache.org
Subject: wsdl throw declaration and .Net
Date: Sat, 13 Oct 2012 14:22:48 +0200

Dear Axis2 team I am using your java2wsdl plugin to convert classes from java to wsdl to .Net classes. In most cases is works very good but with the following I have a big problem. When a method has a throw declaration like void createWithId(String id, ConnectorDescription connectorDescription) throws ConnectorValidationFailedException; then the corresponding part in the WSDL is the following:         <wsdl:operation name="createWithId">            <wsdl:input message="ns:createWithIdRequest" wsaw:Action="urn:createWithId"/>            <wsdl:output message="ns:null" wsaw:Action="urn:createWithIdResponse"/>            <wsdl:fault message="ns:ConnectorManagerConnectorValidationFailedException" name="ConnectorManagerConnectorValidationFailedException"                                 wsaw:Action="urn:createWithIdConnectorManagerConnectorValidationFailedException"/>        </wsdl:operation> When I use wsdl.exe (A similar behavior with svcutil) to convert it, I get the following error message: Microsoft (R) Web Services Description Language Utility[Microsoft (R) .NET Framework, Version 4.0.30319.1]Copyright (C) Microsoft Corporation. All rights reserved.Error: Element message named null from namespace http://api.core.openengsb.org is missing. If you would like more help, please type "wsdl /?". I figured out, that wsdl.exe search for the type ns:null and couldn’t find it. I used the 1.7.0-SNAPSHOT version. Do you have an idea, how this problem can be solved? Thank you very much Best regardsFrançois Thillen