[jboss-user] [JBossWS] - Wsconsume generated Stubs failing with JBoss-4.2.0

vashistvishal do-not-reply at jboss.com
Fri Aug 24 01:00:08 EDT 2007


I have a problem with generating Stubs from WSDL using Wsconsume,  part of WS tools used in JBoss-4.2

This is the wsdl which i'm using....



<?xml version="1.0" encoding="UTF-8"?>
  | 	<wsdl:definitions name="insurance_pub" targetNamespace="http://www.myhome.com.au/insurance.doc.wsdl"
  | 			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  | 			xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  | 			xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
  | 			xmlns:tns="http://www.myhome.com.au/insurance.doc.wsdl"
  | 			xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
  | 			xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  | 	<wsdl:types>
  |         <xsd:schema 
  |     xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  |     targetNamespace="http://www.myhome.com.au/insurance.doc.wsdl" 
  |     xmlns:edm="http://www.myhome.com.au/insurance.doc.wsdl" 
  |     xmlns:tns="http://localhost/insurance/pub/getMemberInfo">
  | 
  |           <xsd:import 
  |            namespace="http://localhost/insurance/pub/getMemberInfo"/>
  | 
  |           <xsd:element name="getMemberInfo" type="tns:GetMemberInfoRequest"/>
  |           <xsd:element name="getMemberInfoResponse" type="tns:GetMemberInfoResponse"/>
  |         </xsd:schema>
  | 
  |         <xsd:schema 
  |     xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  |     targetNamespace="http://localhost/insurance/pub/getMemberInfo" 
  |     xmlns:tns="http://localhost/insurance/pub/getMemberInfo" 
  |     xmlns:edm="http://www.myhome.com.au/insurance.doc.wsdl">
  | 
  |           <xsd:import 
  |     namespace="http://www.myhome.com.au/insurance.doc.wsdl"/>
  |           
  | 			<xsd:complexType name="EmploymentHistory">
  |                  <xsd:sequence>
  |                    <xsd:element name="fundCode" nillable="true" type="xsd:string" minOccurs="0"/>
  |                    <xsd:element name="employerNumber" nillable="true" type="xsd:string" minOccurs="0"/>
  |                    <xsd:element name="tradingName" nillable="true" type="xsd:string" minOccurs="0"/>
  |                    <xsd:element name="employerStatus" nillable="true" type="xsd:string" minOccurs="0"/>
  |                    <xsd:element name="startDate" nillable="true" type="xsd:string" minOccurs="0"/>
  |                    <xsd:element name="endDate" nillable="true" type="xsd:string" minOccurs="0"/>
  |                  </xsd:sequence>
  |             </xsd:complexType>
  | 			<xsd:complexType name="MemberPackages">
  |                  <xsd:sequence>
  |                    <xsd:element name="packageName" nillable="true" type="xsd:string" minOccurs="0"/>
  |                    <xsd:element name="packageStartDate" nillable="true" type="xsd:string" minOccurs="0"/>
  |                    <xsd:element name="packageEndDate" nillable="true" type="xsd:string" minOccurs="0"/>
  |                  </xsd:sequence>
  |             </xsd:complexType>
  |                                           
  |           <xsd:complexType name="GetMemberInfoRequestType">
  |             <xsd:sequence>
  |               <xsd:element ref="edm:getMemberInfo"/>
  |               <xsd:any processContents="lax"/>
  |             </xsd:sequence>
  |             <xsd:anyAttribute processContents="lax"/>
  |           </xsd:complexType>
  |           <xsd:complexType name="GetMemberInfoRequest">
  |             <xsd:sequence>
  |               <xsd:element name="fundCode" nillable="true" type="xsd:string"/>
  |               <xsd:element name="memberNumber" nillable="true" type="xsd:string"/>
  |             </xsd:sequence>
  |           </xsd:complexType>
  |           <xsd:complexType name="GetMemberInfoResponseType">
  |             <xsd:sequence>
  |               <xsd:element ref="edm:getMemberInfoResponse"/>
  |               <xsd:any processContents="lax"/>
  |             </xsd:sequence>
  |             <xsd:anyAttribute processContents="lax"/>
  |           </xsd:complexType>
  |           <xsd:complexType name="GetMemberInfoResponse">
  |             <xsd:sequence>
  |               <xsd:element name="fundCode" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="clientArrangementId" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="memberNumber" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="membershipType" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="title" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="givenName" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="surname" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="gender" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="email" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="phoneNumber" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="dateOfBirth" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="deemedDate" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="activeDate" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="addressLine1" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="addressLine2" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="addressLine3" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="suburb" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="state" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="postcode" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="country" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="accountBalance" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="division" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="status" nillable="true" type="xsd:string" minOccurs="0"/>
  |               <xsd:element name="employmentHistory" type="tns:EmploymentHistory" nillable="true" maxOccurs="unbounded" minOccurs="0"/>
  |               <xsd:element name="mbrPackages" type="tns:MemberPackages" nillable="true" maxOccurs="unbounded" minOccurs="0"/>
  |             </xsd:sequence>
  |           </xsd:complexType>
  |         </xsd:schema>
  | 
  | 	</wsdl:types>
  | 	
  | 	<wsdl:message name="getMemberInfoIn">
  | 		<wsdl:part name="getMemberInfo" element="tns:getMemberInfo"/>
  | 	</wsdl:message>
  | 	
  | 	<wsdl:message name="getMemberInfoOutput">
  | 		<wsdl:part name="getMemberInfoResponse" element="tns:getMemberInfoResponse"/>
  | 	</wsdl:message>
  | 
  | 	<wsdl:portType name="Insurance_services_getmemberinfo">
  | 		<wsdl:operation name="getMemberInfo">
  | 			<wsdl:input message="tns:getMemberInfoIn"/>
  | 			<wsdl:output message="tns:getMemberInfoOutput"/>
  | 		</wsdl:operation>
  | 	</wsdl:portType>
  | 	<wsdl:binding name="Insurance_services_getmemberinfoBinding" type="tns:Insurance_services_getmemberinfo">
  | 		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  | 
  | 		<wsdl:operation name="getMemberInfo">
  | 			<soap:operation soapAction=""/>
  | 			<wsdl:input>
  | 				<soap:body use="literal"/>
  | 			</wsdl:input>
  | 			<wsdl:output>
  | 				<soap:body use="literal"/>
  | 			</wsdl:output>
  | 		</wsdl:operation>
  | 	</wsdl:binding>
  | 	<!-- to test point web browser too 
  | 
  | 	<wsdl:service name="Insurance_services_getmemberinfoService">
  | 		<wsdl:port name="Insurance_services_getmemberinfoPort0" binding="tns:Insurance_services_getmemberinfoBinding">
  | 			<soap:address location="http://localhost:5565/soap/DocLiteral"/>
  | 		</wsdl:port>
  | 	</wsdl:service>
  | 	</wsdl:definitions>
  | 
  |  
  | 
  | 

