axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel O Callaghan <daniel_o_callag...@yahoo.com>
Subject Possible Axis2 and .Net Interoperability Issues
Date Thu, 19 Jul 2007 12:16:50 GMT
Hi Folks,

I am trying to communicate to a third party .net web
service via axis2 but on the .net side they are
getting an error stating that an XML element has an
invalid child element in a a different namespace. I am
getting confused as I am under the assumption that the
code generated by WSDL2Java and the XML request
message looks correct. From looking at the WSDL and
schema definition file I cant understand why it would
fail. Is this a .net,java or WSDL definition issue.
>From looking at the error I think .net is assuming
that the ClientReference element should be in the
http://test.webservices.com/client instead of
investmentservicestypes.

Any ideas or thoughts are really appreciated. 

Regards
Danny

.net Error
==============================================================================
System.Web.Services.Protocols.SoapException: Server
was unable to read request. ---> 
System.InvalidOperationException: There is an error in
XML document (2, 313). ---> 
System.InvalidOperationException: There is an error in
XML document (0, 0). --->
System.Xml.Schema.XmlSchemaValidationException: The
element
'ClientAccountsRequest' in namespace
'http://test.webservices.com/client' has invalid child
element 'ClientReference' in namespace
'http://test.webservices.com/investmentservicestypes'.

List of possible elements expected: 'ClientReference'
in namespace 'http://test.webservices.com/client'. 
at
System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(ValidationEventHandler
eventHandler, Object sender,
XmlSchemaValidationException e,XmlSeverityType
severity) 
at
System.Xml.Schema.XmlSchemaValidator.ElementValidationError(XmlQualifiedName
name, ValidationState context, ValidationEventHandler
eventHandler, Object
sender, String sourceUri, Int32 lineNo, Int32 linePos,
Boolean getParticles) 
at


Request Message
===================
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns3:GetClientAccounts xmlns:ns3="
http://test.webservices.com/client">
<ClientAccountsRequest
xmlns="http://test.webservices.com/client ">
<ns2:ClientReference xmlns:ns2="
http://test.webservices.com/investmentservicestypes
">860</ns2:ClientReference>
</ClientAccountsRequest>
</ns3:GetClientAccounts>
</soapenv:Body>
</soapenv:Envelope>



Response Message
===================
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Server was unable to read
request.</faultstring>
<detail>Error</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>



Schema definition
=======================
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="ClientAccountsRequest"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://test.webservices.com/client"
targetNamespace="http://test.webservices.com/client"
xmlns:inc="
http://test.webservices.com/investmentservicestypes">
<xs:import
schemaLocation="../Schemas/InvestmentServicesTypes.xsd"
namespace="
http://test.webservices.com/investmentservicestypes"
/>

<xs:complexType name="ClientAccountsRequest">
<xs:sequence>
<xs:element name="ClientReference" type="
inc:ClientReference" />
</xs:sequence>
</xs:complexType>

<xs:element name="ClientAccountsRequest"
type="ClientAccountsRequest" />
</xs:schema>




WSDL
=======

<?xml version="1.0" encoding="utf8" ?>
<wsdl:definitions
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://test.webservices.com/client"
xmlns:i0="http://test.webservices.com/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s2="http://test.webservices.com/investmentservicestypes"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://test.webservices.com/client"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Client
management tool </wsdl:documentation>

<wsdl:import namespace="http://test.webservices.com/"
location="http://localhost/services/schemas/general.xsd"
/>

<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://test.webservices.com/client">
<s:import
namespace="http://test.webservices.com/investmentservicestypes"
/>

<s:import namespace="http://test.webservices.com/" />

<s:element name="GetClientAccounts">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="ClientAccountsRequest"
type="tns:ClientAccountsRequest" />
</s:sequence>
</s:complexType>
</s:element>

<s:element name="GetClientAccountsResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="GetClientAccountsResult"
type="tns:ClientAccounts" />
</s:sequence>
</s:complexType>
</s:element>


<s:complexType name="ClientAccount">
<s:sequence>
<s:element name="ClientAccountReference"
type="s2:ClientAccountReference" />

<s:element name="AccountDescription"
type="s2:AccountDescription" />

<s:element name="PayeeName">
<s:simpleType>
<s:restriction base="s:string">
<s:maxLength value="65" />
</s:restriction>
</s:simpleType>
</s:element>

<s:element name="AccountCurrency" type="s2:Currency"
/>

<s:element name="InvestmentObjective">
<s:simpleType>
<s:restriction base="s:string">
<s:maxLength value="1" />

<s:minLength value="1" />
</s:restriction>
</s:simpleType>
</s:element>

<s:element name="RiskIndicator">
<s:simpleType>
<s:restriction base="s:string">
<s:maxLength value="6" />
</s:restriction>
</s:simpleType>
</s:element>

