wsi:type generated for Complex Type
-----------------------------------
Key: AXIS-2832
URL: https://issues.apache.org/jira/browse/AXIS-2832
Project: Axis
Issue Type: Bug
Components: WSDL processing
Affects Versions: 1.4
Environment: Windows XP
Eclipse 3.4
java 1.5
Reporter: Chris Ogirri
Hi, I am currently using the Eclipse Axis CodeGen to convert WSDL to Java
Objects and calling them using the generated Stub class. down vote favorite
Hello, I am having a problem sending a WS Request to a Server. It seems that
the Namespace(NS) in one of the ComplexTypes of an operation types is causing
an xsi:type to be spewed as part of the generated SOAP Request.
Please see below for WSDL Sample:
<xs:complexType name="SubscribeAppendantProductRequest">
<xs:complexContent>
<xs:extension base="business:Common">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Product">
<xs:complexType>
<xs:complexContent>
<xs:extension base="business:Product">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Service"
type="business:Service" />
<xs:element minOccurs="0" name="EffectiveDate" type="xs:string" />
<xs:element minOccurs="0" name="ExpireDate" type="xs:string" />
<xs:element name="ValidMode" type="business:ValidMode" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="HandlingChargeFlag" type="xs:int" />
<xs:element minOccurs="0" name="CustID" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
See below for the the code generating the request on the Axis2 Operation/Stub:
SubscribeAppendantProductRequest sub_req = new
SubscribeAppendantProductRequest();
Product_type2 subscribedToProduct = new Product_type2();
subscribedToProduct.setId(productKey);
subscribedToProduct.setValidMode(ValidMode.value1);
Product_type2 []subscribedProductList = new Product_type2[1];
subscribedProductList[0]=subscribedToProduct;
sub_req.addProduct(subscribedToProduct);
sub_req.setProduct(subscribedProductList);
sub_req.setSubscriberNo(subscriber);
return sub_req;
Everytime I send a request, i get the following error message :
Interface parameter fault:There has 1 XML Validation Errors: Invalid
xsi:type qname: 'ns2:Product_type2' in element SubscribeAppendantProductRequest
Funnily enough, I had run a similar program on a different operation type with
similar characteristics which worked OK. See below for WSDL Sample of
Functional Operation:
<xs:complexType name="UnSubscribeAppendantProductRequest">
<xs:complexContent>
<xs:extension base="business:Common">
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Product">
<xs:complexType>
<xs:sequence>
<xs:element name="ProductID" type="xs:string" />
<xs:element minOccurs="0" name="ProductOrderKey" type="xs:string" />
<xs:element name="ValidMode" type="xs:string" />
<xs:element minOccurs="0" name="ExpireDate" type="xs:string" />
<xs:element maxOccurs="unbounded" minOccurs="0" name="Service">
<xs:complexType>
<xs:sequence>
<xs:element name="Id" type="xs:string" />
<xs:element maxOccurs="unbounded" name="SimpleProperty"
type="business:SimpleProperty" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="CustID" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
When I did a compare , it seems that they both use the Product complex Type but
it seems that the faulty uses Product complex type as an extension. The
generated SOAP Request also does NOT have the xsi:type Product tag.
Is this some sort of bug? Any possible solutions? Would things be different if
I used a different Data Binding ( from ADB that is)?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]