Q:

Consume https wsdl using Axis2 ADB client?Exception: Missing class for indicator field value

I was successfully able to consume https wsdl usign CXF client. Now I need to do the same using Axis2 ADB client. I have updated the jdk security lib with the certificate. When I consume the code usign http, there is no error. When I change it to https, this is the error. All the dependent(generated) classes are static classes inside the Stub class. I dont see any missing class.
Please suggest a way to consume https wsdl.
    org.apache.axis2.AxisFault: javax.xml.bind.JAXBException
 - with linked exception:
[org.xml.sax.SAXException: 
Exception Description: Missing class for indicator field value [ns1:ssssAuthenticateUserVOIn] of type [class java.lang.String].
Descriptor: XMLDescriptor(oracle.e1.bssv.JP55USRB.valueobject.SSSS_AuthenticateUserVOIn --> [DatabaseTable(ns0:SSSS_AuthenticateUserMethod)])
Exception [EclipseLink-43] (Eclipse Persistence Services - 2.5.2): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Missing class for indicator field value [ns1:ssssAuthenticateUserVOIn] of type [class java.lang.String].
Descriptor: XMLDescriptor(oracle.e1.bssv.JP55USRB.valueobject.SSSS_AuthenticateUserVOIn --> [DatabaseTable(ns0:SSSS_AuthenticateUserMethod)])]

Schema:
<xsd:complexType name="ssss_AuthenticateUserVOIn">
<xsd:complexContent>
<xsd:extension base="ns0:valueObject">
<xsd:sequence>
<xsd:element name="description" type="xsd:string" minOccurs="0"/>
<xsd:element name="enterpriseOnePassword" type="xsd:string" minOccurs="0"/>
<xsd:element name="errorCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="scheduledUserRole" type="xsd:string" minOccurs="0"/>
<xsd:element name="userID" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="SSSS_AuthenticateUserMethod" type="ns0:ssss_AuthenticateUserVOIn" nillable="true"/>

A:

I figured out the solution myself. I compared the xmls thats getting generated by java code and soapui. I noticed that in java code it was

and in SOAPUI it was
 
So I went back to the code and commented the place where this xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:ssssAuthenticateUserVOIn" was getting added:
In public void serialize(final javax.xml.namespace.QName parentQName, javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType) method I commented this block and it started working:
if ((namespacePrefix != null)
                    && (namespacePrefix.trim().length() > 0)) {
                writeAttribute("xsi",
                        "http://www.w3.org/2001/XMLSchema-instance", "type",
                        namespacePrefix + ":ssssAuthenticateUserVOIn",
                        xmlWriter);
            } else {
                writeAttribute("xsi",
                        "http://www.w3.org/2001/XMLSchema-instance", "type",
                        "ssssAuthenticateUserVOIn", xmlWriter);
            }

I dint even need to register protocol for https, nor set any system property for truststore or keystore since I had already added the server certificate into jssecacerts. Apart from commenting this block, the only other change is the URL from http to https. Thats it. I wonder how it worked under http wsdl.
Hope this helps someone out there.

