Re: a problem when using wsimport to generate stubs from a Axis 1.4 server

2007-01-30 Thread Anne Thomas Manes

This is a problem in the way Axis 1.4 generates faults when using RPC
style. I suggest you use "wrapped" style.

Anne

On 1/29/07, WANG Chi <[EMAIL PROTECTED]> wrote:




Hi anne,

Thanks very much for your response. I'm a newbie of JAX-WS, I have changed
from rpc/encoding to rpc/literal, but still some errors, can you help me to
solve it. thanks very much. here is what I did,

I write an interface LogonManager:

public interface LogonManager {

public String logon(String username, String password) throws
DeniedAccessFault, ExpiredAccountFault, ServiceBreakDownFault;


public boolean logout(String sessionId);

public CategoryBean[] getAccessRights(String sessionId, String[]
categoryNames) throws DeniedAccessFault, ServiceBreakDownFault;

}

public class CategoryBean implements Serializable {


private String name;


private boolean granted;


public boolean isGranted() {
return granted;
}


public void setGranted(boolean granted) {
this.granted = granted;
}


public String getName() {
return name;
}


public void setName(String name) {
this.name = name;
}

}

then I use JAVA2WSDL to generate the WSDL, here is the ant target





in the above config, I use RPC/LITERAL

then I use the WSDL2JAVA to generate the server impl







then I deployed this service on Tomcat, and use wsimport to generate the
stubs, but still some errors

D:\test\jaxws-ri\bin>wsimport -extension
http://localhost:8081/otasoap/services/LogonManager?wsdl

warning: src-resolve: Cannot resolve the name 'tns2:CategoryBean' to a(n)
'type definition' component.
  line ? of
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2

error: in message "ServiceBreakDownFault", part "fault" must specify a
"element" attribute



The following is the generated WSDL,



http://xml.apache.org/xml-soap";
xmlns:impl="urn:logon.soap.ota.gemplus.com"
xmlns:intf="urn:logon.soap.ota.gemplus.com"
xmlns:tns1="http://soap.ota.gemplus.com";
xmlns:tns2="http://bean.soap.ota.gemplus.com";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>


 
  http://soap.ota.gemplus.com";
xmlns="http://www.w3.org/2001/XMLSchema";>
   http://bean.soap.ota.gemplus.com"/>
   
   http://schemas.xmlsoap.org/soap/encoding/"/>
   

 
 


   
   

 
  
 

   
   

 
  
 

   
   

 
  
 

   
  
  http://www.w3.org/2001/XMLSchema";>
   http://soap.ota.gemplus.com"/>
   http://bean.soap.ota.gemplus.com"/>
   http://schemas.xmlsoap.org/soap/encoding/"/>
   

 

   
   

 

   
  
  http://bean.soap.ota.gemplus.com";
xmlns="http://www.w3.org/2001/XMLSchema";>
   http://soap.ota.gemplus.com"/>
   
   http://schemas.xmlsoap.org/soap/encoding/"/>
   

 
 

   
  
 



   

  

   

   

  

   

   

  

  

   

   

  

   

   

  

  

   

   

  

   

   

  

   

   

  

   

   

  


   

   

  

 

 

  

  

 

 

 

 

 

  

  

 

 

 

 

  

   

   

  http://schemas.xmlsoap.org/soap/http"/>

  

 

 



 

 



 

  

  

 

 



 

 



 

 



 

 



 

 



 

  

  

 

 



 

 



 

 



 

 



 

  

   

   

  

     http://localhost:8081/otasoap/services/LogonManager"/>

  

   






-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
Sent: Monday, January 29, 2007 8:52 PM ?
To: axis-user@ws.apache.org
Subject: Re: a problem when using wsimport to generate stubs from a Axis 1.4
server


JAX-WS does not support RPC/encoded.

Anne

On 1/29/07, WANG Chi <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a web service developed in Axis 1.4, and I want to use JAX-WS as
the client, I use wsimport to generate the stubs ,but the following errors
occured, can someone help me? thank you very much.

>
> D:\open source\jax-ws\jaxws-ri\bin> wsimport -d d:\test\test1 -s
d:\test\t

Re: a problem when using wsimport to generate stubs from a Axis 1.4 server

2007-01-29 Thread Anne Thomas Manes

JAX-WS does not support RPC/encoded.

Anne

On 1/29/07, WANG Chi <[EMAIL PROTECTED]> wrote:

Hi all,

I have a web service developed in Axis 1.4, and I want to use JAX-WS as the 
client, I use wsimport to generate the stubs ,but the following errors occured, 
can someone help me? thank you very much.

D:\open source\jax-ws\jaxws-ri\bin> wsimport -d d:\test\test1 -s d:\test\test2 
http://localhost:8081/otasoap/services/LogonManager?wsdl

warning: src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type 
definition' component.
  line ? of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined simple or complex type 'soapenc:Array'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined attribute 'soapenc:arrayType'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined simple or complex type 'soapenc:Array'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined attribute 'soapenc:arrayType'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined simple or complex type 'soapenc:string'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema3
error: undefined simple or complex type 'soapenc:string'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema1
error: undefined simple or complex type 'soapenc:string'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema1


