You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/11 04:32:46 UTC
[jira] Commented: (AXISCPP-197) Problem with complex types which contain complex types
The following comment has been added to this issue:
Author: Samisa Abeysinghe
Created: Sun, 10 Oct 2004 7:32 PM
Body:
Carsten ->
Could it be that your document inside the envelope is missing
namespace prefixes?
So instead of
<SOAP-ENV:Body>
<ns1:registerLicense xmlns:ns1="urn:ca">
<LicenseRegistration xsi:type="ns1:LicenseRegistration"
xmlns:ns1="urn:ca">
<KeyTableRecord xsi:type="ns2:KeyTableRecord"
xmlns:ns2="http://objects.ca">
<nodes xsi:type="xsd:int">0</nodes>
....
this might work
<SOAP-ENV:Body>
<ns1:registerLicense xmlns:ns1="urn:ca">
<ns1:LicenseRegistration xsi:type="ns1:LicenseRegistration"
xmlns:ns1="urn:ca">
<ns2:KeyTableRecord xsi:type="ns2:KeyTableRecord"
xmlns:ns2="http://objects.ca">
<ns2:nodes xsi:type="xsd:int">0</ns2:nodes>
....
I have a similar SAXException (Invalid element in ...). Taking the wire
level message and
adding the namespace prefixes by hand and transmitting it to Axis Java
made it work.
It seems to me that a complex parameter is properly namespace prefixed,
but if we use direct
elements there are no prefixes (in
BasicTypeSerializer::serializeAsElement and
SoapSerializer::serializeAsElement there is no input parameter
specifying the namespace,
which I believe is something which needs to be done in general).
So maybe somebody who has worked on the serializer could give some
insight here. If we want
to add namespace prefixing this would be a larger fix since this would
also involve also the
WSDL code generation so I would like to find out the intention here.
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/AXISCPP-197?page=comments#action_53887
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXISCPP-197
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXISCPP-197
Summary: Problem with complex types which contain complex types
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis-C++
Components:
WSDL processing
Versions:
1.3 Beta
Assignee:
Reporter: Samisa Abeysinghe
Created: Sun, 10 Oct 2004 7:30 PM
Updated: Sun, 10 Oct 2004 7:32 PM
Environment: All platforms
Description:
Reported by Jairam and commented by Carsten: See email thread http://marc.theaimsgroup.com/?t=109647632900001&r=1&w=4 fro more details.
Jairam:
I think there is a problem with complex types which contain complex
types. I did the following test with a brand new wsdl and the error was
the same. The service expects a ComplexObject type which is a complex
type. The ComplexObject contains a TestObject type which is a complex
type on its own.
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:mypack"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:mypack" xmlns:intf="urn:mypack"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="urn:mypack"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="TestObject">
<sequence>
<element name="nodes" type="xsd:int"/>
<element name="startDate" nillable="true" type="xsd:date"/>
<element name="vendorName" nillable="true" type="xsd:string"/>
<element name="clientID" nillable="true" type="xsd:string"/>
<element name="regDate" nillable="true" type="xsd:date"/>
<element name="componentCode" nillable="true" type="xsd:string"/>
<element name="oemKey" nillable="true" type="xsd:string"/>
<element name="expired" type="xsd:boolean"/>
<element name="key" nillable="true" type="xsd:string"/>
<element name="days" type="xsd:int"/>
<element name="companyName" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
<complexType name="ComplexObject">
<sequence>
<element name="testObj" nillable="true" type="impl:TestObject"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="registerLicenseResponse">
<wsdl:part name="registerLicenseReturn"
type="intf:ComplexObject"/>
</wsdl:message>
<wsdl:message name="registerLicenseRequest">
<wsdl:part name="in0" type="intf:ComplexObject"/>
</wsdl:message>
<wsdl:portType name="TestSystem">
<wsdl:operation name="registerLicense" parameterOrder="in0">
<wsdl:input message="intf:registerLicenseRequest"
name="registerLicenseRequest"/>
<wsdl:output message="intf:registerLicenseResponse"
name="registerLicenseResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TestSystemSoapBinding" type="intf:TestSystem">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="registerLicense">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="registerLicenseRequest">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:mypack" use="encoded"/>
</wsdl:input>
<wsdl:output name="registerLicenseResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:mypack" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TestSystemService">
<wsdl:port binding="intf:TestSystemSoapBinding" name="TestSystem">
<wsdlsoap:address
location="http://fries/axis/services/TestSystem"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira