HELP Needed on missing NS in rpc call
tthiele Jul 8, 2005 2:56 AMFrom a given wsdl I generated stubs and deployment descriptor. A relevant piece of wsdl is:
<xsd:complexType name="typeFahrzeugDaten"> <xsd:all> <xsd:element name="Haendlernummer"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:length value="10"/> </xsd:restriction> </xsd:simpleType> </xsd:element>
When I send a request to mysqelf I get this error:
Request: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <RequestHereinnahme href="#id0"/> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:typeFahrzeugDaten" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DEKRA"> <Haendlernummer href="#id1"/> <Sender xsi:nil="1"/> Response: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Client</faultcode> <faultstring>Invalid element in de.ems.carmanager.schnittstelle.ejbcommon.bmw.hmd.TypeFahrzeugDaten - Haendlernummer</faultstring>
I added a namespace ns1 to Haendlernummer and got this result:
Request: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <RequestHereinnahme href="#id0"/> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:typeFahrzeugDaten" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:DEKRA"> <ns1:Haendlernummer href="#id1"/> <Sender xsi:nil="1"/> Response: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Client</faultcode> <faultstring>Invalid element in de.ems.carmanager.schnittstelle.ejbcommon.bmw.hmd.TypeFahrzeugDaten - Sender</faultstring>
It seems that the deserializer does not know the namespace and can not find the field meta data.
So what did I wrong?