-
1. Re: JSR -181 Start with WSDL and Java
stevenh Aug 16, 2006 9:31 PM (in response to stevenh)I have been messing round with the wsdlLocation attribute on the WebService annotation and this looks like it will give me the consistency that i was after.
Steve. -
2. Re: JSR -181 Start with WSDL and Java
stevenh Aug 24, 2006 1:47 AM (in response to stevenh)Alright i have been having a bit of a play with my classes as one of my web services was behaving in what can only be described as an interesting maner.
I am looking at the generated wsdl from my soap class and it works fine as per the listing below. but if i change the method name of getResult to getResult1 it seperates out the elements into two difference schemas. See below.
I would not have expected the change to the method name to have any effect on the actual wsdl ( given the name paramaters are specified). it does seem a little fragile.@WebService(targetNamespace = "http://cs_dev.test/aua/User") @SOAPBinding( style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) public class AuUserWs { private static final Logger log = Logger.getLogger(AuUserWs.class); @WebMethod(operationName = "GetAuUserRole") @WebResult(name = "Userrole") public AuUserRole getResult( @WebParam(name = "AuNumber") int pAuNumber, @WebParam(name = "RoleCode") String pRoleCode, @WebParam(name = "Location") String pLocation ) throws DataBaseException, AuaSystemException { return null; } @WebMethod(operationName = "GetAuUserRoles") @WebResult(name = "Userroles") public AuUserRole[] getResults( @WebParam(name = "AuNumber")int _pAuNumber ) throws DataBaseException, AuaSystemException { return null; } }
Produces<type> <schema elementFormDefault='qualified' targetNamespace='http://cs_dev.test/aua/User' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://cs_dev.test/aua/User' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <complexType name='AuUserRole'> <sequence> <element name='auNumber' type='int'/> <element name='dateEntered' nillable='true' type='string'/> <element name='dateLastModified' nillable='true' type='string'/> <element name='delegation' nillable='true' type='string'/> <element name='deleted' nillable='true' type='string'/> <element name='disabled' nillable='true' type='string'/> <element name='expiryDate' nillable='true' type='string'/> <element name='facility' nillable='true' type='string'/> <element name='lastModifiedBy' nillable='true' type='string'/> <element name='locationCode' nillable='true' type='string'/> <element name='notes' nillable='true' type='string'/> <element name='priorityOrder' type='int'/> <element name='roleCode' nillable='true' type='string'/> <element name='roleType' nillable='true' type='string'/> <element name='soleSignatory' nillable='true' type='string'/> <element name='startDate' nillable='true' type='string'/> </sequence> </complexType> <complexType name='AuUserRole.Array'> <sequence> <element maxOccurs='unbounded' minOccurs='0' name='value' nillable='true' type='tns:AuUserRole'/> </sequence> </complexType> <complexType name='AuaSystemException'> <sequence/> </complexType> <complexType name='DataBaseException'> <sequence/> </complexType> <element name='AuaSystemException' type='tns:AuaSystemException'/> <element name='DataBaseException' type='tns:DataBaseException'/> </schema> </type>
but@WebService(targetNamespace = "http://cs_dev.test/aua/User") @SOAPBinding( style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) public class AuUserWs { private static final Logger log = Logger.getLogger(AuUserWs.class); @WebMethod(operationName = "GetAuUserRole") @WebResult(name = "Userrole") public AuUserRole getResult1( @WebParam(name = "AuNumber") int pAuNumber, @WebParam(name = "RoleCode") String pRoleCode, @WebParam(name = "Location") String pLocation ) throws DataBaseException, AuaSystemException { return null; } /** * * @param _pAuNumber int * @return AuUserRole[] * @throws DataBaseException */ @WebMethod(operationName = "GetAuUserRoles") @WebResult(name = "Userroles") public AuUserRole[] getResults( @WebParam(name = "AuNumber")int _pAuNumber ) throws DataBaseException, AuaSystemException { return null; } }
produces<types> <schema elementFormDefault='qualified' targetNamespace='http://dto.aua.server.chw/jaws' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:ns1='http://cs_dev.test/aua/User' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://dto.aua.server.chw/jaws' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <import namespace='http://cs_dev.test/aua/User'/> <complexType name='AuUserRole'> <sequence> <element name='auNumber' type='int'/> <element name='dateEntered' nillable='true' type='string'/> <element name='dateLastModified' nillable='true' type='string'/> <element name='delegation' nillable='true' type='string'/> <element name='deleted' nillable='true' type='string'/> <element name='disabled' nillable='true' type='string'/> <element name='expiryDate' nillable='true' type='string'/> <element name='facility' nillable='true' type='string'/> <element name='lastModifiedBy' nillable='true' type='string'/> <element name='locationCode' nillable='true' type='string'/> <element name='notes' nillable='true' type='string'/> <element name='priorityOrder' type='int'/> <element name='roleCode' nillable='true' type='string'/> <element name='roleType' nillable='true' type='string'/> <element name='soleSignatory' nillable='true' type='string'/> <element name='startDate' nillable='true' type='string'/> </sequence> </complexType> </schema> <schema elementFormDefault='qualified' targetNamespace='http://cs_dev.test/aua/User' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:ns2='http://dto.aua.server.chw/jaws' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://cs_dev.test/aua/User' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <import namespace='http://dto.aua.server.chw/jaws'/> <complexType name='AuUserRole'> <sequence> <element name='auNumber' type='int'/> <element name='dateEntered' nillable='true' type='string'/> <element name='dateLastModified' nillable='true' type='string'/> <element name='delegation' nillable='true' type='string'/> <element name='deleted' nillable='true' type='string'/> <element name='disabled' nillable='true' type='string'/> <element name='expiryDate' nillable='true' type='string'/> <element name='facility' nillable='true' type='string'/> <element name='lastModifiedBy' nillable='true' type='string'/> <element name='locationCode' nillable='true' type='string'/> <element name='notes' nillable='true' type='string'/> <element name='priorityOrder' type='int'/> <element name='roleCode' nillable='true' type='string'/> <element name='roleType' nillable='true' type='string'/> <element name='soleSignatory' nillable='true' type='string'/> <element name='startDate' nillable='true' type='string'/> </sequence> </complexType> <complexType name='AuUserRole.Array'> <sequence> <element maxOccurs='unbounded' minOccurs='0' name='value' nillable='true' type='ns2:AuUserRole'/> </sequence> </complexType> <complexType name='AuaSystemException'> <sequence/> </complexType> <complexType name='DataBaseException'> <sequence/> </complexType> <element name='AuaSystemException' type='tns:AuaSystemException'/> <element name='DataBaseException' type='tns:DataBaseException'/> </schema> </types>
-
3. Re: JSR -181 Start with WSDL and Java
stevenh Aug 24, 2006 1:47 AM (in response to stevenh)Sorry i forgot to mention i am running 4.0.4GA with jbossws 1.0.2GA.
Steve -
4. Re: JSR -181 Start with WSDL and Java
thomas.diesler Sep 1, 2006 3:53 AM (in response to stevenh)Steve, from all your good posts I very well think you qualify as a contributer. We are trying to get a fully certified JAXWS implementation out of the door by the end of the year - this is exciting stuff.
If you are interested please write to me directly and I can give you further directions. -
5. Re: JSR -181 Start with WSDL and Java
thomas.diesler Sep 8, 2006 8:21 AM (in response to stevenh)WSDL generation for JSR-181 only work s for trivial use cases. This is because JSR181 should really not work at all for JAXRPC. It is targeted for JAXWS where all marshalling unmarshhalling is delegated to JAXB
Please monitor
http://jira.jboss.org/jira/browse/JBWS-1101 -
6. Re: JSR -181 Start with WSDL and Java
stevenh Sep 11, 2006 6:44 PM (in response to stevenh)Hi Thomas,
I can accept that wsdl generation only works for trivial use cases. The actual problem is how unpredictable the existing code generation is.
My 3rd post in this thread show how changing a method name by one character can cause different wsdls. I would not have expected any changes to the method names to have any effect on the wsdl given the operationNames attributes are specified.
Steve.