I have not been able to understand what the problem is. Even though the stubs are generated, I'm not sure whether these are right ones, because their was warning which is coming all the time when i run wsconsume.

Any pointers or hints will be a great help.

I went further assuming thet "let us not worry about the warning" and tried to rune the cleint using generated stubs and i got this error at invocation of this service

Exception in thread "main" java.lang.IllegalStateException: Cannot build JAXB context
  |         at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.createJAXBContext(JAXWSMetaDataBuilder.java:879)
  |         at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(JAXWSClientMetaDataBuilder.java:281)
  |         at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:274)
  |         at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:200)
  |         at javax.xml.ws.Service.getPort(Service.java:116)
  |         at au.com.sydney.InsuranceServicesGetmemberinfoService.getInsuranceServicesGetmemberinfoPort0(InsuranceServicesGetmemberinfoService.java:56)
  |         at au.com.sydney.TestService.main(TestService.java:28)
  | Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 32 counts of IllegalAnnotationExceptions
  | There's no ObjectFactory with an @XmlElementDecl for the element {http://www.myhome.com.au/insurance.doc.wsdl}fundCode.
  |         this problem is related to the following location:
  |                 at protected javax.xml.bind.JAXBElement au.com.sydney.GetMemberInfoResponse.fundCode
  |                 at au.com.sydney.GetMemberInfoResponse
  |                                                                              

As i get this run time error... I'm not sure now whether its a stub generated by wsconsume are not right because their was a warning while running wsconsume or is it JAXB or something else.

Any pointers to work on will be a geart help and save me :) from stress over the weekend.


 





View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077615#4077615

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077615



More information about the jboss-user mailing list