<s:element name="Product">
<s:simpleType>
<s:restriction base="s:string">
<s:maxLength value="3" />
</s:restriction>
</s:simpleType>
</s:element>

<s:element name="FSADescription">
<s:simpleType>
<s:restriction base="s:string">
<s:maxLength value="30" />
</s:restriction>
</s:simpleType>
</s:element>

<s:element name="EntryDate" type="s:dateTime" />

<s:element name="ActualBalance" type="s2:Price" />

<s:element name="NetBalance" type="s2:Price" />

<s:element name="PendingCredit" type="s2:Price" />

<s:element name="PendingDebit" type="s2:Price" />
</s:sequence>
</s:complexType>

<s:complexType name="ClientAccounts">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded"
name="ClientAccount" type="tns:ClientAccount" />
</s:sequence>
</s:complexType>

<s:element name="ClientAccounts"
type="tns:ClientAccounts" />

<s:complexType name="ClientAccountsRequest">
<s:sequence>
<s:element name="ClientReference"
type="s2:ClientReference" />
</s:sequence>
</s:complexType>

<s:element name="ClientAccountsRequest"
type="tns:ClientAccountsRequest" />

</s:schema>

<s:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:inc="http://test.webservices.com/"
elementFormDefault="qualified"
targetNamespace="http://test.webservices.com/"
id="General">
<xs:simpleType name="DSSISOCountry">
<xs:restriction base="xs:string">
<xs:maxLength value="3" />

<xs:minLength value="3" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSExecCode">
<xs:restriction base="xs:string">
<xs:maxLength value="3" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSCurrency">
<xs:restriction base="xs:string">
<xs:maxLength value="3" />

<xs:minLength value="3" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSSedolCode">
<xs:restriction base="xs:string">
<xs:maxLength value="7" />

<xs:minLength value="7" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSISIN">
<xs:restriction base="xs:string">
<xs:maxLength value="12" />

<xs:minLength value="12" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSEPIC">
<xs:restriction base="xs:string">
<xs:maxLength value="15" />

<xs:minLength value="15" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSClientReference">
<xs:restriction base="xs:string">
<xs:minLength value="1" />

<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSClientAccountReference">
<xs:restriction base="xs:string">
<xs:minLength value="1" />

<xs:maxLength value="11" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSClientAccountType">
<xs:restriction base="xs:string">
<xs:maxLength value="1" />

<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSClientBargainReference">
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSTransactionReference">
<xs:restriction base="xs:string">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSStockCode">
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSStockName">
<xs:restriction base="xs:string">
<xs:maxLength value="46" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSCommonOrderReference">
<xs:restriction base="xs:integer" />
</xs:simpleType>

<xs:simpleType name="DSSQuantity">
<xs:restriction base="xs:decimal">
<xs:totalDigits value="16" />

<xs:fractionDigits value="7" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSGuid">
<xs:restriction base="xs:string">
<xs:pattern
value="([09afAF]{8}[09afAF]{4}[09afAF]{4}[09afAF]{4}[09afAF]{12})|(\{[09afAF]{8}[09afAF]{4}[09afAF]{4}[09afAF]{4}[09afAF]{12}\})"
/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSFirmCode">
<xs:restriction base="xs:string">
<xs:maxLength value="3" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DSSUserCode">
<xs:restriction base="xs:string">
<xs:maxLength value="17" />
</xs:restriction>
</xs:simpleType>
</s:schema>

<s:schema xmlns:inc="http://test.webservices.com/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://test.webservices.com/investmentservicestypes"
elementFormDefault="qualified"
targetNamespace="http://test.webservices.com/investmentservicestypes"
id="portfolio">
<xs:import schemaLocation="../Schemas/General.xsd"
namespace="http://test.webservices.com/" />

<xs:import
namespace="http://schemas.xmlsoap.org/soap/encoding/"
/>

<xs:import
namespace="http://schemas.xmlsoap.org/wsdl/" />

<xs:simpleType name="Gender">
<xs:restriction base="xs:string">
<xs:enumeration value="M" />

<xs:enumeration value="F" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="DOB">
<xs:restriction base="xs:dateTime" />
</xs:simpleType>

<xs:simpleType name="PhoneNumber">
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="Balance">
<xs:restriction base="xs:decimal">
<xs:totalDigits value="22" />

<xs:fractionDigits value="4" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="AccountDescription">
<xs:restriction base="xs:string">
<xs:maxLength value="40" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="Name">
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="PostCode">
<xs:restriction base="xs:string">
<xs:maxLength value="8" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="Address">
<xs:restriction base="xs:string">
<xs:maxLength value="40" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="RegistrationAddress">
<xs:restriction base="xs:string">
<xs:maxLength value="35" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="ClientQuantity">
<xs:restriction base="xs:decimal">
<xs:totalDigits value="16" />

<xs:fractionDigits value="7" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="BoughtSoldFlag">
<xs:restriction base="xs:string">
<xs:enumeration value="B" />