The WSDL got from the Axis server is as following, I use RPC/ENCODING style.

  
- http://xml.apache.org/xml-soap"; 
xmlns:impl="urn:logon.soap.ota.gemplus.com" xmlns:intf="urn:logon.soap.ota.gemplus.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:tns1="http://soap.ota.gemplus.com"; xmlns:tns2="http://bean.soap.ota.gemplus.com"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
- 
- 
- http://soap.ota.gemplus.com"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
  http://bean.soap.ota.gemplus.com"; />
  
  http://schemas.xmlsoap.org/soap/encoding/"; />
- 
- 
  
  
  
  
- 
- 
- 
  
  
  
  
- 
- 
- 
  
  
  
  
- 
- 
- 
  
  
  
  
  
- http://www.w3.org/2001/XMLSchema";>
  http://soap.ota.gemplus.com"; />
  http://bean.soap.ota.gemplus.com"; />
  http://schemas.xmlsoap.org/soap/encoding/"; />
- 
- 
- 
  
  
  
  
- 
- 
- 
  
  
  
  
  
- http://bean.soap.ota.gemplus.com"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
  http://soap.ota.gemplus.com"; />
  
  http://schemas.xmlsoap.org/soap/encoding/"; />
- 
- 
  
  
  
  
  
  
- 
  
  
- 
  
  
- 
  
  
  
- 
  
  
- 
  
  
  
- 
  
  
- 
  
  
- 
  
  
- 
  
  
- 
- 
  
  
  
- 
  
  
  
  
  
  
- 
  
  
  
  
  
  
- 
  http://schemas.xmlsoap.org/soap/http"; 
/>
- 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
  
- 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
name="ServiceBreakDownFault" namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; name="DeniedAccessFault" 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; name="ExpiredAccountFault" 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
  
- 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
name="ServiceBreakDownFault" namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; name="DeniedAccessFault" 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" />
  
  
  
- 
- 
  http://localhost:8081/otasoap/services/LogonManager"; 
/>
  
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



a problem when using wsimport to generate stubs from a Axis 1.4 server

2007-01-29 Thread WANG Chi
Hi all,

I have a web service developed in Axis 1.4, and I want to use JAX-WS as the 
client, I use wsimport to generate the stubs ,but the following errors occured, 
can someone help me? thank you very much. 

D:\open source\jax-ws\jaxws-ri\bin> wsimport -d d:\test\test1 -s d:\test\test2 
http://localhost:8081/otasoap/services/LogonManager?wsdl

warning: src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type 
definition' component.
  line ? of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined simple or complex type 'soapenc:Array'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined attribute 'soapenc:arrayType'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined simple or complex type 'soapenc:Array'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined attribute 'soapenc:arrayType'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema2
error: undefined simple or complex type 'soapenc:string'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema3
error: undefined simple or complex type 'soapenc:string'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema1
error: undefined simple or complex type 'soapenc:string'
  line 0 of 
http://localhost:8081/otasoap/services/LogonManager?wsdl#types?schema1


The WSDL got from the Axis server is as following, I use RPC/ENCODING style.

   
- http://xml.apache.org/xml-soap"; 
xmlns:impl="urn:logon.soap.ota.gemplus.com" 
xmlns:intf="urn:logon.soap.ota.gemplus.com" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:tns1="http://soap.ota.gemplus.com"; 
xmlns:tns2="http://bean.soap.ota.gemplus.com"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
-  
- 
- http://soap.ota.gemplus.com"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
  http://bean.soap.ota.gemplus.com"; /> 
   
  http://schemas.xmlsoap.org/soap/encoding/"; /> 
- 
- 
   
   
  
  
- 
- 
- 
   
  
  
  
- 
- 
- 
   
  
  
  
- 
- 
- 
   
  
  
  
  
- http://www.w3.org/2001/XMLSchema";>
  http://soap.ota.gemplus.com"; /> 
  http://bean.soap.ota.gemplus.com"; /> 
  http://schemas.xmlsoap.org/soap/encoding/"; /> 
- 
- 
- 
   
  
  
  
- 
- 
- 
   
  
  
  
  
- http://bean.soap.ota.gemplus.com"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
  http://soap.ota.gemplus.com"; /> 
   
  http://schemas.xmlsoap.org/soap/encoding/"; /> 
- 
- 
   
   
  
  
  
  
- 
   
  
- 
   
  
- 
   
   
  
- 
   
  
- 
   
   
  
- 
   
  
- 
   
  
- 
   
  
- 
   
  
- 
- 
   
   
  
- 
   
   
   
   
   
  
- 
   
   
   
   
  
  
- 
  http://schemas.xmlsoap.org/soap/http"; /> 
- 
   
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" /> 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" /> 
  
  
- 
   
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" /> 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" /> 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
name="ServiceBreakDownFault" namespace="urn:logon.soap.ota.gemplus.com" 
use="encoded" /> 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
name="DeniedAccessFault" namespace="urn:logon.soap.ota.gemplus.com" 
use="encoded" /> 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
name="ExpiredAccountFault" namespace="urn:logon.soap.ota.gemplus.com" 
use="encoded" /> 
  
  
- 
   
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" /> 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:logon.soap.ota.gemplus.com" use="encoded" /> 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
name="ServiceBreakDownFault" namespace="urn:logon.soap.ota.gemplus.com" 
use="encoded" /> 
  
- 
  http://schemas.xmlsoap.org/soap/encoding/"; 
name="DeniedAccessFault" namespace="urn:logon.soap.ota.gemplus.com" 
use="encoded" /> 
  
  
  
- 
- 
  http://localhost:8081/otasoap/services/LogonManager"; /> 
  
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]