Dennis, thanks very much for the info..this is really helpful and i am more clear now..I did go through the documentation in apache but couldnt get the info clearly.
One small question: a) do you mean that we cant use complex types for unwrapped code generation. In my case, can i still use with the complex type - authenticationKeyType for unwrapped code generation. (you can refer the wsdl in my previous message) . We already have POJOs developed and exposed using EJBs. We need to expose the same POJOs as webservices now. Most of the inputs to the POJOs APIs are objects and not sure whether I can consider using unwrapped if it supports only simple types. b) Also is there any difference in the wsdls, xsds for wrapped and unwrapped except that the bindings are not needed for unwrapped. I am sorry if i asked few naive questions...but this will help us in a long way to use jibx after we considered xmlbeans - which seems to be slow with axis2. thanks for your time. Will download jibx 1.2 RC soon. regards Yugandhar SAIC - USA Dennis Sosnoski wrote: > > Just as an update to this, there's a bug in the current 1.2 code which > prevents using JiBX without a binding definition. I'm fixing that now, > and in the upcoming 1.2 RC you should again be able to use JiBX > unwrapped support without a binding when only simple types with > predefined handling are involved. > > - Dennis > > Dennis M. Sosnoski > SOA and Web Services in Java > Training and Consulting > http://www.sosnoski.com - http://www.sosnoski.co.nz > Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 > > > > Dennis Sosnoski wrote: >> Hi Yugandhar, >> >> JiBX supports both wrapped (the default) and unwrapped (-uw option) >> code generation with WSDL2Java. If you use the default wrapped form, >> you need to have a <mapping> for each element referenced as a WSDL >> <message> part that links the element to a specific Java class. If you >> use the unwrapped form, you need to have an abstract <mapping> (which >> has a type-name, rather than an element name) for each type used as a >> child of the wrapper elements referenced by the <message> parts. >> >> It looks like you're using the default wrapped form, so you need to >> have a <mapping> definition for each element name. The *class* names, >> though, can be anything you want to use. >> >> But it'd be even simpler if you used the -uw flag for unwrapped code >> generation. In this case you shouldn't need a binding definition at >> all, since the default handling will work for the simple types >> referenced by your request and response elements. >> >> I hope that helps clarify how this operates. The JiBX integration >> documentation >> (http://ws.apache.org/axis2/1_1_1/jibx/jibx-codegen-integration.html , >> also included in the actual distribution) covers these topics in more >> detail. >> >> - Dennis >> >> Dennis M. Sosnoski >> SOA and Web Services in Java >> Training and Consulting >> http://www.sosnoski.com - http://www.sosnoski.co.nz >> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 >> >> >> >> yugandhar wrote: >>> Dennis >>> >>> I was able to move forward by creating the correct binding classes but I >>> have a question? Why is it expecting the exact class name as given in >>> the >>> wsdl message ie AuthenticationKey and AuthenticateResponseType >>> instead of >>> trying to refer to the schema namespace ie authenticationKeyType and >>> authenticateResponseType in the wsdl type section. >>> >>> I appreciate your time in this. we dont want to refer to the class names >>> directly in the messages instead refer to the namespace. >>> I verified your example too. We would like to use like the same way >>> used in >>> the example. >>> >>> <wsdl:definitions xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" >>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" >>> >>> xmlns:ns="http://SOASecurity.sec.gov/SOASecurity/wsdl/1.0/SOASecurity.wsdl" >>> >>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>> >>> xmlns:SECxsd="http://SOASecurity.sec.gov/SOASecurity/schema/1.0/SOASecurity.xsd" >>> >>> >>> >>> targetNamespace="http://SOASecurity.sec.gov/SOASecurity/wsdl/1.0/SOASecurity.wsdl"> >>> >>> >>> <wsdl:types> >>> <schema elementFormDefault="qualified" >>> >>> targetNamespace="http://SOASecurity.sec.gov/SOASecurity/wsdl/1.0/SOASecurity.wsdl" >>> >>> >>> xmlns="http://www.w3.org/2001/XMLSchema"> >>> <import >>> namespace="http://SOASecurity.sec.gov/SOASecurity/schema/1.0/SOASecurity.xsd"/> >>> >>> >>> >>> <element name="authenticationKeyType" >>> type="SECxsd:AuthenticationKey"/> <element >>> name="authenticateResponseType" >>> type="SECxsd:AuthenticateResponse"/> </schema> >>> >>> <schema elementFormDefault="qualified" >>> >>> targetNamespace="http://SOASecurity.sec.gov/SOASecurity/schema/1.0/SOASecurity.xsd" >>> >>> >>> xmlns="http://www.w3.org/2001/XMLSchema"> >>> >>> <complexType name="AuthenticateResponse"> >>> <sequence> >>> <element name="status" type="boolean"/> >>> </sequence> >>> </complexType> >>> <complexType name="AuthenticationKey"> >>> <sequence> >>> <element name="applicationID" type="decimal"/> >>> <element name="EmployeeID" type="string"/> >>> <element name="userID" type="string"/> >>> <element name="password" type="string"/> >>> <element name="tokenID" type="string"/> >>> </sequence> >>> </complexType> >>> </schema> >>> </wsdl:types> >>> <wsdl:message name="authenticateRequest"> >>> <wsdl:part name="authenticationKey" element="AuthenticationKey"/> >>> </wsdl:message> <wsdl:message name="authenticateResponse"> >>> <wsdl:part name="authenticateResponse" >>> element="AuthenticateResponseType"/> >>> </wsdl:message> <wsdl:portType name="SOASecurityServicePortType"> >>> <wsdl:operation name="authenticate"> >>> <wsdl:input message="ns:authenticateRequest"/> >>> <wsdl:output message="ns:authenticateResponse"/> >>> </wsdl:operation> >>> </wsdl:portType> >>> <wsdl:binding name="SOASecurityServiceSOAP12Binding" >>> type="ns:SOASecurityServicePortType"> >>> <soap12:binding style="document" >>> transport="http://schemas.xmlsoap.org/soap/http"/> >>> <wsdl:operation name="authenticate"> >>> <soap12:operation soapAction="ns:authenticate"/> >>> <wsdl:input> >>> <soap12:body use="literal"/> >>> </wsdl:input> >>> <wsdl:output> >>> <soap12:body use="literal"/> >>> </wsdl:output> >>> </wsdl:operation> >>> </wsdl:binding> >>> <wsdl:service name="SOASecurityService"> >>> <wsdl:port name="SOASecurityServiceSOAP12port" >>> binding="ns:SOASecurityServiceSOAP12Binding"> >>> <soap12:address >>> location="http://localhost:8080/axis2/services/SOASecurityService"/> >>> </wsdl:port> >>> </wsdl:service> >>> </wsdl:definitions> >>> >>> ============= >>> >> >> --------------------------------------------------------------------- >> 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] > > > -- View this message in context: http://www.nabble.com/Strange-behaviour-of-WSDL2Java---axis2---Jibx-tf3598083.html#a10089703 Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