<xs:enumeration value="S" />
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="ISOCountry">
<xs:restriction base="inc:DSSISOCountry" />
</xs:simpleType>

<xs:simpleType name="Currency">
<xs:restriction base="inc:DSSCurrency" />
</xs:simpleType>

<xs:simpleType name="SedolCode">
<xs:restriction base="inc:DSSSedolCode" />
</xs:simpleType>

<xs:simpleType name="ISIN">
<xs:restriction base="inc:DSSISIN" />
</xs:simpleType>

<xs:simpleType name="EPIC">
<xs:restriction base="inc:DSSEPIC" />
</xs:simpleType>

<xs:simpleType name="ClientReference">
<xs:restriction base="inc:DSSClientReference" />
</xs:simpleType>

<xs:simpleType name="ClientAccountReference">
<xs:restriction base="inc:DSSClientAccountReference"
/>
</xs:simpleType>

<xs:simpleType name="ClientAccountType">
<xs:restriction base="inc:DSSClientAccountType" />
</xs:simpleType>

<xs:simpleType name="ClientBargainReference">
<xs:restriction base="inc:DSSClientBargainReference"
/>
</xs:simpleType>

<xs:simpleType name="TransactionReference">
<xs:restriction base="inc:DSSTransactionReference" />
</xs:simpleType>

<xs:simpleType name="StockCode">
<xs:restriction base="inc:DSSStockCode" />
</xs:simpleType>

<xs:simpleType name="StockName">
<xs:restriction base="inc:DSSStockName" />
</xs:simpleType>

<xs:simpleType name="ExecCode">
<xs:restriction base="inc:DSSExecCode" />
</xs:simpleType>

<xs:simpleType name="CommonOrderReference">
<xs:restriction base="inc:DSSCommonOrderReference" />
</xs:simpleType>

<xs:simpleType name="Quantity">
<xs:restriction base="inc:DSSQuantity" />
</xs:simpleType>

<xs:complexType name="Price">
<xs:sequence>
<xs:element name="Value">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:totalDigits value="29" />

<xs:fractionDigits value="7" />
</xs:restriction>
</xs:simpleType>
</xs:element>

<xs:element name="ValueCurrency"
type="inc:DSSCurrency" />
</xs:sequence>
</xs:complexType>

<xs:complexType name="PriceTime">
<xs:complexContent mixed="false">
<xs:extension base="s2:Price">
<xs:sequence>
<xs:element name="DateTime" type="xs:dateTime" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:simpleType name="Guid">
<xs:restriction base="inc:DSSGuid" />
</xs:simpleType>

<xs:simpleType name="FirmCode">
<xs:restriction base="inc:DSSFirmCode" />
</xs:simpleType>

<xs:simpleType name="UserCode">
<xs:restriction base="inc:DSSUserCode" />
</xs:simpleType>
</s:schema>
</wsdl:types>


<wsdl:message name="GetClientAccountsSoapIn">
<wsdl:part name="parameters"
element="tns:GetClientAccounts" />
</wsdl:message>

<wsdl:message name="GetClientAccountsSoapOut">
<wsdl:part name="parameters"
element="tns:GetClientAccountsResponse" />
</wsdl:message>


<wsdl:portType name="ClientSoap">

<wsdl:operation name="GetClientAccounts">
<wsdl:documentation
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Takes a
ClientAccountsRequest and returns a
ClientAccounts</wsdl:documentation>

<wsdl:input message="tns:GetClientAccountsSoapIn" />

<wsdl:output message="tns:GetClientAccountsSoapOut" />
</wsdl:operation>

</wsdl:portType>

<wsdl:binding name="ClientSoap" type="tns:ClientSoap">
<soap:binding
transport="http://schemas.xmlsoap.org/soap/http" />

<wsdl:operation name="GetClientAccounts">
<soap:operation
soapAction="http://test.webservices.com/client/GetClientAccounts"
style="document" />

<wsdl:input>
<soap:body use="literal" />
</wsdl:input>

<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>

</wsdl:binding>

<wsdl:binding name="ClientSoap12"
type="tns:ClientSoap">
<soap12:binding
transport="http://schemas.xmlsoap.org/soap/http" />

<wsdl:operation name="GetClientAccounts">
<soap12:operation
soapAction="http://test.webservices.com/client/GetClientAccounts"
style="document" />

<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>

<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>

</wsdl:binding>

<wsdl:service name="Client">
<wsdl:documentation
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Client
tools </wsdl:documentation>

<wsdl:port name="ClientSoap" binding="tns:ClientSoap">
<soap:address
location="http://localhost/services/v1/client.asmx" />
</wsdl:port>

<wsdl:port name="ClientSoap12"
binding="tns:ClientSoap12">
<soap12:address
location="http://localhost/services/v1/client.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>





      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message